blob: 54514fff10c6c239ffe8a792b8ab7217cb8a61c5 [file] [log] [blame]
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +02001{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'virtual-mcp-pike-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %}
sgudz09e9aa92018-04-12 12:31:53 +03006{% from 'virtual-mcp-pike-ovs/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'virtual-mcp-pike-ovs/underlay.yaml' import DOMAIN_NAME with context %}
Oleksii Butenkoc05c9f62018-04-19 19:00:02 +03008{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
9{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
Dennis Dmitriev4034db02018-08-26 21:50:13 +030010
sgudz09e9aa92018-04-12 12:31:53 +030011{% import 'shared-salt.yaml' as SHARED with context %}
Dennis Dmitriev4034db02018-08-26 21:50:13 +030012{% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
Tatyana Leontovich4f613672018-06-12 21:41:19 +030013{% import 'shared-backup-restore.yaml' as BACKUP with context %}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020014# Install OpenStack control services
15
Dennis Dmitriev4034db02018-08-26 21:50:13 +030016{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE(USE_ORCHESTRATE=false) }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020017
Dennis Dmitriev4034db02018-08-26 21:50:13 +030018{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020019
Dennis Dmitriev4034db02018-08-26 21:50:13 +030020{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020021
Dennis Dmitriev4034db02018-08-26 21:50:13 +030022{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020023
Dennis Dmitriev4034db02018-08-26 21:50:13 +030024{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020025
Tatyana Leontovichb0b68d92018-01-11 13:27:08 +020026# isntall designate
27- description: Install bind
28 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
29 -C 'I@bind:server' state.sls bind
30 node_name: {{ HOSTNAME_CFG01 }}
31 retry: {count: 1, delay: 5}
32 skip_fail: false
33
34- description: Install designate
35 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
36 -C 'I@designate:server' state.sls designate -b 1
37 node_name: {{ HOSTNAME_CFG01 }}
38 retry: {count: 5, delay: 10}
39 skip_fail: false
40
Dennis Dmitriev4034db02018-08-26 21:50:13 +030041{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
Tatyana Leontovich56005da2017-12-11 13:16:51 +020042
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +020043# Install Telemetry services (mdb nodes)
44- description: Install redis service
45 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@redis:cluster:role:master' state.sls redis &&
46 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@redis:server' state.sls redis
47 node_name: {{ HOSTNAME_CFG01 }}
48 retry: {count: 1, delay: 5}
49 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +020050
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +020051- description: Install gnocchi server
52 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:server and *01*' state.sls gnocchi.server &&
53 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:server' state.sls gnocchi.server
54 node_name: {{ HOSTNAME_CFG01 }}
55 retry: {count: 1, delay: 5}
56 skip_fail: false
57
Dennis Dmitriev85145a62018-08-03 19:22:08 +030058- description: Setup gnocchi client
59 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:client and *01*' state.sls gnocchi.client &&
60 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@gnocchi:client' state.sls gnocchi.client
61 node_name: {{ HOSTNAME_CFG01 }}
62 retry: {count: 1, delay: 5}
63 skip_fail: false
64
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +020065- description: Install panko server
66 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@panko:server and *01*' state.sls panko &&
67 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@panko:server' state.sls panko
68 node_name: {{ HOSTNAME_CFG01 }}
69 retry: {count: 1, delay: 5}
70 skip_fail: false
71
Tatyana Leontovich51644ec2018-03-22 13:13:31 +020072- description: Install ceilometer server on first node
73 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceilometer:server and *01*' state.sls ceilometer
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +020074 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovich51644ec2018-03-22 13:13:31 +020075 retry: {count: 2, delay: 5}
76 skip_fail: false
77
78- description: Install ceilometer server on other nodes
79 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@ceilometer:server' state.sls ceilometer
80 node_name: {{ HOSTNAME_CFG01 }}
81 retry: {count: 2, delay: 5}
Dennis Dmitrievd86ffa12018-03-15 22:07:51 +020082 skip_fail: false
83
84- description: Install aodh server
85 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@aodh:server and *01*' state.sls aodh &&
86 salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@aodh:server' state.sls aodh
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 1, delay: 5}
89 skip_fail: false
90
91# Install OpenStack dashboard and proxy services
Tatyana Leontovich56005da2017-12-11 13:16:51 +020092- description: Deploy horizon dashboard
93 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
94 -C 'I@horizon:server' state.sls horizon
95 node_name: {{ HOSTNAME_CFG01 }}
96 retry: {count: 1, delay: 5}
97 skip_fail: true
98
99- description: Deploy nginx proxy
100 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
101 -C 'I@nginx:server' state.sls nginx
102 node_name: {{ HOSTNAME_CFG01 }}
103 retry: {count: 1, delay: 5}
104 skip_fail: true
105
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200106# Install compute node
107
108- description: Apply formulas for compute node
109 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
110 node_name: {{ HOSTNAME_CFG01 }}
111 retry: {count: 1, delay: 5}
112 skip_fail: true
113
114- description: Re-apply(as in doc) formulas for compute node
115 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
116 node_name: {{ HOSTNAME_CFG01 }}
117 retry: {count: 1, delay: 5}
Oleksii Butenko9f2601c2018-02-08 15:13:21 +0200118 skip_fail: false
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200119
120- description: Check IP on computes
121 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
122 'ip a'
123 node_name: {{ HOSTNAME_CFG01 }}
124 retry: {count: 10, delay: 30}
125 skip_fail: false
126
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200127- description: Create net04_external
128 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
129 '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat'
130 node_name: {{ HOSTNAME_CFG01 }}
131 retry: {count: 1, delay: 30}
132 skip_fail: false
133
134- description: Create subnet_external
135 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
136 '. /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'
137 node_name: {{ HOSTNAME_CFG01 }}
138 retry: {count: 1, delay: 30}
139 skip_fail: false
140
141- description: Create net04
142 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
143 '. /root/keystonercv3; neutron net-create net04'
144 node_name: {{ HOSTNAME_CFG01 }}
145 retry: {count: 1, delay: 30}
146 skip_fail: false
147
148- description: Create subnet_net04
149 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
Tatyana Leontovich7305c412018-04-27 00:26:27 +0300150 '. /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 }}.180'
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200151 node_name: {{ HOSTNAME_CFG01 }}
152 retry: {count: 1, delay: 30}
153 skip_fail: false
154
155- description: Create router
156 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
157 '. /root/keystonercv3; neutron router-create net04_router01'
158 node_name: {{ HOSTNAME_CFG01 }}
159 retry: {count: 1, delay: 30}
160 skip_fail: false
161
162- description: Set geteway
163 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
164 '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext'
165 node_name: {{ HOSTNAME_CFG01 }}
166 retry: {count: 1, delay: 30}
167 skip_fail: false
168
169- description: Add interface
170 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run
171 '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet'
172 node_name: {{ HOSTNAME_CFG01 }}
173 retry: {count: 1, delay: 30}
174 skip_fail: false
175
Tatyana Leontovich56005da2017-12-11 13:16:51 +0200176- description: sync time
177 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
178 'service ntp stop; ntpd -gq; service ntp start'
179 node_name: {{ HOSTNAME_CFG01 }}
180 retry: {count: 1, delay: 30}
181 skip_fail: false
182
sgudzbe155c22018-03-22 13:12:13 +0200183- description: Install manila-api on first node
184 cmd: |
185 salt -C 'I@manila:api and *01*' state.sls manila.api;
186 node_name: {{ HOSTNAME_CFG01 }}
187 retry: {count: 1, delay: 5}
188 skip_fail: false
189
190- description: Install manila-api on other nodes
191 cmd: |
192 salt -C 'I@manila:api and not *01*' state.sls manila.api;
193 node_name: {{ HOSTNAME_CFG01 }}
194 retry: {count: 1, delay: 5}
195 skip_fail: false
196
197- description: Install manila-scheduler
198 cmd: |
199 salt -C 'I@manila:scheduler' state.sls manila.scheduler;
200 node_name: {{ HOSTNAME_CFG01 }}
201 retry: {count: 1, delay: 5}
202 skip_fail: false
203
204- description: Install manila-share
205 cmd: |
206 salt -C 'I@manila:share' state.sls manila.share;
207 node_name: {{ HOSTNAME_CFG01 }}
208 retry: {count: 1, delay: 5}
209 skip_fail: false
210
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300211- description: WR https://mirantis.jira.com/browse/PROD-19012
212 cmd: |
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300213 salt 'ctl*' cmd.run 'systemctl restart apache2'
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300214 node_name: {{ HOSTNAME_CFG01 }}
215 retry: {count: 1, delay: 5}
216 skip_fail: false
217
sgudzbe155c22018-03-22 13:12:13 +0200218- description: Check manila-services
219 cmd: |
220 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list'
221 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300222 retry: {count: 3, delay: 15}
sgudzbe155c22018-03-22 13:12:13 +0200223 skip_fail: false
224
Maksym Shalamovae15a772018-07-20 13:13:29 +0300225- description: Create manila type
226 cmd: |
227 salt 'cfg01*' state.sls manila.client
228 node_name: {{ HOSTNAME_CFG01 }}
229 retry: {count: 1, delay: 5}
230 skip_fail: false
231
sgudzbe155c22018-03-22 13:12:13 +0200232- description: Create CIFS and NFS share and check it status
233 cmd: |
234 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default';
235 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default';
236 sleep 5;
237 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list';
238 node_name: {{ HOSTNAME_CFG01 }}
239 retry: {count: 1, delay: 5}
240 skip_fail: false
sgudz09e9aa92018-04-12 12:31:53 +0300241
Tatyana Leontovich92063ef2018-07-04 14:28:09 +0300242{{ BACKUP.MACRO_WR_NGINX_MASTER() }}
Tatyana Leontovich4f613672018-06-12 21:41:19 +0300243{{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }}
244{{ BACKUP.MACRO_BACKUP_XTRABACKUP() }}
Oleksii Butenko5cd0a162018-06-14 18:18:10 +0300245{{ SHARED.INSTALL_DOCKER_ON_GTW() }}