blob: 182453a646d056bccd5a4cf5d70a7b53e21127f1 [file] [log] [blame]
Artem Panchenkoedf70ef2017-06-13 09:14:34 +03001{% from 'virtual-mcp11-k8s-calico/underlay.yaml' import HOSTNAME_CFG01 with context %}
2
vrovachev8a882d82017-06-21 12:56:19 +04003# Kubernetes
Artem Panchenkoedf70ef2017-06-13 09:14:34 +03004- description: Install etcd
5 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
6 -C 'I@etcd:server' state.sls etcd.server.service
7 node_name: {{ HOSTNAME_CFG01 }}
8 retry: {count: 1, delay: 5}
9 skip_fail: false
10
11- description: Check the etcd health
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
13 -C 'I@etcd:server' cmd.run '. /var/lib/etcd/configenv && etcdctl cluster-health'
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 5}
16 skip_fail: false
17
18- description: Install Kubernetes and Calico
19 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
20 -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons;
21 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@kubernetes:pool' state.sls kubernetes.pool;
22 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@kubernetes:pool' cmd.run 'calicoctl node status';
23 node_name: {{ HOSTNAME_CFG01 }}
Victor Ryzhenkin3ffa2b42017-10-05 16:38:44 +040024 retry: {count: 3, delay: 5}
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030025 skip_fail: false
26
27- description: Setup NAT for Calico
28 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
29 -C 'I@etcd:server' --subset 1 state.sls etcd.server.setup
30 node_name: {{ HOSTNAME_CFG01 }}
31 retry: {count: 1, delay: 5}
32 skip_fail: false
33
34- description: Run whole master to check consistency
35 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
36 -C 'I@kubernetes:master' state.sls kubernetes exclude=kubernetes.master.setup
37 node_name: {{ HOSTNAME_CFG01 }}
38 retry: {count: 1, delay: 5}
39 skip_fail: true
40
akasatkin6a3c36e2017-08-21 19:25:00 +030041- description: Restart kubelet
42 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
43 -C 'I@kubernetes:pool' service.restart kubelet
44 node_name: {{ HOSTNAME_CFG01 }}
45 retry: {count: 1, delay: 5}
46 skip_fail: false
47
Artem Panchenkoedf70ef2017-06-13 09:14:34 +030048- description: Register addons
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
50 -C 'I@kubernetes:master' --subset 1 state.sls kubernetes.master.setup
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false