Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp10-ovs/map.jinja' import HOSTNAME_CFG01 with context %} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 2 | |
| 3 | # Install support services |
| 4 | |
| 5 | - description: Install keepalived |
| 6 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 7 | -C 'I@keepalived:cluster' state.sls keepalived -b 1 |
| 8 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 9 | retry: {count: 1, delay: 10} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 10 | skip_fail: true |
| 11 | |
| 12 | - description: Check the VIP |
| 13 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 14 | -C 'I@keepalived:cluster' cmd.run 'ip a | grep 172.16.10.2' | grep -B1 172.16.10.2 |
| 15 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 16 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 17 | skip_fail: false |
| 18 | |
| 19 | |
| 20 | - description: Install glusterfs |
| 21 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 22 | -C 'I@glusterfs:server' state.sls glusterfs.server.service |
| 23 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 24 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 25 | skip_fail: false |
| 26 | |
| 27 | - description: Setup glusterfs on primary controller |
| 28 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 29 | -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1 |
| 30 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | a95a6d4 | 2017-10-24 15:09:04 +0300 | [diff] [blame] | 31 | retry: {count: 2, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 32 | skip_fail: false |
| 33 | |
| 34 | - description: Check the gluster status |
| 35 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 36 | -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1 |
| 37 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 38 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 39 | skip_fail: false |
| 40 | |
| 41 | |
| 42 | - description: Install RabbitMQ |
| 43 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 44 | -C 'I@rabbitmq:server' state.sls rabbitmq |
| 45 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 46 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 47 | skip_fail: false |
| 48 | |
| 49 | - description: Check the rabbitmq status |
| 50 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 51 | -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status' |
| 52 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 53 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 54 | skip_fail: false |
| 55 | |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 56 | - description: Install Galera on first server |
| 57 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 58 | -C 'I@galera:master' state.sls galera |
| 59 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 60 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 61 | skip_fail: false |
| 62 | |
| 63 | - description: Install Galera on other servers |
| 64 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 65 | -C 'I@galera:slave' state.sls galera |
| 66 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 67 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 68 | skip_fail: false |
| 69 | |
| 70 | - description: Check mysql status |
| 71 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 72 | -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size" |
| 73 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 74 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 75 | skip_fail: true |
| 76 | |
| 77 | |
| 78 | - description: Install haproxy |
| 79 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 80 | -C 'I@haproxy:proxy' state.sls haproxy |
| 81 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 82 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 83 | skip_fail: false |
| 84 | |
| 85 | - description: Check haproxy status |
| 86 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 87 | -C 'I@haproxy:proxy' service.status haproxy |
| 88 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 89 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 90 | skip_fail: false |
| 91 | |
| 92 | - description: Restart rsyslog |
| 93 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 94 | -C 'I@haproxy:proxy' service.restart rsyslog |
| 95 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 96 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 97 | skip_fail: false |
| 98 | |
| 99 | - description: Install memcached on all controllers |
| 100 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 101 | -C 'I@memcached:server' state.sls memcached |
| 102 | node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | ab83ea4 | 2017-05-12 16:52:45 +0300 | [diff] [blame] | 103 | retry: {count: 1, delay: 5} |
dis | 2b2d863 | 2016-12-08 17:56:57 +0200 | [diff] [blame] | 104 | skip_fail: false |