Dmitry Tyzhnenko | 34595f8 | 2018-06-12 19:03:12 +0300 | [diff] [blame] | 1 | {% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | {% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_KVM01 with context %} |
| 3 | {% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_KVM02 with context %} |
| 4 | {% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_KVM03 with context %} |
| 5 | {% from 'cookied-bm-mcp-pike-k8s-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 6 | |
| 7 | # Install support services |
| 8 | - description: Create and distribute SSL certificates for services using salt state |
| 9 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt |
| 10 | node_name: {{ HOSTNAME_CFG01 }} |
| 11 | retry: {count: 1, delay: 5} |
| 12 | skip_fail: true |
| 13 | |
| 14 | - description: Install docker |
| 15 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 16 | -C 'I@docker:host' state.sls docker.host |
| 17 | node_name: {{ HOSTNAME_CFG01 }} |
| 18 | retry: {count: 1, delay: 5} |
| 19 | skip_fail: false |
| 20 | |
| 21 | - description: Check docker |
| 22 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 23 | -C 'I@docker:host' cmd.run 'docker ps' |
| 24 | node_name: {{ HOSTNAME_CFG01 }} |
| 25 | retry: {count: 1, delay: 5} |
| 26 | skip_fail: false |
| 27 | |
| 28 | - description: Install keepalived on primary controller |
| 29 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 30 | -C 'I@keepalived:cluster and *01*' state.sls keepalived |
| 31 | node_name: {{ HOSTNAME_CFG01 }} |
| 32 | retry: {count: 1, delay: 10} |
| 33 | skip_fail: true |
| 34 | |
| 35 | - description: Install keepalived |
| 36 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 37 | -C 'I@keepalived:cluster' state.sls keepalived |
| 38 | node_name: {{ HOSTNAME_CFG01 }} |
| 39 | retry: {count: 1, delay: 10} |
| 40 | skip_fail: true |
| 41 | |
| 42 | - description: Install RabbitMQ |
| 43 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 44 | -C 'I@rabbitmq:server' state.sls rabbitmq |
| 45 | node_name: {{ HOSTNAME_CFG01 }} |
| 46 | retry: {count: 2, delay: 10} |
| 47 | skip_fail: false |
| 48 | |
| 49 | - description: Check RabbitMQ |
| 50 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 51 | -C 'I@rabbitmq:server' cmd.run "rabbitmqctl cluster_status" |
| 52 | node_name: {{ HOSTNAME_CFG01 }} |
| 53 | retry: {count: 1, delay: 10} |
| 54 | skip_fail: false |
| 55 | |
| 56 | - description: Install haproxy |
| 57 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 58 | -C 'I@haproxy:proxy' state.sls haproxy |
| 59 | node_name: {{ HOSTNAME_CFG01 }} |
| 60 | retry: {count: 1, delay: 5} |
| 61 | skip_fail: false |
| 62 | |
| 63 | - description: Check haproxy service |
| 64 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 65 | -C 'I@haproxy:proxy' service.status haproxy |
| 66 | node_name: {{ HOSTNAME_CFG01 }} |
| 67 | retry: {count: 1, delay: 5} |
| 68 | skip_fail: false |
| 69 | |
| 70 | - description: Restart rsyslog |
| 71 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 72 | -C 'I@haproxy:proxy' service.restart rsyslog |
| 73 | node_name: {{ HOSTNAME_CFG01 }} |
| 74 | retry: {count: 1, delay: 5} |
| 75 | skip_fail: false |
| 76 | |