Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp11-k8s-calico/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | |
vrovachev | 8a882d8 | 2017-06-21 12:56:19 +0400 | [diff] [blame] | 3 | # Kubernetes |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 4 | - 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 Ryzhenkin | 3ffa2b4 | 2017-10-05 16:38:44 +0400 | [diff] [blame] | 24 | retry: {count: 3, delay: 5} |
Artem Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 25 | 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 | |
akasatkin | 6a3c36e | 2017-08-21 19:25:00 +0300 | [diff] [blame] | 41 | - 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 Panchenko | edf70ef | 2017-06-13 09:14:34 +0300 | [diff] [blame] | 48 | - 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 |