Refactor Distributed Analytics project structure
[demo.git] / vnfs / DAaaS / deploy / operator / charts / etcd-operator / templates / NOTES.txt
1 {{- $clusterEnabled := (and (not .Release.IsInstall) .Values.customResources.createEtcdClusterCRD) -}}
2 {{- if and .Release.IsInstall .Values.customResources.createEtcdClusterCRD -}}
3 Not enabling cluster, the ThirdPartResource must be installed before you can create a Cluster. Continuing rest of normal deployment.
4
5 {{ end -}}
6
7 {{- if $clusterEnabled -}}
8 1. Watch etcd cluster start
9   kubectl get pods -l etcd_cluster={{ .Values.etcdCluster.name }} --namespace {{ .Release.Namespace }} -w
10
11 2. Confirm etcd cluster is healthy
12   $ kubectl run --rm -i --tty --env="ETCDCTL_API=3" --env="ETCDCTL_ENDPOINTS=http://{{ .Values.etcdCluster.name }}-client:2379" --namespace {{ .Release.Namespace }} etcd-test --image quay.io/coreos/etcd --restart=Never -- /bin/sh -c 'watch -n1 "etcdctl  member list"'
13
14 3. Interact with the cluster!
15   $ kubectl run --rm -i --tty --env ETCDCTL_API=3 --namespace {{ .Release.Namespace }} etcd-test --image quay.io/coreos/etcd --restart=Never -- /bin/sh
16   / # etcdctl --endpoints http://{{ .Values.etcdCluster.name }}-client:2379 put foo bar
17   / # etcdctl --endpoints http://{{ .Values.etcdCluster.name }}-client:2379 get foo
18   OK
19   (ctrl-D to exit)
20   
21 4. Optional
22   Check the etcd-operator logs
23   export POD=$(kubectl get pods -l app={{ template "etcd-operator.fullname" . }} --namespace {{ .Release.Namespace }} --output name)
24   kubectl logs $POD --namespace={{ .Release.Namespace }}
25
26 {{- else -}}
27 1. etcd-operator deployed.
28   If you would like to deploy an etcd-cluster set cluster.enabled to true in values.yaml
29   Check the etcd-operator logs
30     export POD=$(kubectl get pods -l app={{ template "etcd-operator.fullname" . }} --namespace {{ .Release.Namespace }} --output name)
31     kubectl logs $POD --namespace={{ .Release.Namespace }}
32
33 {{- end -}}