Dennis Dmitriev | 411dd10 | 2017-09-15 16:04:47 +0300 | [diff] [blame] | 1 | {% from 'cookied-mcp-ocata-dop-sl2/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | |
Dennis Dmitriev | c035c24 | 2017-10-06 17:12:08 +0300 | [diff] [blame] | 3 | - description: Refresh grains |
| 4 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt.minion.grains |
| 5 | node_name: {{ HOSTNAME_CFG01 }} |
| 6 | retry: {count: 1, delay: 15} |
| 7 | skip_fail: false |
| 8 | |
Dennis Dmitriev | 411dd10 | 2017-09-15 16:04:47 +0300 | [diff] [blame] | 9 | # Install support services |
| 10 | - description: Install keepalived on ctl01 |
| 11 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 12 | -C 'I@keepalived:cluster and *01*' state.sls keepalived |
| 13 | node_name: {{ HOSTNAME_CFG01 }} |
| 14 | retry: {count: 1, delay: 10} |
| 15 | skip_fail: true |
| 16 | |
| 17 | - description: Install keepalived |
| 18 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 19 | -C 'I@keepalived:cluster' state.sls keepalived |
| 20 | node_name: {{ HOSTNAME_CFG01 }} |
| 21 | retry: {count: 1, delay: 10} |
| 22 | skip_fail: true |
| 23 | |
Dennis Dmitriev | 411dd10 | 2017-09-15 16:04:47 +0300 | [diff] [blame] | 24 | - description: Install glusterfs |
| 25 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 26 | -C 'I@glusterfs:server' state.sls glusterfs.server.service |
| 27 | node_name: {{ HOSTNAME_CFG01 }} |
| 28 | retry: {count: 1, delay: 5} |
| 29 | skip_fail: false |
| 30 | |
| 31 | - description: Setup glusterfs on primary controller |
| 32 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 33 | -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1 |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | a95a6d4 | 2017-10-24 15:09:04 +0300 | [diff] [blame] | 35 | retry: {count: 2, delay: 5} |
Dennis Dmitriev | 411dd10 | 2017-09-15 16:04:47 +0300 | [diff] [blame] | 36 | skip_fail: false |
| 37 | |
| 38 | - description: Check the gluster status |
| 39 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 40 | -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1 |
| 41 | node_name: {{ HOSTNAME_CFG01 }} |
| 42 | retry: {count: 1, delay: 5} |
| 43 | skip_fail: false |
| 44 | |
| 45 | - description: Install RabbitMQ on ctl01 |
| 46 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 47 | -C 'I@rabbitmq:server and *01*' state.sls rabbitmq |
| 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 1, delay: 5} |
| 50 | skip_fail: false |
| 51 | |
| 52 | - description: Install RabbitMQ |
| 53 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 54 | -C 'I@rabbitmq:server' state.sls rabbitmq |
| 55 | node_name: {{ HOSTNAME_CFG01 }} |
| 56 | retry: {count: 1, delay: 5} |
| 57 | skip_fail: false |
| 58 | |
| 59 | - description: Check the rabbitmq status |
| 60 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 61 | -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status' |
| 62 | node_name: {{ HOSTNAME_CFG01 }} |
| 63 | retry: {count: 1, delay: 5} |
| 64 | skip_fail: false |
| 65 | |
| 66 | - description: Install Galera on first server |
| 67 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 68 | -C 'I@galera:master' state.sls galera |
| 69 | node_name: {{ HOSTNAME_CFG01 }} |
| 70 | retry: {count: 1, delay: 5} |
| 71 | skip_fail: false |
| 72 | |
| 73 | - description: Install Galera on other servers |
| 74 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Dennis Dmitriev | c6f858c | 2018-03-13 22:45:22 +0200 | [diff] [blame] | 75 | -C 'I@galera:slave' state.sls galera -b 1 |
Dennis Dmitriev | 411dd10 | 2017-09-15 16:04:47 +0300 | [diff] [blame] | 76 | node_name: {{ HOSTNAME_CFG01 }} |
| 77 | retry: {count: 1, delay: 5} |
| 78 | skip_fail: false |
| 79 | |
| 80 | - description: Check mysql status |
| 81 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 82 | -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size" |
| 83 | node_name: {{ HOSTNAME_CFG01 }} |
| 84 | retry: {count: 1, delay: 5} |
| 85 | skip_fail: true |
| 86 | |
| 87 | |
| 88 | - description: Install haproxy |
| 89 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 90 | -C 'I@haproxy:proxy' state.sls haproxy |
| 91 | node_name: {{ HOSTNAME_CFG01 }} |
| 92 | retry: {count: 1, delay: 5} |
| 93 | skip_fail: false |
| 94 | |
| 95 | - description: Check haproxy status |
| 96 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 97 | -C 'I@haproxy:proxy' service.status haproxy |
| 98 | node_name: {{ HOSTNAME_CFG01 }} |
| 99 | retry: {count: 1, delay: 5} |
| 100 | skip_fail: false |
| 101 | |
| 102 | - description: Install nginx on prx nodes |
| 103 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 104 | -C 'I@nginx:server' state.sls nginx |
| 105 | node_name: {{ HOSTNAME_CFG01 }} |
| 106 | retry: {count: 1, delay: 5} |
| 107 | skip_fail: false |
| 108 | |
| 109 | - description: Restart rsyslog |
| 110 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 111 | -C 'I@haproxy:proxy' service.restart rsyslog |
| 112 | node_name: {{ HOSTNAME_CFG01 }} |
| 113 | retry: {count: 1, delay: 5} |
| 114 | skip_fail: false |
| 115 | |
| 116 | - description: Install memcached on all controllers |
| 117 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 118 | -C 'I@memcached:server' state.sls memcached |
| 119 | node_name: {{ HOSTNAME_CFG01 }} |
| 120 | retry: {count: 1, delay: 5} |
| 121 | skip_fail: false |
Dennis Dmitriev | 89ba031 | 2018-05-22 14:05:04 +0300 | [diff] [blame] | 122 | |
| 123 | - description: Check the OpenStack control VIP |
| 124 | cmd: | |
| 125 | OPENSTACK_CONTROL_ADDRESS=$(salt --out=newline_values_only "ctl01*" pillar.get _param:cluster_vip_address); |
| 126 | echo "_param:cluster_vip_address (vip): ${OPENSTACK_CONTROL_ADDRESS}"; |
| 127 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@keepalived:cluster' cmd.run "ip a | grep ${OPENSTACK_CONTROL_ADDRESS}" | grep -B1 ${OPENSTACK_CONTROL_ADDRESS} |
| 128 | node_name: {{ HOSTNAME_CFG01 }} |
| 129 | retry: {count: 3, delay: 10} |
| 130 | skip_fail: false |