blob: d21f1664b8730f2c5ea38486779f375f82821fbf [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
Tatyana Leontovich7ee25f32017-07-31 19:47:52 +030010- 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
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: Check 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
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030031#- description: Install glusterfs
32# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
33# -C 'I@glusterfs:server' state.sls glusterfs.server.service
34# node_name: {{ HOSTNAME_CFG01 }}
35# retry: {count: 1, delay: 5}
36# skip_fail: false
Tatyana Leontovich508d0cb2017-05-26 15:46:24 +030037
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030038#- description: Setup glusterfs on primary controller
39# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
40# -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
41# node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrieva95a6d42017-10-24 15:09:04 +030042# retry: {count: 2, delay: 5}
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030043# skip_fail: false
Tatyana Leontovich508d0cb2017-05-26 15:46:24 +030044
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030045#- description: Check the gluster status
46# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
47# -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
48# node_name: {{ HOSTNAME_CFG01 }}
49# retry: {count: 1, delay: 5}
50# skip_fail: false
Tatyana Leontovich508d0cb2017-05-26 15:46:24 +030051
Tatyana Leontovich1afa89e2017-07-31 18:48:50 +030052# Isntall SL core services
53
Dennis Dmitriev4f552f22017-09-13 12:26:46 +030054#- description: Install gluserfs client
55# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
56# -C 'I@glusterfs:client' state.sls glusterfs.client
57# node_name: {{ HOSTNAME_CFG01 }}
58# retry: {count: 1, delay: 5}
59# skip_fail: false
Tatyana Leontovich1afa89e2017-07-31 18:48:50 +030060
61- description: Install Galera on first server
62 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
63 -C 'I@galera:master' state.sls galera
64 node_name: {{ HOSTNAME_CFG01 }}
65 retry: {count: 1, delay: 5}
66 skip_fail: false
67
68- description: Install Galera on other servers
69 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
Dennis Dmitrievc6f858c2018-03-13 22:45:22 +020070 -C 'I@galera:slave' state.sls galera -b 1
Tatyana Leontovich1afa89e2017-07-31 18:48:50 +030071 node_name: {{ HOSTNAME_CFG01 }}
72 retry: {count: 1, delay: 5}
73 skip_fail: false
74
75- description: Check mysql status
76 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
77 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
78 node_name: {{ HOSTNAME_CFG01 }}
79 retry: {count: 1, delay: 5}
80 skip_fail: false
81
82- description: Install nginx
83 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
84 -C 'I@nginx:server' state.sls nginx
85 node_name: {{ HOSTNAME_CFG01 }}
86 retry: {count: 1, delay: 5}
87 skip_fail: false
Tatyana Leontovich0690eae2017-08-01 13:07:57 +030088
89- description: Restart rsyslog
90 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
91 -C 'I@haproxy:proxy' service.restart rsyslog
92 node_name: {{ HOSTNAME_CFG01 }}
93 retry: {count: 1, delay: 5}
94 skip_fail: false
95