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