blob: ea91bad49ca29d98c6ae462d34607466a1a6e7ee [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
sgudz62df2fc2018-10-09 12:26:19 +030016{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }}
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
sgudzbe155c22018-03-22 13:12:13 +0200127- description: Install manila-api on first node
128 cmd: |
129 salt -C 'I@manila:api and *01*' state.sls manila.api;
130 node_name: {{ HOSTNAME_CFG01 }}
131 retry: {count: 1, delay: 5}
132 skip_fail: false
133
134- description: Install manila-api on other nodes
135 cmd: |
136 salt -C 'I@manila:api and not *01*' state.sls manila.api;
137 node_name: {{ HOSTNAME_CFG01 }}
138 retry: {count: 1, delay: 5}
139 skip_fail: false
140
141- description: Install manila-scheduler
142 cmd: |
143 salt -C 'I@manila:scheduler' state.sls manila.scheduler;
144 node_name: {{ HOSTNAME_CFG01 }}
145 retry: {count: 1, delay: 5}
146 skip_fail: false
147
148- description: Install manila-share
149 cmd: |
150 salt -C 'I@manila:share' state.sls manila.share;
151 node_name: {{ HOSTNAME_CFG01 }}
152 retry: {count: 1, delay: 5}
153 skip_fail: false
154
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300155- description: WR https://mirantis.jira.com/browse/PROD-19012
156 cmd: |
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300157 salt 'ctl*' cmd.run 'systemctl restart apache2'
Tatyana Leontovich3cc1c132018-04-03 00:41:17 +0300158 node_name: {{ HOSTNAME_CFG01 }}
159 retry: {count: 1, delay: 5}
160 skip_fail: false
161
sgudzbe155c22018-03-22 13:12:13 +0200162- description: Check manila-services
163 cmd: |
164 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list'
165 node_name: {{ HOSTNAME_CFG01 }}
Tatyana Leontovich1618a2a2018-04-03 10:19:25 +0300166 retry: {count: 3, delay: 15}
sgudzbe155c22018-03-22 13:12:13 +0200167 skip_fail: false
168
Maksym Shalamovae15a772018-07-20 13:13:29 +0300169- description: Create manila type
170 cmd: |
171 salt 'cfg01*' state.sls manila.client
172 node_name: {{ HOSTNAME_CFG01 }}
173 retry: {count: 1, delay: 5}
174 skip_fail: false
175
sgudzbe155c22018-03-22 13:12:13 +0200176- description: Create CIFS and NFS share and check it status
177 cmd: |
178 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default';
179 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default';
180 sleep 5;
181 salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list';
182 node_name: {{ HOSTNAME_CFG01 }}
183 retry: {count: 1, delay: 5}
184 skip_fail: false
sgudz09e9aa92018-04-12 12:31:53 +0300185
Tatyana Leontovich92063ef2018-07-04 14:28:09 +0300186{{ BACKUP.MACRO_WR_NGINX_MASTER() }}
Tatyana Leontovich4f613672018-06-12 21:41:19 +0300187{{ BACKUP.MACRO_BACKUP_BACKUPNINJA() }}
sgudz62df2fc2018-10-09 12:26:19 +0300188{{ BACKUP.MACRO_BACKUP_XTRABACKUP() }}