Tatyana Leontovich | c8b8ca2 | 2017-05-19 13:37:05 +0300 | [diff] [blame] | 1 | {% from 'virtual-mcp11-k8s-calico/underlay.yaml' import HOSTNAME_CFG01 with context %} |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 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 }} |
| 7 | retry: {count: 1, delay: 10} |
| 8 | skip_fail: true |
| 9 | |
| 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 | |
Sergii Golovatiuk | 57bb8e7 | 2017-05-16 19:49:49 +0200 | [diff] [blame] | 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: Install 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 | |
| 31 | - description: Install docker |
| 32 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 33 | -C 'I@docker:host' state.sls docker.host |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
| 35 | retry: {count: 1, delay: 5} |
| 36 | skip_fail: false |
| 37 | |
| 38 | - description: Check docker |
| 39 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 40 | -C 'I@docker:host' cmd.run 'docker ps' |
| 41 | node_name: {{ HOSTNAME_CFG01 }} |
| 42 | retry: {count: 1, delay: 5} |
| 43 | skip_fail: false |
| 44 | |
Tatyana Leontovich | 5acc82a | 2017-05-23 15:41:35 +0300 | [diff] [blame] | 45 | # Isntall SL core services |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 46 | #- description: Install glusterfs |
| 47 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 48 | # -C 'I@glusterfs:server' state.sls glusterfs.server.service |
| 49 | # node_name: {{ HOSTNAME_CFG01 }} |
| 50 | # retry: {count: 1, delay: 5} |
| 51 | # skip_fail: false |
Tatyana Leontovich | 5acc82a | 2017-05-23 15:41:35 +0300 | [diff] [blame] | 52 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 53 | #- description: Setup glusterfs on primary controller |
| 54 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 55 | # -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1 |
| 56 | # node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | a95a6d4 | 2017-10-24 15:09:04 +0300 | [diff] [blame] | 57 | # retry: {count: 2, delay: 5} |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 58 | # skip_fail: false |
Tatyana Leontovich | 5acc82a | 2017-05-23 15:41:35 +0300 | [diff] [blame] | 59 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 60 | #- description: Check the gluster status |
| 61 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 62 | # -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1 |
| 63 | # node_name: {{ HOSTNAME_CFG01 }} |
| 64 | # retry: {count: 1, delay: 5} |
| 65 | # skip_fail: false |
Tatyana Leontovich | 5acc82a | 2017-05-23 15:41:35 +0300 | [diff] [blame] | 66 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 67 | #- description: Install gluserfs client |
| 68 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 69 | # -C 'I@glusterfs:client' state.sls glusterfs.client |
| 70 | # node_name: {{ HOSTNAME_CFG01 }} |
| 71 | # retry: {count: 1, delay: 5} |
| 72 | # skip_fail: false |
Tatyana Leontovich | 5acc82a | 2017-05-23 15:41:35 +0300 | [diff] [blame] | 73 | |
| 74 | - description: Install Galera on first server |
| 75 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 76 | -C 'I@galera:master' state.sls galera |
| 77 | node_name: {{ HOSTNAME_CFG01 }} |
| 78 | retry: {count: 1, delay: 5} |
| 79 | skip_fail: false |
| 80 | |
| 81 | - description: Install Galera on other servers |
| 82 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 83 | -C 'I@galera:slave' state.sls galera |
| 84 | node_name: {{ HOSTNAME_CFG01 }} |
| 85 | retry: {count: 1, delay: 5} |
| 86 | skip_fail: false |
| 87 | |
| 88 | - description: Check mysql status |
| 89 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 90 | -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size" |
| 91 | node_name: {{ HOSTNAME_CFG01 }} |
| 92 | retry: {count: 1, delay: 5} |
| 93 | skip_fail: false |
| 94 | |
| 95 | - description: Install nginx |
| 96 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 97 | -C 'I@nginx:server' state.sls nginx |
| 98 | node_name: {{ HOSTNAME_CFG01 }} |
| 99 | retry: {count: 1, delay: 5} |
| 100 | skip_fail: false |