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 | 7ee25f3 | 2017-07-31 19:47:52 +0300 | [diff] [blame] | 10 | - description: Install keepalived |
| 11 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 12 | -C 'I@keepalived:cluster' state.sls keepalived -b 1 |
| 13 | node_name: {{ HOSTNAME_CFG01 }} |
| 14 | retry: {count: 1, delay: 10} |
| 15 | skip_fail: true |
| 16 | |
| 17 | - description: Install haproxy |
| 18 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 19 | -C 'I@haproxy:proxy' state.sls haproxy |
| 20 | node_name: {{ HOSTNAME_CFG01 }} |
| 21 | retry: {count: 1, delay: 5} |
| 22 | skip_fail: false |
| 23 | |
| 24 | - description: Check haproxy service |
| 25 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 26 | -C 'I@haproxy:proxy' service.status haproxy |
| 27 | node_name: {{ HOSTNAME_CFG01 }} |
| 28 | retry: {count: 1, delay: 5} |
| 29 | skip_fail: false |
| 30 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 31 | #- description: Install glusterfs |
| 32 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 33 | # -C 'I@glusterfs:server' state.sls glusterfs.server.service |
| 34 | # node_name: {{ HOSTNAME_CFG01 }} |
| 35 | # retry: {count: 1, delay: 5} |
| 36 | # skip_fail: false |
Tatyana Leontovich | 508d0cb | 2017-05-26 15:46:24 +0300 | [diff] [blame] | 37 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 38 | #- description: Setup glusterfs on primary controller |
| 39 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 40 | # -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1 |
| 41 | # node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | a95a6d4 | 2017-10-24 15:09:04 +0300 | [diff] [blame] | 42 | # retry: {count: 2, delay: 5} |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 43 | # skip_fail: false |
Tatyana Leontovich | 508d0cb | 2017-05-26 15:46:24 +0300 | [diff] [blame] | 44 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 45 | #- description: Check the gluster status |
| 46 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 47 | # -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1 |
| 48 | # node_name: {{ HOSTNAME_CFG01 }} |
| 49 | # retry: {count: 1, delay: 5} |
| 50 | # skip_fail: false |
Tatyana Leontovich | 508d0cb | 2017-05-26 15:46:24 +0300 | [diff] [blame] | 51 | |
Tatyana Leontovich | 1afa89e | 2017-07-31 18:48:50 +0300 | [diff] [blame] | 52 | # Isntall SL core services |
| 53 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 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 |
Tatyana Leontovich | 1afa89e | 2017-07-31 18:48:50 +0300 | [diff] [blame] | 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 |
Tatyana Leontovich | 0690eae | 2017-08-01 13:07:57 +0300 | [diff] [blame] | 88 | |
| 89 | - description: Restart rsyslog |
| 90 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 91 | -C 'I@haproxy:proxy' service.restart rsyslog |
| 92 | node_name: {{ HOSTNAME_CFG01 }} |
| 93 | retry: {count: 1, delay: 5} |
| 94 | skip_fail: false |
| 95 | |