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