Victor Ryzhenkin | 42e2423 | 2017-11-15 08:01:20 -0400 | [diff] [blame] | 1 | {% from 'k8s-ha-calico/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 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 '*' |
| 6 | state.sls salt.minion.cert |
| 7 | node_name: {{ HOSTNAME_CFG01 }} |
| 8 | retry: {count: 1, delay: 10} |
| 9 | skip_fail: true |
| 10 | |
| 11 | - description: Install docker |
| 12 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 13 | -C 'I@docker:host' state.sls docker.host |
| 14 | node_name: {{ HOSTNAME_CFG01 }} |
| 15 | retry: {count: 3, delay: 5} |
| 16 | skip_fail: false |
| 17 | |
| 18 | - description: Check docker |
| 19 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 20 | -C 'I@docker:host' cmd.run 'docker ps' |
| 21 | node_name: {{ HOSTNAME_CFG01 }} |
| 22 | retry: {count: 1, delay: 5} |
| 23 | skip_fail: false |
| 24 | |
| 25 | - description: Install keepalived on first node |
| 26 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 27 | -C 'I@keepalived:cluster and *01*' state.sls keepalived |
| 28 | node_name: {{ HOSTNAME_CFG01 }} |
| 29 | retry: {count: 1, delay: 10} |
| 30 | skip_fail: true |
| 31 | |
| 32 | - description: Install keepalived on whole cluster |
| 33 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 34 | -C 'I@keepalived:cluster and *01*' state.sls keepalived |
| 35 | node_name: {{ HOSTNAME_CFG01 }} |
| 36 | retry: {count: 1, delay: 10} |
| 37 | skip_fail: true |
| 38 | |
| 39 | - description: Install haproxy |
| 40 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 41 | -C 'I@haproxy:proxy' state.sls haproxy |
| 42 | node_name: {{ HOSTNAME_CFG01 }} |
| 43 | retry: {count: 1, delay: 5} |
| 44 | skip_fail: false |
| 45 | |
| 46 | - description: Install haproxy.service |
| 47 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 48 | -C 'I@haproxy:proxy' service.status haproxy |
| 49 | node_name: {{ HOSTNAME_CFG01 }} |
| 50 | retry: {count: 1, delay: 5} |
| 51 | skip_fail: false |
| 52 | |
| 53 | - description: Restart rsyslog on haproxy nodes |
| 54 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 55 | -C 'I@haproxy:proxy' service.restart rsyslog |
| 56 | node_name: {{ HOSTNAME_CFG01 }} |
| 57 | retry: {count: 1, delay: 5} |
| 58 | skip_fail: false |