blob: 40a81f2bafc68c7bd482154f32446c38d3dd89a8 [file] [log] [blame]
ibumarskovb5210062018-08-22 16:18:15 +04001{# Collection of common macroses shared across openstack services #}
2
3{%- macro MACRO_INSTALL_KEYSTONE() %}
4- description: Install keystone service on primary node
5 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
6 -C 'I@keystone:server and *01*' state.sls keystone.server
7 node_name: {{ HOSTNAME_CFG01 }}
8 retry: {count: 2, delay: 15}
9 skip_fail: false
10
11- description: Install keystone service on other nodes
12 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
13 -C 'I@keystone:server' state.sls keystone.server
14 node_name: {{ HOSTNAME_CFG01 }}
15 retry: {count: 2, delay: 15}
16 skip_fail: false
17
18- description: Restart apache due to PROD-10477
19 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*'
20 cmd.run "systemctl restart apache2"
21 node_name: {{ HOSTNAME_CFG01 }}
22 retry: {count: 1, delay: 15}
23 skip_fail: false
24
25- description: Check apache status to PROD-10477
26 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*'
27 cmd.run "systemctl status apache2"
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 15}
30 skip_fail: false
31
32- description: Populate keystone services/tenants/admins
33 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
34 -C 'I@keystone:client' state.sls keystone.client
35 node_name: {{ HOSTNAME_CFG01 }}
36 retry: {count: 2, delay: 5}
37 skip_fail: false
38
39- description: Check keystone service-list
40 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
41 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list'
42 node_name: {{ HOSTNAME_CFG01 }}
43 retry: {count: 1, delay: 5}
44 skip_fail: false
45{%- endmacro %}
46
47{%- macro MACRO_INSTALL_GLANCE() %}
48- description: Install glance service on primary node
49 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
50 -C 'I@glance:server and *01*' state.sls glance.server
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false
54
55- description: Install glance service on other nodes
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
57 -C 'I@glance:server' state.sls glance.server
58 node_name: {{ HOSTNAME_CFG01 }}
59 retry: {count: 1, delay: 5}
60 skip_fail: false
61
62- description: Update Fernet tokens
63 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
64 -C 'I@keystone:server' state.sls keystone.server
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: Check glance image-list
70 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
71 -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list'
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 5}
74 skip_fail: false
75{%- endmacro %}
76
77{%- macro MACRO_INSTALL_NOVA() %}
78- description: Install nova service on primary node
79 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
80 -C "I@nova:controller and *01*" state.sls nova.controller
81 node_name: {{ HOSTNAME_CFG01 }}
82 retry: {count: 1, delay: 5}
83 skip_fail: false
84
85- description: Install nova service on other nodes
86 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
87 -C "I@nova:controller" state.sls nova.controller
88 node_name: {{ HOSTNAME_CFG01 }}
89 retry: {count: 1, delay: 5}
90 skip_fail: false
91
92- description: Check nova service-list
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
94 -C "I@keystone:server" cmd.run ". /root/keystonercv3; nova
95 --debug service-list"
96 node_name: {{ HOSTNAME_CFG01 }}
97 retry: {count: 1, delay: 5}
98 skip_fail: false
99
100- description: Check nova list
101 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
102 -C "I@keystone:server" cmd.run ". /root/keystonercv3; nova --debug list"
103 node_name: {{ HOSTNAME_CFG01 }}
104 retry: {count: 1, delay: 5}
105 skip_fail: false
106{%- endmacro %}
107
108{%- macro MACRO_INSTALL_CINDER() %}
109- description: Install cinder on primary node
110 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
111 -C "I@cinder:controller and *01*" state.sls cinder
112 node_name: {{ HOSTNAME_CFG01 }}
113 retry: {count: 1, delay: 5}
114 skip_fail: false
115
116- description: Install cinder on other nodes
117 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
118 -C "I@cinder:controller" state.sls cinder
119 node_name: {{ HOSTNAME_CFG01 }}
120 retry: {count: 1, delay: 5}
121 skip_fail: false
122
123- description: Check cinder list
124 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
125 -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list'
126 node_name: {{ HOSTNAME_CFG01 }}
127 retry: {count: 1, delay: 5}
128 skip_fail: false
129{%- endmacro %}
130
131{%- macro MACRO_INSTALL_NEUTRON() %}
132- description: Install neutron service on primary node
133 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
134 -C "I@neutron:server and *01*" state.sls neutron.server
135 node_name: {{ HOSTNAME_CFG01 }}
136 retry: {count: 1, delay: 5}
137 skip_fail: false
138
139- description: Install neutron service on other nodes
140 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
141 -C "I@neutron:server" state.sls neutron.server
142 node_name: {{ HOSTNAME_CFG01 }}
143 retry: {count: 1, delay: 5}
144 skip_fail: false
145
146- description: Install neutron on gtw node
147 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
148 -C 'I@neutron:gateway' state.sls neutron
149 node_name: {{ HOSTNAME_CFG01 }}
150 retry: {count: 1, delay: 5}
151 skip_fail: false
152
153- description: Check neutron agent-list
154 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
155 -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list'
156 node_name: {{ HOSTNAME_CFG01 }}
157 retry: {count: 1, delay: 5}
158 skip_fail: false
159{%- endmacro %}
160
161{%- macro MACRO_INSTALL_HEAT() %}
162- description: Install heat service on primary node
163 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
164 -C "I@heat:server and *01*" state.sls heat.server
165 node_name: {{ HOSTNAME_CFG01 }}
166 retry: {count: 1, delay: 5}
167 skip_fail: false
168
169- description: Install heat service on other nodes
170 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
171 -C "I@heat:server" state.sls heat.server
172 node_name: {{ HOSTNAME_CFG01 }}
173 retry: {count: 1, delay: 5}
174 skip_fail: false
175
176- description: Check heat service
177 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
178 -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list'
179 node_name: {{ HOSTNAME_CFG01 }}
180 retry: {count: 5, delay: 10}
181 skip_fail: false
182{%- endmacro %}
183
184{%- macro MACRO_INSTALL_HORIZON() %}
185- description: Deploy horizon dashboard
186 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
187 -C 'I@horizon:server' state.sls horizon
188 node_name: {{ HOSTNAME_CFG01 }}
189 retry: {count: 1, delay: 5}
190 skip_fail: true
191
192- description: Deploy nginx proxy
193 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
194 -C 'I@nginx:server' state.sls nginx
195 node_name: {{ HOSTNAME_CFG01 }}
196 retry: {count: 1, delay: 5}
197 skip_fail: true
198{%- endmacro %}
199
200{%- macro MACRO_INSTALL_DESIGNATE() %}
201# Note: deploy backend for designate firstly
202- description: Install designate on primary node
203 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
204 -C "I@designate:server and *01*" state.sls designate.server
205 node_name: {{ HOSTNAME_CFG01 }}
206 retry: {count: 5, delay: 10}
207 skip_fail: false
208
209- description: Install designate on other nodes
210 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
211 -C "I@designate:server" state.sls designate
212 node_name: {{ HOSTNAME_CFG01 }}
213 retry: {count: 5, delay: 10}
214 skip_fail: false
215{%- endmacro %}
216
217{%- macro MACRO_INSTALL_CEILOMETER() %}
218# TO DO
219{%- endmacro %}
220
221{%- macro MACRO_INSTALL_BARBICAN() %}
222# TO DO
223{%- endmacro %}
224
225{%- macro MACRO_INSTALL_IRONIC() %}
226# TO DO
227{%- endmacro %}
228
229{%- macro MACRO_INSTALL_MANILA() %}
230# TO DO
231{%- endmacro %}
232
233{%- macro MACRO_INSTALL_OCTAVIA_API() %}
234# TO DO
235{%- endmacro %}
236
237{%- macro MACRO_INSTALL_DOGTAG() %}
238# TO DO
239{%- endmacro %}
240
241{%- macro MACRO_INSTALL_GNOCCHI() %}
242# TO DO
243{%- endmacro %}
244
245{%- macro MACRO_INSTALL_AODH() %}
246# TO DO
247{%- endmacro %}