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