blob: 1d04d4d64a1c4fb1a3a04bd9b3874c62fd9d0522 [file] [log] [blame]
Oleksii Butenko8be76f62018-03-30 13:35:26 +03001{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import HOSTNAME_GTW01 with context %}
Oleksii Butenko0a38bae2018-04-05 18:23:20 +03006{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'virtual-mcp-pike-dvr-ssl-barbican/underlay.yaml' import DOMAIN_NAME with context %}
8
Oleksii Butenko8be76f62018-03-30 13:35:26 +03009{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
10{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Dennis Dmitriev4034db02018-08-26 21:50:13 +030011
Oleksii Butenko0a38bae2018-04-05 18:23:20 +030012{% import 'shared-salt.yaml' as SHARED with context %}
Dennis Dmitriev4034db02018-08-26 21:50:13 +030013{% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
Oleksii Butenko0a38bae2018-04-05 18:23:20 +030014
Oleksii Butenko8be76f62018-03-30 13:35:26 +030015# Install OpenStack control services
16
17- description: Nginx
18 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
19 -C 'I@nginx:server' state.sls salt.minion
20 node_name: {{ HOSTNAME_CFG01 }}
21 retry: {count: 1, delay: 5}
22 skip_fail: true
23
24- description: Deploy nginx proxy
25 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
26 -C 'I@nginx:server' state.sls nginx
27 node_name: {{ HOSTNAME_CFG01 }}
28 retry: {count: 1, delay: 5}
29 skip_fail: true
30
Dennis Dmitriev4034db02018-08-26 21:50:13 +030031{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=false) }}
Oleksii Butenko8be76f62018-03-30 13:35:26 +030032
Dennis Dmitriev4034db02018-08-26 21:50:13 +030033{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
Oleksii Butenko8be76f62018-03-30 13:35:26 +030034
Dennis Dmitriev4034db02018-08-26 21:50:13 +030035{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
Oleksii Butenko8be76f62018-03-30 13:35:26 +030036
Dennis Dmitriev4034db02018-08-26 21:50:13 +030037{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }}
Oleksii Butenko8be76f62018-03-30 13:35:26 +030038
Dennis Dmitriev4034db02018-08-26 21:50:13 +030039{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
Oleksii Butenko8be76f62018-03-30 13:35:26 +030040
41# isntall designate
42- description: Install powerdns
43 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
44 -C 'I@powerdns:server' state.sls powerdns.server
45 node_name: {{ HOSTNAME_CFG01 }}
46 retry: {count: 1, delay: 5}
47 skip_fail: false
48
49- description: Install designate
50 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
51 -C 'I@designate:server' state.sls designate -b 1
52 node_name: {{ HOSTNAME_CFG01 }}
53 retry: {count: 5, delay: 10}
54 skip_fail: false
55
Dennis Dmitriev4034db02018-08-26 21:50:13 +030056{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
Oleksii Butenko8be76f62018-03-30 13:35:26 +030057
58- description: Deploy horizon dashboard
59 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
60 -C 'I@horizon:server' state.sls horizon
61 node_name: {{ HOSTNAME_CFG01 }}
62 retry: {count: 1, delay: 5}
63 skip_fail: false
64
65# Install DogTag server service
66- description: Install DogTag server service
67 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
68 -C 'I@dogtag:server and *01*' state.sls dogtag.server
69 node_name: {{ HOSTNAME_CFG01 }}
70 retry: {count: 1, delay: 5}
71 skip_fail: false
72
73- description: Install DogTag server service
74 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
75 -C 'I@dogtag:server' state.sls dogtag.server
76 node_name: {{ HOSTNAME_CFG01 }}
77 retry: {count: 1, delay: 5}
78 skip_fail: false
79
80# Install Barbican server service
81- description: Install Barbican server service
82 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
83 -C 'I@barbican:server and *01*' state.sls barbican.server
84 node_name: {{ HOSTNAME_CFG01 }}
85 retry: {count: 1, delay: 5}
86 skip_fail: false
87
88- description: Install Barbican server service
89 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
90 -C 'I@barbican:server' state.sls barbican.server
91 node_name: {{ HOSTNAME_CFG01 }}
92 retry: {count: 1, delay: 5}
93 skip_fail: false
94
95- description: Install Barbican client
96 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
97 -C 'I@barbican:client' state.sls barbican.client
98 node_name: {{ HOSTNAME_CFG01 }}
99 retry: {count: 1, delay: 5}
100 skip_fail: True
101
102# Install compute node
103
104- description: Apply formulas for compute node
105 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
106 node_name: {{ HOSTNAME_CFG01 }}
107 retry: {count: 1, delay: 5}
108 skip_fail: true
109
110- description: Re-apply(as in doc) formulas for compute node
111 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
112 node_name: {{ HOSTNAME_CFG01 }}
113 retry: {count: 1, delay: 5}
114 skip_fail: false
115
116- description: Check IP on computes
117 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
118 'ip a'
119 node_name: {{ HOSTNAME_CFG01 }}
120 retry: {count: 10, delay: 30}
121 skip_fail: false
122
Tatyanka Leontovichcc4568c2018-09-26 10:47:16 +0000123- description: Create net04_external
124 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
125 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
126 node_name: {{ HOSTNAME_CFG01 }}
127 retry: {count: 1, delay: 30}
128 skip_fail: false
129
130- description: Create subnet_external
131 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
132 '. /root/keystonercv3; neutron subnet-create net04_ext {{ IPV4_NET_EXTERNAL_PREFIX }}.0/24 --name net04_ext__subnet --disable-dhcp --allocation-pool start={{ IPV4_NET_EXTERNAL_PREFIX }}.150,end={{ IPV4_NET_EXTERNAL_PREFIX }}.180 --gateway {{ IPV4_NET_EXTERNAL_PREFIX }}.1'
133 node_name: {{ HOSTNAME_CFG01 }}
134 retry: {count: 1, delay: 30}
135 skip_fail: false
136
137- description: Create net04
138 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
139 '. /root/keystonercv3; neutron net-create net04'
140 node_name: {{ HOSTNAME_CFG01 }}
141 retry: {count: 1, delay: 30}
142 skip_fail: false
143
144- description: Create subnet_net04
145 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
146 '. /root/keystonercv3; neutron subnet-create net04 {{ IPV4_NET_TENANT_PREFIX }}.0/24 --name net04__subnet --allocation-pool start={{ IPV4_NET_TENANT_PREFIX }}.120,end={{ IPV4_NET_TENANT_PREFIX }}.240'
147 node_name: {{ HOSTNAME_CFG01 }}
148 retry: {count: 1, delay: 30}
149 skip_fail: false
150
151- description: Create router
152 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
153 '. /root/keystonercv3; neutron router-create net04_router01'
154 node_name: {{ HOSTNAME_CFG01 }}
155 retry: {count: 1, delay: 30}
156 skip_fail: false
157
158- description: Set geteway
159 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
160 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
161 node_name: {{ HOSTNAME_CFG01 }}
162 retry: {count: 1, delay: 30}
163 skip_fail: false
164
165- description: Add interface
166 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
167 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
168 node_name: {{ HOSTNAME_CFG01 }}
169 retry: {count: 1, delay: 30}
170 skip_fail: false
171
172- description: sync time
173 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
174 'service ntp stop; ntpd -gq; service ntp start'
175 node_name: {{ HOSTNAME_CFG01 }}
176 retry: {count: 1, delay: 30}
177 skip_fail: false
178
sgudz3fd44542018-04-02 11:45:49 +0300179- description: Install manila-api on first node
180 cmd: |
181 salt -C 'I@manila:api and *01*' state.sls manila.api;
182 node_name: {{ HOSTNAME_CFG01 }}
183 retry: {count: 1, delay: 5}
184 skip_fail: false
185
186- description: Install manila-api on other nodes
187 cmd: |
188 salt -C 'I@manila:api and not *01*' state.sls manila.api;
189 node_name: {{ HOSTNAME_CFG01 }}
190 retry: {count: 1, delay: 5}
191 skip_fail: false
192
193- description: Install manila-scheduler
194 cmd: |
195 salt -C 'I@manila:scheduler' state.sls manila.scheduler;
196 node_name: {{ HOSTNAME_CFG01 }}
197 retry: {count: 1, delay: 5}
198 skip_fail: false
199
200- description: Install manila-share
201 cmd: |
202 salt -C 'I@manila:share' state.sls manila.share;
203 node_name: {{ HOSTNAME_CFG01 }}
204 retry: {count: 1, delay: 5}
205 skip_fail: false
206
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300207- description: WR https://mirantis.jira.com/browse/PROD-19012
208 cmd: |
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300209 salt 'ctl*' cmd.run 'systemctl restart apache2'
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300210 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenkoa947bc02018-05-22 11:40:48 +0300211 retry: {count: 1, delay: 15}
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300212 skip_fail: false
213
sgudz3fd44542018-04-02 11:45:49 +0300214- description: Check manila-services
215 cmd: |
216 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list'
217 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenko3deb90e2018-04-06 15:34:38 +0300218 retry: {count: 3, delay: 5}
sgudz3fd44542018-04-02 11:45:49 +0300219 skip_fail: false
220
Maksym Shalamovae15a772018-07-20 13:13:29 +0300221- description: Create manila type
222 cmd: |
223 salt 'cfg01*' state.sls manila.client
224 node_name: {{ HOSTNAME_CFG01 }}
225 retry: {count: 1, delay: 5}
226 skip_fail: false
227
sgudz3fd44542018-04-02 11:45:49 +0300228- description: Create CIFS and NFS share and check it status
229 cmd: |
230 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default';
231 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default';
232 sleep 5;
233 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list';
234 node_name: {{ HOSTNAME_CFG01 }}
Oleksii Butenkoa561a8a2018-05-08 15:12:26 +0300235 retry: {count: 3, delay: 5}
sgudz3fd44542018-04-02 11:45:49 +0300236 skip_fail: false
Oleksii Butenko5cd0a162018-06-14 18:18:10 +0300237
Tatyanka Leontovichcc4568c2018-09-26 10:47:16 +0000238{{ SHARED.INSTALL_DOCKER_ON_GTW() }}
239