Generarates inventory for ansible from etcd using python-etcd library.
The script assumes etcd.ini to be present alongside it. To choose a different path, set the ETCD_INI_PATH environment variable:
export ETCD_INI_PATH=/path/to/etcd.ini
TASK: [etcd | Enable etcd] **************************************************** | |
failed: [core-node02.ctocllab.cisco.com] => {"failed": true} | |
msg: no service or tool found for: etcd2 | |
FATAL: all hosts have already failed -- aborting | |
PLAY RECAP ******************************************************************** | |
to retry, use: --limit @/root/cluster.retry | |
core-node02.ctocllab.cisco.com : ok=34 changed=4 unreachable=0 failed=1 |
Provisioning to use Calico | |
1/20/2017 | |
First, tearing down the cluster, by doing this on each node: | |
kubeadm reset | |
rm -rf .kube | |
systemctl start kubelet.service | |
Did yum -y update on all nodes as well. Downloaded http://docs.projectcalico.org/v1.6/getting-started/kubernetes/installation/hosted/kubeadm/calico.yaml and then ran "kubectl create -f calico.yaml". | |
Starting up cluster (with just the master node). |
______________________________________________________________ | |
k8s+contiv BGP peering setup | |
Status: | |
- able to peer with ASR1K route-reflector | |
- able to see reflected routes in k8s netctl bgp output | |
- NOT able to see k8s pod routes in ASR1K | |
------------------------------------------------------- |
There are three easy to make mistakes in go. I present them here in the way they are often found in the wild, not in the way that is easiest to understand.
All three of these mistakes have been made in Kubernetes code, getting past code review at least once each that I know of.
What do these lines do? Make predictions and then scroll down.
func print(pi *int) { fmt.Println(*pi) }
% openshift-install create manifests --dir=./clusters/gcp-mmasters-6 | |
INFO Consuming "Install Config" from target directory | |
openshift-install create manifests --dir=./clusters/gcp-mmasters-6 1.78s user 0.06s system 18% cpu 9.806 total | |
% cat > ./clusters/gcp-mmasters-6/manifests/ingress-controller-01-crd.yaml <<EOF | |
--- | |
apiVersion: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: | |
name: ingresscontrollers.operator.openshift.io | |
spec: |
FROM golang:1.13.5-buster | |
COPY main.go /go/reaper.go | |
RUN go build -o /bin/reaper /go/reaper.go | |
ENTRYPOINT ["/bin/reaper"] |
+----------------------------------------+ | |
+----------------------------------------------------------------------------------------------------------+ | |
| | | CLUSTER OPERATOR | | |
| +-----------------------+ | | | | |
| | Gateway | | +----------------------------------+ | | | |
| +-----------------------+ | | Secret | | | | |
| | | | +----------------------------------+ | | | |
| | Listeners +---------->+ | | | | |
| | TLS | | | | tls.crt | | | | |
| | CertificateRef + | | | foo.example.com |