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 | |
Victor Ryzhenkin | d93a448 | 2018-04-09 15:20:42 +0400 | [diff] [blame] | 10 | - description: Install docker |
Tatyana Leontovich | 7ee25f3 | 2017-07-31 19:47:52 +0300 | [diff] [blame] | 11 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Victor Ryzhenkin | d93a448 | 2018-04-09 15:20:42 +0400 | [diff] [blame] | 12 | -C 'I@docker:host' state.sls docker.host |
| 13 | node_name: {{ HOSTNAME_CFG01 }} |
| 14 | retry: {count: 1, delay: 5} |
| 15 | skip_fail: false |
| 16 | |
| 17 | - description: Check docker |
| 18 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 19 | -C 'I@docker:host' cmd.run 'docker ps' |
| 20 | node_name: {{ HOSTNAME_CFG01 }} |
| 21 | retry: {count: 1, delay: 5} |
| 22 | skip_fail: false |
| 23 | |
| 24 | - description: Install keepalived on primary controller |
| 25 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 26 | -C 'I@keepalived:cluster and *01*' state.sls keepalived |
Tatyana Leontovich | 7ee25f3 | 2017-07-31 19:47:52 +0300 | [diff] [blame] | 27 | node_name: {{ HOSTNAME_CFG01 }} |
| 28 | retry: {count: 1, delay: 10} |
| 29 | skip_fail: true |
| 30 | |
Victor Ryzhenkin | d93a448 | 2018-04-09 15:20:42 +0400 | [diff] [blame] | 31 | - description: Install keepalived on all controllers |
| 32 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 33 | -C 'I@keepalived:cluster' state.sls keepalived |
| 34 | node_name: {{ HOSTNAME_CFG01 }} |
| 35 | retry: {count: 1, delay: 10} |
| 36 | skip_fail: true |
| 37 | |
| 38 | - description: Install RabbitMQ |
| 39 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 40 | -C 'I@rabbitmq:server' state.sls rabbitmq |
| 41 | node_name: {{ HOSTNAME_CFG01 }} |
| 42 | retry: {count: 2, delay: 10} |
| 43 | skip_fail: false |
| 44 | |
| 45 | - description: Check RabbitMQ |
| 46 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 47 | -C 'I@rabbitmq:server' cmd.run "rabbitmqctl cluster_status" |
| 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 1, delay: 10} |
| 50 | skip_fail: false |
| 51 | |
Tatyana Leontovich | 7ee25f3 | 2017-07-31 19:47:52 +0300 | [diff] [blame] | 52 | - description: Install haproxy |
| 53 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 54 | -C 'I@haproxy:proxy' state.sls haproxy |
| 55 | node_name: {{ HOSTNAME_CFG01 }} |
| 56 | retry: {count: 1, delay: 5} |
| 57 | skip_fail: false |
| 58 | |
| 59 | - description: Check haproxy service |
| 60 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 61 | -C 'I@haproxy:proxy' service.status haproxy |
| 62 | node_name: {{ HOSTNAME_CFG01 }} |
| 63 | retry: {count: 1, delay: 5} |
| 64 | skip_fail: false |
| 65 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 66 | #- description: Install glusterfs |
| 67 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 68 | # -C 'I@glusterfs:server' state.sls glusterfs.server.service |
| 69 | # node_name: {{ HOSTNAME_CFG01 }} |
| 70 | # retry: {count: 1, delay: 5} |
| 71 | # skip_fail: false |
Tatyana Leontovich | 508d0cb | 2017-05-26 15:46:24 +0300 | [diff] [blame] | 72 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 73 | #- description: Setup glusterfs on primary controller |
| 74 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 75 | # -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1 |
| 76 | # node_name: {{ HOSTNAME_CFG01 }} |
Dennis Dmitriev | a95a6d4 | 2017-10-24 15:09:04 +0300 | [diff] [blame] | 77 | # retry: {count: 2, delay: 5} |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 78 | # skip_fail: false |
Tatyana Leontovich | 508d0cb | 2017-05-26 15:46:24 +0300 | [diff] [blame] | 79 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 80 | #- description: Check the gluster status |
| 81 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 82 | # -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1 |
| 83 | # node_name: {{ HOSTNAME_CFG01 }} |
| 84 | # retry: {count: 1, delay: 5} |
| 85 | # skip_fail: false |
Tatyana Leontovich | 508d0cb | 2017-05-26 15:46:24 +0300 | [diff] [blame] | 86 | |
Tatyana Leontovich | 1afa89e | 2017-07-31 18:48:50 +0300 | [diff] [blame] | 87 | # Isntall SL core services |
| 88 | |
Dennis Dmitriev | 4f552f2 | 2017-09-13 12:26:46 +0300 | [diff] [blame] | 89 | #- description: Install gluserfs client |
| 90 | # cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 91 | # -C 'I@glusterfs:client' state.sls glusterfs.client |
| 92 | # node_name: {{ HOSTNAME_CFG01 }} |
| 93 | # retry: {count: 1, delay: 5} |
| 94 | # skip_fail: false |
Tatyana Leontovich | 1afa89e | 2017-07-31 18:48:50 +0300 | [diff] [blame] | 95 | |
| 96 | - description: Install Galera on first server |
| 97 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 98 | -C 'I@galera:master' state.sls galera |
| 99 | node_name: {{ HOSTNAME_CFG01 }} |
| 100 | retry: {count: 1, delay: 5} |
| 101 | skip_fail: false |
| 102 | |
| 103 | - description: Install Galera on other servers |
| 104 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
Dennis Dmitriev | c6f858c | 2018-03-13 22:45:22 +0200 | [diff] [blame] | 105 | -C 'I@galera:slave' state.sls galera -b 1 |
Tatyana Leontovich | 1afa89e | 2017-07-31 18:48:50 +0300 | [diff] [blame] | 106 | node_name: {{ HOSTNAME_CFG01 }} |
| 107 | retry: {count: 1, delay: 5} |
| 108 | skip_fail: false |
| 109 | |
| 110 | - description: Check mysql status |
| 111 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 112 | -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size" |
| 113 | node_name: {{ HOSTNAME_CFG01 }} |
| 114 | retry: {count: 1, delay: 5} |
| 115 | skip_fail: false |
| 116 | |
| 117 | - description: Install nginx |
| 118 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 119 | -C 'I@nginx:server' state.sls nginx |
| 120 | node_name: {{ HOSTNAME_CFG01 }} |
| 121 | retry: {count: 1, delay: 5} |
| 122 | skip_fail: false |
Tatyana Leontovich | 0690eae | 2017-08-01 13:07:57 +0300 | [diff] [blame] | 123 | |
| 124 | - description: Restart rsyslog |
| 125 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 126 | -C 'I@haproxy:proxy' service.restart rsyslog |
| 127 | node_name: {{ HOSTNAME_CFG01 }} |
| 128 | retry: {count: 1, delay: 5} |
| 129 | skip_fail: false |
| 130 | |