blob: 0c3ef93467b6e9c30cbb3519fbdc751812676bff [file] [log] [blame]
sgudz8c888ec2017-10-02 15:29:23 +03001{% from 'cookied-bm-mcp-ocata-contrail/underlay.yaml' import HOSTNAME_CFG01 with context %}
2
3# Install support services
4- description: Install keepalived on ctl01
5 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
6 -C 'I@keepalived:cluster and *01*' state.sls keepalived
7 node_name: {{ HOSTNAME_CFG01 }}
8 retry: {count: 1, delay: 10}
9 skip_fail: true
10
11- description: Install keepalived
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
13 -C 'I@keepalived:cluster' state.sls keepalived
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 1, delay: 10}
16 skip_fail: true
17
18- description: Check the OpenStack control VIP
19 cmd: |
20 OPENSTACK_CONTROL_ADDRESS=$(salt --out=newline_values_only "ctl01*" pillar.get _param:cluster_vip_address);
21 echo "_param:cluster_vip_address (vip): ${OPENSTACK_CONTROL_ADDRESS}";
22 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@keepalived:cluster' cmd.run "ip a | grep ${OPENSTACK_CONTROL_ADDRESS}" | grep -B1 ${OPENSTACK_CONTROL_ADDRESS}
23 node_name: {{ HOSTNAME_CFG01 }}
24 retry: {count: 1, delay: 5}
25 skip_fail: false
26
27
28- description: Install glusterfs
29 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
30 -C 'I@glusterfs:server' state.sls glusterfs.server.service
31 node_name: {{ HOSTNAME_CFG01 }}
32 retry: {count: 1, delay: 5}
33 skip_fail: false
34
35- description: Setup glusterfs on primary controller
36 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
37 -C 'I@glusterfs:server' state.sls glusterfs.server.setup -b 1
38 node_name: {{ HOSTNAME_CFG01 }}
Dennis Dmitrieva95a6d42017-10-24 15:09:04 +030039 retry: {count: 2, delay: 5}
sgudz8c888ec2017-10-02 15:29:23 +030040 skip_fail: false
41
42- description: Check the gluster status
43 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
44 -C 'I@glusterfs:server' cmd.run 'gluster peer status; gluster volume status' -b 1
45 node_name: {{ HOSTNAME_CFG01 }}
46 retry: {count: 1, delay: 5}
47 skip_fail: false
48
49- description: Install RabbitMQ on ctl01
50 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
51 -C 'I@rabbitmq:server and *01*' state.sls rabbitmq
52 node_name: {{ HOSTNAME_CFG01 }}
53 retry: {count: 1, delay: 5}
54 skip_fail: false
55
56- description: Install RabbitMQ
57 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
58 -C 'I@rabbitmq:server' state.sls rabbitmq
59 node_name: {{ HOSTNAME_CFG01 }}
60 retry: {count: 1, delay: 5}
61 skip_fail: false
62
63- description: Check the rabbitmq status
64 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
65 -C 'I@rabbitmq:server' cmd.run 'rabbitmqctl cluster_status'
66 node_name: {{ HOSTNAME_CFG01 }}
67 retry: {count: 1, delay: 5}
68 skip_fail: false
69
70- description: Install Galera on first server
71 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
72 -C 'I@galera:master' state.sls galera
73 node_name: {{ HOSTNAME_CFG01 }}
74 retry: {count: 1, delay: 5}
75 skip_fail: false
76
77- description: Install Galera on other servers
78 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
79 -C 'I@galera:slave' state.sls galera
80 node_name: {{ HOSTNAME_CFG01 }}
81 retry: {count: 1, delay: 5}
82 skip_fail: false
83
84- description: Check mysql status
85 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
86 -C 'I@galera:*' mysql.status | grep -A1 -e "wsrep_incoming_addresses\|wsrep_cluster_size"
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 1, delay: 5}
89 skip_fail: true
90
91
92- description: Install haproxy
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
94 -C 'I@haproxy:proxy' state.sls haproxy
95 node_name: {{ HOSTNAME_CFG01 }}
96 retry: {count: 1, delay: 5}
97 skip_fail: false
98
99- description: Check haproxy status
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
101 -C 'I@haproxy:proxy' service.status haproxy
102 node_name: {{ HOSTNAME_CFG01 }}
103 retry: {count: 1, delay: 5}
104 skip_fail: false
105
106- description: Install nginx on prx nodes
107 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
108 -C 'I@nginx:server' state.sls nginx
109 node_name: {{ HOSTNAME_CFG01 }}
110 retry: {count: 1, delay: 5}
111 skip_fail: false
112
113- description: Restart rsyslog
114 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
115 -C 'I@haproxy:proxy' service.restart rsyslog
116 node_name: {{ HOSTNAME_CFG01 }}
117 retry: {count: 1, delay: 5}
118 skip_fail: false
119
120- description: Install memcached on all controllers
121 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
122 -C 'I@memcached:server' state.sls memcached
123 node_name: {{ HOSTNAME_CFG01 }}
124 retry: {count: 1, delay: 5}
125 skip_fail: false