Skip to content

Instantly share code, notes, and snippets.

View mattymo's full-sized avatar

Matthew Mosesohn mattymo

View GitHub Profile
@mattymo
mattymo / patchsets-from-topic.sh
Last active August 29, 2015 14:22
gerrit patches from topic
#!/bin/bash
GERRITUSER=$USER
TOPIC=$1
EXTRAQUERY=$2
#Sort order
#0=as gerrit says (newest first)
#1=numeric by patchset id
#2=reverse of gerrit (oldest first)
SORTED=2
if [ -z "$1" ];then echo "specify topic"; exit 1; fi
---
e2e_conformance_image_repo: "artifactory.local:5003/k8s-conformance"
e2e_conformance_image_tag: "v1.3.5_a1b3c4_1"
hyperkube_image_repo: "artifactory.local:5003/hyperkube-amd64"
hyperkube_image_tag: "v1.3.5_abcdef_1"
diff --git a/roles/kubernetes/node/defaults/main.yml b/roles/kubernetes/node/defaults/main.yml
index 99ed2bd..a74e52b 100644
--- a/roles/kubernetes/node/defaults/main.yml
+++ b/roles/kubernetes/node/defaults/main.yml
@@ -27,3 +27,5 @@ nginx_cpu_requests: 50m
nginx_image_repo: nginx
nginx_image_tag: 1.11.4-alpine
+
+etcd_config_dir: /etc/ssl/etcd
root@node1:~# openssl x509 -in /etc/kubernetes/ssl/node-node1.pem -text -noout
Certificate:
Data:
Version: 1 (0x0)
Serial Number: 13384200210840581203 (0xb9be3b2de1dc7453)
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=kube-ca
Validity
Not Before: Feb 27 09:50:45 2017 GMT
Not After : Feb 25 09:50:45 2027 GMT
@mattymo
mattymo / etcd-restore.sh
Last active September 26, 2018 12:58
ETCD restore script
#!/bin/bash -e
# Change as necessary
RESTORE_PATH=${RESTORE_PATH:-/tmp/member}
#Extract node data from etcd config
source /etc/etcd.env || source /etc/default/etcd
function with_retries {
local retries=3
@mattymo
mattymo / galera-statefulset.yml
Last active April 18, 2017 14:51
Galera petset
apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: mysql
spec:
serviceName: "galera"
replicas: 3
template:
metadata:
labels:
@mattymo
mattymo / database.properties
Last active April 18, 2017 15:05
Teamcity MySQL database.properties
connectionUrl=jdbc:mysql://teamcity:3306/teamcity
connectionProperties.user=teamcity
connectionProperties.password=teamcity
maxConnections=50
connectionProperties.useUnicode=true
testOnBorrow=true
@mattymo
mattymo / teamcity-agent.yml
Created April 18, 2017 15:34
TeamCity agent deployment resource
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: teamcity-agent
labels:
name: teamcity-agent
name: frontend
spec:
replicas: 3
template:
@mattymo
mattymo / setup_childcluster_kubeconfig.sh
Last active June 27, 2017 14:43
Federation kubeconfig scripts
#!/bin/bash -xe
OLD_CLUSTERNAME="local"
OLD_CONTEXT="kubelet-cluster.second"
OLD_USER="kubelet"
LOADBALANCER="https://fed-loadbalancer-childcluster.kube-system"
NEW_CLUSTERNAME="childcluster"
NEW_CONTEXT="childcluster"
NEW_USER="kubelet-childcluster"
@mattymo
mattymo / kubedns-deploy.yml
Last active June 26, 2017 16:03
kubedns for federation
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kubedns
namespace: kube-system
labels:
k8s-app: kubedns
version: v19
kubernetes.io/cluster-service: "true"
spec: