blob: 58739fb35a222e7573db7f211e75af29ed374374 [file] [log] [blame]
Tatyana Leontovichc8b8ca22017-05-19 13:37:05 +03001{% from 'virtual-mcp11-k8s-calico/underlay.yaml' import HOSTNAME_CFG01 with context %}
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +02002
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 Golovatiuk57bb8e72017-05-16 19:49:49 +020017- 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 Leontovich5acc82a2017-05-23 15:41:35 +030045# Isntall SL core services
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030046#- 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 Leontovich5acc82a2017-05-23 15:41:35 +030052
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030053#- 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 Dmitrieva95a6d42017-10-24 15:09:04 +030057# retry: {count: 2, delay: 5}
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030058# skip_fail: false
Tatyana Leontovich5acc82a2017-05-23 15:41:35 +030059
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030060#- 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 Leontovich5acc82a2017-05-23 15:41:35 +030066
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030067#- 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 Leontovich5acc82a2017-05-23 15:41:35 +030073
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