Tatyana Leontovich | bb6d1a7 | 2017-05-17 14:10:38 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp11-k8s-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | |
| 3 | # Install support services |
| 4 | - description: Create and distribute SSL certificates for services using salt state |
| 5 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' state.sls salt |
| 6 | node_name: {{ HOSTNAME_CFG01 }} |
Sergii Golovatiuk | 8f679ab | 2017-06-02 13:13:53 +0200 | [diff] [blame] | 7 | retry: {count: 1, delay: 5} |
Tatyana Leontovich | bb6d1a7 | 2017-05-17 14:10:38 +0300 | [diff] [blame] | 8 | skip_fail: true |
| 9 | |
Tatyana Leontovich | 508d0cb | 2017-05-26 15:46:24 +0300 | [diff] [blame] | 10 | - description: Install glusterfs |
| 11 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 12 | -C 'I@glusterfs:server' state.sls glusterfs.server.service |
| 13 | node_name: {{ HOSTNAME_CFG01 }} |
| 14 | retry: {count: 1, delay: 5} |
| 15 | skip_fail: false |
| 16 | |
| 17 | - description: Setup glusterfs on primary controller |
| 18 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 19 | -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1 |
| 20 | node_name: {{ HOSTNAME_CFG01 }} |
| 21 | retry: {count: 1, delay: 5} |
| 22 | skip_fail: false |
| 23 | |
| 24 | - description: Check the gluster status |
| 25 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 26 | -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1 |
| 27 | node_name: {{ HOSTNAME_CFG01 }} |
| 28 | retry: {count: 1, delay: 5} |
| 29 | skip_fail: false |
| 30 | |
Tatyana Leontovich | bb6d1a7 | 2017-05-17 14:10:38 +0300 | [diff] [blame] | 31 | - description: Install haproxy |
| 32 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 33 | -C 'I@haproxy:proxy' state.sls haproxy |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
| 35 | retry: {count: 1, delay: 5} |
| 36 | skip_fail: false |
| 37 | |
Sergii Golovatiuk | 8f679ab | 2017-06-02 13:13:53 +0200 | [diff] [blame] | 38 | - description: Check haproxy service |
Tatyana Leontovich | bb6d1a7 | 2017-05-17 14:10:38 +0300 | [diff] [blame] | 39 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 40 | -C 'I@haproxy:proxy' service.status haproxy |
| 41 | node_name: {{ HOSTNAME_CFG01 }} |
| 42 | retry: {count: 1, delay: 5} |
| 43 | skip_fail: false |
| 44 | |
Sergii Golovatiuk | 8f679ab | 2017-06-02 13:13:53 +0200 | [diff] [blame] | 45 | - description: Restart rsyslog |
| 46 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 47 | -C 'I@haproxy:proxy' service.restart rsyslog |
| 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 1, delay: 5} |
| 50 | skip_fail: false |
Tatyana Leontovich | 1afa89e | 2017-07-31 18:48:50 +0300 | [diff] [blame^] | 51 | |
| 52 | # Isntall SL core services |
| 53 | |
| 54 | - description: Install gluserfs client |
| 55 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 56 | -C 'I@glusterfs:client' state.sls glusterfs.client |
| 57 | node_name: {{ HOSTNAME_CFG01 }} |
| 58 | retry: {count: 1, delay: 5} |
| 59 | skip_fail: false |
| 60 | |
| 61 | - description: Install Galera on first server |
| 62 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 63 | -C 'I@galera:master' state.sls galera |
| 64 | node_name: {{ HOSTNAME_CFG01 }} |
| 65 | retry: {count: 1, delay: 5} |
| 66 | skip_fail: false |
| 67 | |
| 68 | - description: Install Galera on other servers |
| 69 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 70 | -C 'I@galera:slave' state.sls galera |
| 71 | node_name: {{ HOSTNAME_CFG01 }} |
| 72 | retry: {count: 1, delay: 5} |
| 73 | skip_fail: false |
| 74 | |
| 75 | - description: Check mysql status |
| 76 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 77 | -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size" |
| 78 | node_name: {{ HOSTNAME_CFG01 }} |
| 79 | retry: {count: 1, delay: 5} |
| 80 | skip_fail: false |
| 81 | |
| 82 | - description: Install nginx |
| 83 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 84 | -C 'I@nginx:server' state.sls nginx |
| 85 | node_name: {{ HOSTNAME_CFG01 }} |
| 86 | retry: {count: 1, delay: 5} |
| 87 | skip_fail: false |