Tatyana Leontovich | d8bf14f | 2017-04-19 12:20:50 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp-ocata-dvr.jinja' import HOSTNAME_CFG01 with context %} |
| 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 |
| 19 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 20 | -C 'I@keepalived:cluster' cmd.run 'ip a | grep 172.16.10.2' | grep -B1 172.16.10.2 |
| 21 | node_name: {{ HOSTNAME_CFG01 }} |
| 22 | retry: {count: 1, delay: 5} |
| 23 | skip_fail: false |
| 24 | |
| 25 | |
| 26 | - description: Install glusterfs |
| 27 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 28 | -C 'I@glusterfs:server' state.sls glusterfs.server.service |
| 29 | node_name: {{ HOSTNAME_CFG01 }} |
| 30 | retry: {count: 1, delay: 5} |
| 31 | skip_fail: false |
| 32 | |
| 33 | - description: Setup glusterfs on primary controller |
| 34 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 35 | -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1 |
| 36 | node_name: {{ HOSTNAME_CFG01 }} |
| 37 | retry: {count: 1, delay: 5} |
| 38 | skip_fail: false |
| 39 | |
| 40 | - description: Check the gluster status |
| 41 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 42 | -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1 |
| 43 | node_name: {{ HOSTNAME_CFG01 }} |
| 44 | retry: {count: 1, delay: 5} |
| 45 | skip_fail: false |
| 46 | |
Tatyana Leontovich | 86851a2 | 2017-04-25 21:25:26 +0300 | [diff] [blame] | 47 | - description: Install RabbitMQ on ctl01 |
| 48 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 49 | -C 'I@rabbitmq:server and *01*' state.sls rabbitmq |
| 50 | node_name: {{ HOSTNAME_CFG01 }} |
| 51 | retry: {count: 1, delay: 5} |
| 52 | skip_fail: false |
Tatyana Leontovich | d8bf14f | 2017-04-19 12:20:50 +0300 | [diff] [blame] | 53 | |
| 54 | - description: Install RabbitMQ |
| 55 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Tatyana Leontovich | 86851a2 | 2017-04-25 21:25:26 +0300 | [diff] [blame] | 56 | -C 'I@rabbitmq:server' state.sls rabbitmq |
Tatyana Leontovich | d8bf14f | 2017-04-19 12:20:50 +0300 | [diff] [blame] | 57 | node_name: {{ HOSTNAME_CFG01 }} |
| 58 | retry: {count: 1, delay: 5} |
| 59 | skip_fail: false |
| 60 | |
| 61 | - description: Check the rabbitmq status |
| 62 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 63 | -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status' |
| 64 | node_name: {{ HOSTNAME_CFG01 }} |
| 65 | retry: {count: 1, delay: 5} |
| 66 | skip_fail: false |
| 67 | |
| 68 | - description: Install Galera on first server |
| 69 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 70 | -C 'I@galera:master' state.sls galera |
| 71 | node_name: {{ HOSTNAME_CFG01 }} |
| 72 | retry: {count: 1, delay: 5} |
| 73 | skip_fail: false |
| 74 | |
| 75 | - description: Install Galera on other servers |
| 76 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 77 | -C 'I@galera:slave' state.sls galera |
| 78 | node_name: {{ HOSTNAME_CFG01 }} |
| 79 | retry: {count: 1, delay: 5} |
| 80 | skip_fail: false |
| 81 | |
| 82 | - description: Check mysql status |
| 83 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 84 | -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size" |
| 85 | node_name: {{ HOSTNAME_CFG01 }} |
| 86 | retry: {count: 1, delay: 5} |
| 87 | skip_fail: true |
| 88 | |
| 89 | |
| 90 | - description: Install haproxy |
| 91 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 92 | -C 'I@haproxy:proxy' state.sls haproxy |
| 93 | node_name: {{ HOSTNAME_CFG01 }} |
| 94 | retry: {count: 1, delay: 5} |
| 95 | skip_fail: false |
| 96 | |
| 97 | - description: Check haproxy status |
| 98 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 99 | -C 'I@haproxy:proxy' service.status haproxy |
| 100 | node_name: {{ HOSTNAME_CFG01 }} |
| 101 | retry: {count: 1, delay: 5} |
| 102 | skip_fail: false |
| 103 | |
| 104 | - description: Restart rsyslog |
| 105 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 106 | -C 'I@haproxy:proxy' service.restart rsyslog |
| 107 | node_name: {{ HOSTNAME_CFG01 }} |
| 108 | retry: {count: 1, delay: 5} |
| 109 | skip_fail: false |
| 110 | |
| 111 | - description: Install memcached on all controllers |
| 112 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 113 | -C 'I@memcached:server' state.sls memcached |
| 114 | node_name: {{ HOSTNAME_CFG01 }} |
| 115 | retry: {count: 1, delay: 5} |
| 116 | skip_fail: false |