Oleksii Butenko | 8be76f6 | 2018-03-30 13:35:26 +0300 | [diff] [blame] | 1 | {% 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 Butenko | 0a38bae | 2018-04-05 18:23:20 +0300 | [diff] [blame] | 6 | {% 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 Butenko | 8be76f6 | 2018-03-30 13:35:26 +0300 | [diff] [blame] | 9 | {% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %} |
| 10 | {% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %} |
Oleksii Butenko | 0a38bae | 2018-04-05 18:23:20 +0300 | [diff] [blame] | 11 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 12 | |
Oleksii Butenko | 8be76f6 | 2018-03-30 13:35:26 +0300 | [diff] [blame] | 13 | # Install OpenStack control services |
| 14 | |
| 15 | - description: Nginx |
| 16 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 17 | -C 'I@nginx:server' state.sls salt.minion |
| 18 | node_name: {{ HOSTNAME_CFG01 }} |
| 19 | retry: {count: 1, delay: 5} |
| 20 | skip_fail: true |
| 21 | |
| 22 | - description: Deploy nginx proxy |
| 23 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 24 | -C 'I@nginx:server' state.sls nginx |
| 25 | node_name: {{ HOSTNAME_CFG01 }} |
| 26 | retry: {count: 1, delay: 5} |
| 27 | skip_fail: true |
| 28 | |
| 29 | - description: Install glance on all controllers |
| 30 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 31 | -C 'I@glance:server' state.sls glance -b 1 |
| 32 | node_name: {{ HOSTNAME_CFG01 }} |
| 33 | retry: {count: 1, delay: 5} |
| 34 | skip_fail: false |
| 35 | |
| 36 | - description: Install keystone service (note that different fernet keys are created on different nodes) |
| 37 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 38 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 39 | node_name: {{ HOSTNAME_CFG01 }} |
| 40 | retry: {count: 2, delay: 15} |
| 41 | skip_fail: false |
| 42 | |
| 43 | - description: Restart apache due to PROD-10477 |
| 44 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl restart apache2" |
| 45 | node_name: {{ HOSTNAME_CFG01 }} |
| 46 | retry: {count: 1, delay: 15} |
| 47 | skip_fail: false |
| 48 | |
| 49 | - description: Check apache status to PROD-10477 |
| 50 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl*' cmd.run "systemctl status apache2" |
| 51 | node_name: {{ HOSTNAME_CFG01 }} |
| 52 | retry: {count: 1, delay: 15} |
| 53 | skip_fail: false |
| 54 | |
| 55 | - description: Mount glusterfs.client volumes (resuires created 'keystone' and 'glusterfs' system users) |
| 56 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 57 | -C 'I@glance:server' state.sls glusterfs.client |
| 58 | node_name: {{ HOSTNAME_CFG01 }} |
| 59 | retry: {count: 1, delay: 5} |
| 60 | skip_fail: false |
| 61 | |
| 62 | - description: Update fernet keys for keystone server on the mounted glusterfs volume |
| 63 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 64 | -C 'I@keystone:server' state.sls keystone.server -b 1 |
| 65 | node_name: {{ HOSTNAME_CFG01 }} |
| 66 | retry: {count: 1, delay: 5} |
| 67 | skip_fail: false |
| 68 | |
| 69 | - description: Populate keystone services/tenants/admins |
| 70 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 71 | -C 'I@keystone:client' state.sls keystone.client |
| 72 | node_name: {{ HOSTNAME_CFG01 }} |
| 73 | retry: {count: 2, delay: 5} |
| 74 | skip_fail: false |
| 75 | |
| 76 | - description: Check keystone service-list |
| 77 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 78 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack service list' |
| 79 | node_name: {{ HOSTNAME_CFG01 }} |
| 80 | retry: {count: 1, delay: 5} |
| 81 | skip_fail: false |
| 82 | |
| 83 | - description: Check glance image-list |
| 84 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 85 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; glance image-list' |
| 86 | node_name: {{ HOSTNAME_CFG01 }} |
| 87 | retry: {count: 1, delay: 5} |
| 88 | skip_fail: false |
| 89 | |
| 90 | |
| 91 | - description: Install nova on all controllers |
| 92 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 93 | -C 'I@nova:controller' state.sls nova -b 1 |
| 94 | node_name: {{ HOSTNAME_CFG01 }} |
| 95 | retry: {count: 2, delay: 5} |
| 96 | skip_fail: false |
| 97 | |
| 98 | - description: Check nova service-list |
| 99 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 100 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; nova --debug service-list' |
| 101 | node_name: {{ HOSTNAME_CFG01 }} |
| 102 | retry: {count: 3, delay: 5} |
| 103 | skip_fail: false |
| 104 | |
Oleksii Butenko | 8be76f6 | 2018-03-30 13:35:26 +0300 | [diff] [blame] | 105 | - description: Install cinder |
| 106 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 107 | -C 'I@cinder:controller' state.sls cinder -b 1 |
| 108 | node_name: {{ HOSTNAME_CFG01 }} |
| 109 | retry: {count: 1, delay: 5} |
| 110 | skip_fail: false |
| 111 | |
| 112 | - description: Check cinder list |
| 113 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 114 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; cinder list' |
| 115 | node_name: {{ HOSTNAME_CFG01 }} |
| 116 | retry: {count: 1, delay: 5} |
| 117 | skip_fail: false |
| 118 | |
| 119 | |
| 120 | - description: Install neutron service |
| 121 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 122 | -C 'I@neutron:server' state.sls neutron -b 1 |
| 123 | node_name: {{ HOSTNAME_CFG01 }} |
| 124 | retry: {count: 1, delay: 5} |
| 125 | skip_fail: false |
| 126 | |
| 127 | - description: Install neutron on gtw node |
| 128 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 129 | -C 'I@neutron:gateway' state.sls neutron |
| 130 | node_name: {{ HOSTNAME_CFG01 }} |
| 131 | retry: {count: 1, delay: 5} |
| 132 | skip_fail: false |
| 133 | |
| 134 | # isntall designate |
| 135 | - description: Install powerdns |
| 136 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 137 | -C 'I@powerdns:server' state.sls powerdns.server |
| 138 | node_name: {{ HOSTNAME_CFG01 }} |
| 139 | retry: {count: 1, delay: 5} |
| 140 | skip_fail: false |
| 141 | |
| 142 | - description: Install designate |
| 143 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 144 | -C 'I@designate:server' state.sls designate -b 1 |
| 145 | node_name: {{ HOSTNAME_CFG01 }} |
| 146 | retry: {count: 5, delay: 10} |
| 147 | skip_fail: false |
| 148 | |
| 149 | - description: Check neutron agent-list |
| 150 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 151 | -C 'I@keystone:server' cmd.run '. /root/keystonerc; neutron agent-list' |
| 152 | node_name: {{ HOSTNAME_CFG01 }} |
| 153 | retry: {count: 1, delay: 5} |
| 154 | skip_fail: false |
| 155 | |
| 156 | - description: Install heat service |
| 157 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 158 | -C 'I@heat:server' state.sls heat -b 1 |
| 159 | node_name: {{ HOSTNAME_CFG01 }} |
| 160 | retry: {count: 1, delay: 5} |
| 161 | skip_fail: false |
| 162 | |
| 163 | - description: Check heat service |
| 164 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 165 | -C 'I@keystone:server' cmd.run '. /root/keystonercv3; openstack orchestration resource type list' |
| 166 | node_name: {{ HOSTNAME_CFG01 }} |
| 167 | retry: {count: 5, delay: 10} |
| 168 | skip_fail: false |
| 169 | |
| 170 | |
| 171 | - description: Deploy horizon dashboard |
| 172 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 173 | -C 'I@horizon:server' state.sls horizon |
| 174 | node_name: {{ HOSTNAME_CFG01 }} |
| 175 | retry: {count: 1, delay: 5} |
| 176 | skip_fail: false |
| 177 | |
| 178 | # Install DogTag server service |
| 179 | - description: Install DogTag server service |
| 180 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 181 | -C 'I@dogtag:server and *01*' state.sls dogtag.server |
| 182 | node_name: {{ HOSTNAME_CFG01 }} |
| 183 | retry: {count: 1, delay: 5} |
| 184 | skip_fail: false |
| 185 | |
| 186 | - description: Install DogTag server service |
| 187 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 188 | -C 'I@dogtag:server' state.sls dogtag.server |
| 189 | node_name: {{ HOSTNAME_CFG01 }} |
| 190 | retry: {count: 1, delay: 5} |
| 191 | skip_fail: false |
| 192 | |
| 193 | # Install Barbican server service |
| 194 | - description: Install Barbican server service |
| 195 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 196 | -C 'I@barbican:server and *01*' state.sls barbican.server |
| 197 | node_name: {{ HOSTNAME_CFG01 }} |
| 198 | retry: {count: 1, delay: 5} |
| 199 | skip_fail: false |
| 200 | |
| 201 | - description: Install Barbican server service |
| 202 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 203 | -C 'I@barbican:server' state.sls barbican.server |
| 204 | node_name: {{ HOSTNAME_CFG01 }} |
| 205 | retry: {count: 1, delay: 5} |
| 206 | skip_fail: false |
| 207 | |
| 208 | - description: Install Barbican client |
| 209 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False |
| 210 | -C 'I@barbican:client' state.sls barbican.client |
| 211 | node_name: {{ HOSTNAME_CFG01 }} |
| 212 | retry: {count: 1, delay: 5} |
| 213 | skip_fail: True |
| 214 | |
| 215 | # Install compute node |
| 216 | |
| 217 | - description: Apply formulas for compute node |
| 218 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 219 | node_name: {{ HOSTNAME_CFG01 }} |
| 220 | retry: {count: 1, delay: 5} |
| 221 | skip_fail: true |
| 222 | |
| 223 | - description: Re-apply(as in doc) formulas for compute node |
| 224 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply |
| 225 | node_name: {{ HOSTNAME_CFG01 }} |
| 226 | retry: {count: 1, delay: 5} |
| 227 | skip_fail: false |
| 228 | |
| 229 | - description: Check IP on computes |
| 230 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run |
| 231 | 'ip a' |
| 232 | node_name: {{ HOSTNAME_CFG01 }} |
| 233 | retry: {count: 10, delay: 30} |
| 234 | skip_fail: false |
| 235 | |
Oleksii Butenko | 8be76f6 | 2018-03-30 13:35:26 +0300 | [diff] [blame] | 236 | - description: Create net04_external |
| 237 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 238 | '. /root/keystonercv3; neutron net-create net04_ext --router:external True --provider:physical_network physnet1 --provider:network_type flat' |
| 239 | node_name: {{ HOSTNAME_CFG01 }} |
| 240 | retry: {count: 1, delay: 30} |
| 241 | skip_fail: false |
| 242 | |
| 243 | - description: Create subnet_external |
| 244 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 245 | '. /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' |
| 246 | node_name: {{ HOSTNAME_CFG01 }} |
| 247 | retry: {count: 1, delay: 30} |
| 248 | skip_fail: false |
| 249 | |
| 250 | - description: Create net04 |
| 251 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 252 | '. /root/keystonercv3; neutron net-create net04' |
| 253 | node_name: {{ HOSTNAME_CFG01 }} |
| 254 | retry: {count: 1, delay: 30} |
| 255 | skip_fail: false |
| 256 | |
| 257 | - description: Create subnet_net04 |
| 258 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 259 | '. /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' |
| 260 | node_name: {{ HOSTNAME_CFG01 }} |
| 261 | retry: {count: 1, delay: 30} |
| 262 | skip_fail: false |
| 263 | |
| 264 | - description: Create router |
| 265 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 266 | '. /root/keystonercv3; neutron router-create net04_router01' |
| 267 | node_name: {{ HOSTNAME_CFG01 }} |
| 268 | retry: {count: 1, delay: 30} |
| 269 | skip_fail: false |
| 270 | |
| 271 | - description: Set geteway |
| 272 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 273 | '. /root/keystonercv3; neutron router-gateway-set net04_router01 net04_ext' |
| 274 | node_name: {{ HOSTNAME_CFG01 }} |
| 275 | retry: {count: 1, delay: 30} |
| 276 | skip_fail: false |
| 277 | |
| 278 | - description: Add interface |
| 279 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'ctl01*' cmd.run |
| 280 | '. /root/keystonercv3; neutron router-interface-add net04_router01 net04__subnet' |
| 281 | node_name: {{ HOSTNAME_CFG01 }} |
| 282 | retry: {count: 1, delay: 30} |
| 283 | skip_fail: false |
| 284 | |
Oleksii Butenko | 8be76f6 | 2018-03-30 13:35:26 +0300 | [diff] [blame] | 285 | - description: sync time |
| 286 | cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run |
| 287 | 'service ntp stop; ntpd -gq; service ntp start' |
| 288 | node_name: {{ HOSTNAME_CFG01 }} |
| 289 | retry: {count: 1, delay: 30} |
| 290 | skip_fail: false |
| 291 | |
Oleksii Butenko | 8be76f6 | 2018-03-30 13:35:26 +0300 | [diff] [blame] | 292 | - description: Install docker.io on gtw |
| 293 | cmd: salt-call cmd.run 'apt-get install docker.io -y' |
| 294 | node_name: {{ HOSTNAME_GTW01 }} |
| 295 | retry: {count: 1, delay: 30} |
| 296 | skip_fail: false |
| 297 | |
| 298 | - description: Enable forward policy |
| 299 | cmd: iptables --policy FORWARD ACCEPT |
| 300 | node_name: {{ HOSTNAME_GTW01 }} |
| 301 | retry: {count: 1, delay: 30} |
| 302 | skip_fail: false |
| 303 | |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 304 | - description: Install manila-api on first node |
| 305 | cmd: | |
| 306 | salt -C 'I@manila:api and *01*' state.sls manila.api; |
| 307 | node_name: {{ HOSTNAME_CFG01 }} |
| 308 | retry: {count: 1, delay: 5} |
| 309 | skip_fail: false |
| 310 | |
| 311 | - description: Install manila-api on other nodes |
| 312 | cmd: | |
| 313 | salt -C 'I@manila:api and not *01*' state.sls manila.api; |
| 314 | node_name: {{ HOSTNAME_CFG01 }} |
| 315 | retry: {count: 1, delay: 5} |
| 316 | skip_fail: false |
| 317 | |
| 318 | - description: Install manila-scheduler |
| 319 | cmd: | |
| 320 | salt -C 'I@manila:scheduler' state.sls manila.scheduler; |
| 321 | node_name: {{ HOSTNAME_CFG01 }} |
| 322 | retry: {count: 1, delay: 5} |
| 323 | skip_fail: false |
| 324 | |
| 325 | - description: Install manila-share |
| 326 | cmd: | |
| 327 | salt -C 'I@manila:share' state.sls manila.share; |
| 328 | node_name: {{ HOSTNAME_CFG01 }} |
| 329 | retry: {count: 1, delay: 5} |
| 330 | skip_fail: false |
| 331 | |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 332 | - description: WR https://mirantis.jira.com/browse/PROD-19012 |
| 333 | cmd: | |
Tatyana Leontovich | 1618a2a | 2018-04-03 10:19:25 +0300 | [diff] [blame] | 334 | salt 'ctl*' cmd.run 'systemctl restart apache2' |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 335 | node_name: {{ HOSTNAME_CFG01 }} |
Tatyana Leontovich | 1618a2a | 2018-04-03 10:19:25 +0300 | [diff] [blame] | 336 | retry: {count: 3, delay: 15} |
Tatyana Leontovich | 3cc1c13 | 2018-04-03 00:41:17 +0300 | [diff] [blame] | 337 | skip_fail: false |
| 338 | |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 339 | - description: Check manila-services |
| 340 | cmd: | |
| 341 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila service-list' |
| 342 | node_name: {{ HOSTNAME_CFG01 }} |
Oleksii Butenko | 3deb90e | 2018-04-06 15:34:38 +0300 | [diff] [blame] | 343 | retry: {count: 3, delay: 5} |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 344 | skip_fail: false |
| 345 | |
| 346 | - description: Create manila type |
| 347 | cmd: | |
sgudz | 1d65840 | 2018-04-06 11:59:48 +0300 | [diff] [blame] | 348 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila type-create default false --create_share_from_snapshot_support true --revert_to_snapshot_support true --mount_snapshot_support true --snapshot_support true --is_public true' |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 349 | node_name: {{ HOSTNAME_CFG01 }} |
Oleksii Butenko | a561a8a | 2018-05-08 15:12:26 +0300 | [diff] [blame] | 350 | retry: {count: 3, delay: 5} |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 351 | skip_fail: false |
| 352 | |
| 353 | - description: Create CIFS and NFS share and check it status |
| 354 | cmd: | |
| 355 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create CIFS 1 --share-type=default'; |
| 356 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila create NFS 1 --share-type=default'; |
| 357 | sleep 5; |
| 358 | salt 'ctl01*' cmd.run '. /root/keystonercv3; manila list'; |
| 359 | node_name: {{ HOSTNAME_CFG01 }} |
Oleksii Butenko | a561a8a | 2018-05-08 15:12:26 +0300 | [diff] [blame] | 360 | retry: {count: 3, delay: 5} |
sgudz | 3fd4454 | 2018-04-02 11:45:49 +0300 | [diff] [blame] | 361 | skip_fail: false |
Oleksii Butenko | 0a38bae | 2018-04-05 18:23:20 +0300 | [diff] [blame] | 362 | |
| 363 | {{ SHARED.RUN_NEW_TEMPEST() }} |