blob: 840134d00ecc4be47217258ebc743df7542c2039 [file] [log] [blame]
Tatyana Leontovichbb6d1a72017-05-17 14:10:38 +03001{% 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 Golovatiuk8f679ab2017-06-02 13:13:53 +02007 retry: {count: 1, delay: 5}
Tatyana Leontovichbb6d1a72017-05-17 14:10:38 +03008 skip_fail: true
9
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040010- description: Install docker
Tatyana Leontovich7ee25f32017-07-31 19:47:52 +030011 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040012 -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 Leontovich7ee25f32017-07-31 19:47:52 +030027 node_name: {{ HOSTNAME_CFG01 }}
28 retry: {count: 1, delay: 10}
29 skip_fail: true
30
Victor Ryzhenkind93a4482018-04-09 15:20:42 +040031- 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 Leontovich7ee25f32017-07-31 19:47:52 +030052- 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 Dmitriev4f552f22017-09-13 12:26:46 +030066#- 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 Leontovich508d0cb2017-05-26 15:46:24 +030072
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030073#- 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 Dmitrieva95a6d42017-10-24 15:09:04 +030077# retry: {count: 2, delay: 5}
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030078# skip_fail: false
Tatyana Leontovich508d0cb2017-05-26 15:46:24 +030079
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030080#- 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 Leontovich508d0cb2017-05-26 15:46:24 +030086
Tatyana Leontovich1afa89e2017-07-31 18:48:50 +030087# Isntall SL core services
88
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030089#- 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 Leontovich1afa89e2017-07-31 18:48:50 +030095
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 Dmitrievc6f858c2018-03-13 22:45:22 +0200105 -C 'I@galera:slave' state.sls galera -b 1
Tatyana Leontovich1afa89e2017-07-31 18:48:50 +0300106 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 Leontovich0690eae2017-08-01 13:07:57 +0300123
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