blob: 1be9ba13834f2c4c5a0f9dec0fa3954fce15e6be [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
Victor Ryzhenkin2a2cd8e2018-05-07 18:38:43 +04005 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*'
6 state.sls salt.minion.cert
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +02007 node_name: {{ HOSTNAME_CFG01 }}
8 retry: {count: 1, delay: 10}
9 skip_fail: true
10
Victor Ryzhenkin2a2cd8e2018-05-07 18:38:43 +040011- description: Install docker
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020012 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Victor Ryzhenkin2a2cd8e2018-05-07 18:38:43 +040013 -C 'I@docker:host' state.sls docker.host
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 3, delay: 5}
16 skip_fail: false
17
18- description: Check docker
19 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
20 -C 'I@docker:host' cmd.run 'docker ps'
21 node_name: {{ HOSTNAME_CFG01 }}
22 retry: {count: 1, delay: 5}
23 skip_fail: false
24
25- description: Install keepalived on first node
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
27 -C 'I@keepalived:cluster and *01*' state.sls keepalived
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 10}
30 skip_fail: true
31
32- description: Install keepalived on whole cluster
33 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
34 -C 'I@keepalived:cluster' state.sls keepalived
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020035 node_name: {{ HOSTNAME_CFG01 }}
36 retry: {count: 1, delay: 10}
37 skip_fail: true
38
Sergii Golovatiuk57bb8e72017-05-16 19:49:49 +020039- description: Install haproxy
40 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
41 -C 'I@haproxy:proxy' state.sls haproxy
42 node_name: {{ HOSTNAME_CFG01 }}
43 retry: {count: 1, delay: 5}
44 skip_fail: false
45
46- description: Install haproxy.service
47 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
48 -C 'I@haproxy:proxy' service.status haproxy
49 node_name: {{ HOSTNAME_CFG01 }}
50 retry: {count: 1, delay: 5}
51 skip_fail: false
52
Tatyana Leontovich5acc82a2017-05-23 15:41:35 +030053# Isntall SL core services
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030054#- description: Install glusterfs
55# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
56# -C 'I@glusterfs:server' state.sls glusterfs.server.service
57# node_name: {{ HOSTNAME_CFG01 }}
58# retry: {count: 1, delay: 5}
59# skip_fail: false
Tatyana Leontovich5acc82a2017-05-23 15:41:35 +030060
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030061#- description: Setup glusterfs on primary controller
62# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
63# -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
64# node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrieva95a6d42017-10-24 15:09:04 +030065# retry: {count: 2, delay: 5}
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030066# skip_fail: false
Tatyana Leontovich5acc82a2017-05-23 15:41:35 +030067
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030068#- description: Check the gluster status
69# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
70# -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
71# node_name: {{ HOSTNAME_CFG01 }}
72# retry: {count: 1, delay: 5}
73# skip_fail: false
Tatyana Leontovich5acc82a2017-05-23 15:41:35 +030074
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030075#- description: Install gluserfs client
76# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
77# -C 'I@glusterfs:client' state.sls glusterfs.client
78# node_name: {{ HOSTNAME_CFG01 }}
79# retry: {count: 1, delay: 5}
80# skip_fail: false
Tatyana Leontovich5acc82a2017-05-23 15:41:35 +030081
82- description: Install Galera on first server
83 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
84 -C 'I@galera:master' state.sls galera
85 node_name: {{ HOSTNAME_CFG01 }}
86 retry: {count: 1, delay: 5}
87 skip_fail: false
88
89- description: Install Galera on other servers
90 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Dennis Dmitrievc6f858c2018-03-13 22:45:22 +020091 -C 'I@galera:slave' state.sls galera -b 1
Tatyana Leontovich5acc82a2017-05-23 15:41:35 +030092 node_name: {{ HOSTNAME_CFG01 }}
93 retry: {count: 1, delay: 5}
94 skip_fail: false
95
96- description: Check mysql status
97 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
98 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
99 node_name: {{ HOSTNAME_CFG01 }}
100 retry: {count: 1, delay: 5}
101 skip_fail: false
102
103- description: Install nginx
104 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
105 -C 'I@nginx:server' state.sls nginx
106 node_name: {{ HOSTNAME_CFG01 }}
107 retry: {count: 1, delay: 5}
Dmitry Kalashnik2d6b89c2018-04-06 15:43:17 +0400108 skip_fail: false
109
110- description: Restart rsyslog for haproxy logs
111 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
112 -C 'I@haproxy:proxy' service.restart rsyslog
113 node_name: {{ HOSTNAME_CFG01 }}
114 retry: {count: 1, delay: 5}
115 skip_fail: false