Tatyana Leontovich | c8b8ca2 | 2017-05-19 13:37:05 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp11-k8s-calico/underlay.yaml' import HOSTNAME_CFG01 with context %} |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 2 | |
| 3 | # Install support services |
| 4 | - description: Create and distribute SSL certificates for services using salt state |
| 5 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt |
| 6 | node_name: {{ HOSTNAME_CFG01 }} |
| 7 | retry: {count: 1, delay: 10} |
| 8 | skip_fail: true |
| 9 | |
| 10 | - description: Install keepalived |
| 11 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 12 | -C 'I@keepalived:cluster' state.sls keepalived -b 1 |
| 13 | node_name: {{ HOSTNAME_CFG01 }} |
| 14 | retry: {count: 1, delay: 10} |
| 15 | skip_fail: true |
| 16 | |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 17 | - description: Install haproxy |
| 18 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 19 | -C 'I@haproxy:proxy' state.sls haproxy |
| 20 | node_name: {{ HOSTNAME_CFG01 }} |
| 21 | retry: {count: 1, delay: 5} |
| 22 | skip_fail: false |
| 23 | |
| 24 | - description: Install haproxy.service |
| 25 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 26 | -C 'I@haproxy:proxy' service.status haproxy |
| 27 | node_name: {{ HOSTNAME_CFG01 }} |
| 28 | retry: {count: 1, delay: 5} |
| 29 | skip_fail: false |
| 30 | |
| 31 | - description: Install docker |
| 32 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 33 | -C 'I@docker:host' state.sls docker.host |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
| 35 | retry: {count: 1, delay: 5} |
| 36 | skip_fail: false |
| 37 | |
| 38 | - description: Check docker |
| 39 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 40 | -C 'I@docker:host' cmd.run 'docker ps' |
| 41 | node_name: {{ HOSTNAME_CFG01 }} |
| 42 | retry: {count: 1, delay: 5} |
| 43 | skip_fail: false |
| 44 | |
| 45 | - description: Install etcd |
| 46 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 47 | -C 'I@etcd:server' state.sls etcd.server.service |
| 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 1, delay: 5} |
| 50 | skip_fail: false |
| 51 | |
| 52 | - description: Check the etcd health |
| 53 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 54 | -C 'I@etcd:server' cmd.run '. /var/lib/etcd/configenv && etcdctl cluster-health' |
| 55 | node_name: {{ HOSTNAME_CFG01 }} |
| 56 | retry: {count: 1, delay: 5} |
| 57 | skip_fail: false |
| 58 | |
| 59 | - description: Install Kubernetes and Calico |
| 60 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 61 | -C 'I@kubernetes:master' state.sls kubernetes.master.kube-addons; |
| 62 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@kubernetes:pool' state.sls kubernetes.pool; |
| 63 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@kubernetes:pool' cmd.run 'calicoctl node status'; |
| 64 | node_name: {{ HOSTNAME_CFG01 }} |
| 65 | retry: {count: 1, delay: 5} |
| 66 | skip_fail: false |
| 67 | |
| 68 | - description: Setup NAT for Calico |
| 69 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 70 | -C 'I@etcd:server' --subset 1 state.sls etcd.server.setup |
| 71 | node_name: {{ HOSTNAME_CFG01 }} |
| 72 | retry: {count: 1, delay: 5} |
| 73 | skip_fail: false |
| 74 | |
| 75 | - description: Run whole master to check consistency |
| 76 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 77 | -C 'I@kubernetes:master' state.sls kubernetes exclude=kubernetes.master.setup |
| 78 | node_name: {{ HOSTNAME_CFG01 }} |
| 79 | retry: {count: 1, delay: 5} |
| 80 | skip_fail: true |
| 81 | |
| 82 | |
| 83 | - description: Register addons |
| 84 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 85 | -C 'I@kubernetes:master' --subset 1 state.sls kubernetes.master.setup |
| 86 | node_name: {{ HOSTNAME_CFG01 }} |
| 87 | retry: {count: 1, delay: 5} |
| 88 | skip_fail: false |