Skip to content

Instantly share code, notes, and snippets.

View marcoceppi's full-sized avatar
.

Marco Ceppi marcoceppi

.
View GitHub Profile
variant: fcos
version: 1.4.0
storage:
directories:
- path: /etc/ucore-autorebase
mode: 0754
systemd:
units:
- name: ucore-unsigned-autorebase.service
enabled: true
format = """
$username\
$hostname\
$kubernetes\
$git_branch\
$git_commit\
$git_state\
$git_status\
$hg_branch\
$docker_context\
format = """
$username\
$hostname\
$kubernetes\
$git_branch\
$git_commit\
$git_state\
$git_status\
$hg_branch\
$docker_context\
class ExponentialBackoff:
def __init__(self, base=1, integral=False):
self._base = base
self._exp = 0
self._max = 10
self._reset_time = base * 2 ** 11
self._last_invocation = time.monotonic()
r = random.Random()
@marcoceppi
marcoceppi / cdk.package.list
Last active May 23, 2018 15:33
CDK Package list as of 1.10.2
accountsservice
acl
acpid
adduser
apparmor
apport
apport-symptoms
apt
apt-transport-https
apt-utils
@marcoceppi
marcoceppi / rancher.yaml
Created December 6, 2017 18:10
Run rancher 2.0 preview on Kubernetes
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
app: rancher
name: rancher-server
namespace: kube-system
spec:
replicas: 1
selector:
apiVersion: v1
kind: Namespace
metadata:
name: rancher
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: rancher
namespace: rancher
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: registry-ingress # Name of resource
spec:
rules:
- host: {{domain}} # Hostname/DNS for registry. Or use registry.{{KUBERNETES-WORKER/0-IP}}.xip.io
http:
paths:
- backend:
@marcoceppi
marcoceppi / create-registry.sh
Last active October 11, 2017 19:30 — forked from ajbouh/create-registry.sh
Create a private Docker registry on a fresh Kubernetes Cluster
set -ex
REGISTRY_INGRESS_IP=10.73.177.23
REGISTRY_INGRESS_HOSTNAME=registry.$REGISTRY_INGRESS_IP.xip.io
REQ_CN=10.73.177.126
# if [ ! -e $REGISTRY_INGRESS_HOSTNAME.key ]; then
# echo '{"CN":"'$REGISTRY_INGRESS_HOSTNAME'","hosts":[""],"key":{"algo":"rsa","size":2048}}' | cfssl gencert -config=ca-config.json -ca=ca.pem -ca-key=ca-key.pem -hostname="$REGISTRY_INGRESS_HOSTNAME" - | cfssljson -bare $REGISTRY_INGRESS_HOSTNAME
# fi
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: microbot
name: microbot
spec:
replicas: 5
selector: