Andrew Baraniuk | 67c04ec | 2019-05-27 13:46:10 +0300 | [diff] [blame] | 1 | {% set HOSTNAME_CFG01='cfg01.heat-bm-cicd-queens-contrail-sl.local' %} |
| 2 | {% set LAB_CONFIG_NAME='heat-bm-cicd-queens-contrail-sl' %} |
| 3 | {% set DOMAIN_NAME='heat-bm-cicd-queens-contrail-sl.local' %} |
| 4 | |
| 5 | # Other salt model repository parameters see in shared-salt.yaml |
| 6 | |
| 7 | {% import 'shared-salt.yaml' as SHARED with context %} |
Dmitriy Kruglov | baea357 | 2019-09-27 10:30:40 +0200 | [diff] [blame] | 8 | {% import 'shared-test-tools.yaml' as SHARED_TEST_TOOLS with context %} |
Hanna Arhipova | aad914c | 2020-04-13 17:10:20 +0300 | [diff] [blame] | 9 | {% import 'shared-workarounds.yaml' as SHARED_WORKAROUNDS with context %} |
Hanna Arhipova | b41cf97 | 2021-04-09 01:02:37 +0300 | [diff] [blame] | 10 | {% import 'shared-maas.yaml' as SHARED_MAAS with context %} |
Andrew Baraniuk | 67c04ec | 2019-05-27 13:46:10 +0300 | [diff] [blame] | 11 | |
| 12 | - description: Wait for salt-master is ready after configdrive user-data |
| 13 | cmd: | |
| 14 | timeout 120 salt-call test.ping |
| 15 | node_name: {{ HOSTNAME_CFG01 }} |
| 16 | retry: {count: 2, delay: 5} |
| 17 | skip_fail: false |
| 18 | |
| 19 | {{ SHARED.MACRO_INSTALL_SALT_MINIONS() }} |
Hanna Arhipova | b41cf97 | 2021-04-09 01:02:37 +0300 | [diff] [blame] | 20 | {{ SHARED_MAAS.REBOOT_HW_NODES('engineer', 'KBwdcRqwed3w2', |
| 21 | [ |
| 22 | "185.8.59.227", |
| 23 | "185.8.59.229", |
| 24 | "5.43.225.88", |
| 25 | "5.43.225.112", |
| 26 | "5.43.225.208", |
| 27 | "5.43.227.118", |
| 28 | "185.8.58.248", |
| 29 | "185.8.59.222", |
| 30 | "5.43.225.228", |
| 31 | "5.43.229.28", |
| 32 | "5.43.225.23", |
| 33 | "185.8.58.9", |
| 34 | "185.8.58.246", |
| 35 | "185.8.58.243", |
| 36 | "185.8.58.244" |
| 37 | ]) }} |
Andrew Baraniuk | 67c04ec | 2019-05-27 13:46:10 +0300 | [diff] [blame] | 38 | |
| 39 | {{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}} |
| 40 | |
| 41 | {{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}} |
| 42 | |
| 43 | - description: Generate a public key for machines in MAAS |
| 44 | cmd: | |
| 45 | ssh-keygen -y -f ~root/.ssh/id_rsa > ~root/.ssh/id_rsa.pub |
| 46 | maas mirantis sshkeys create key="$(cat ~root/.ssh/id_rsa.pub)" |
| 47 | node_name: {{ HOSTNAME_CFG01 }} |
| 48 | retry: {count: 1, delay: 5} |
| 49 | skip_fail: false |
| 50 | |
| 51 | - description: Run comissioning of BM nodes |
| 52 | cmd: | |
| 53 | salt-call maas.process_machines |
| 54 | node_name: {{ HOSTNAME_CFG01 }} |
| 55 | retry: {count: 1, delay: 5} |
| 56 | skip_fail: false |
| 57 | |
| 58 | - description: Wait for machines ready |
| 59 | cmd: | |
| 60 | salt-call maas.machines_status && timeout 120 salt-call state.sls maas.machines.wait_for_ready |
| 61 | node_name: {{ HOSTNAME_CFG01 }} |
| 62 | retry: {count: 7, delay: 5} |
| 63 | skip_fail: false |
| 64 | |
| 65 | - description: Enforce the interfaces configuration defined in the model for servers |
| 66 | cmd: | |
| 67 | salt-call state.sls maas.machines.assign_ip; |
| 68 | node_name: {{ HOSTNAME_CFG01 }} |
| 69 | retry: {count: 1, delay: 5} |
| 70 | skip_fail: false |
| 71 | |
| 72 | - description: Remove all the salt-minions and re-register the cfg01 minion |
| 73 | cmd: | |
| 74 | salt-key -y -D; |
| 75 | salt-call test.ping |
| 76 | sleep 5 |
| 77 | # Check that the cfg01 is registered |
| 78 | salt-key | grep cfg01 |
| 79 | node_name: {{ HOSTNAME_CFG01 }} |
| 80 | retry: {count: 1, delay: 5} |
| 81 | skip_fail: false |
| 82 | |
| 83 | - description: provision the automatically commissioned physical nodes through MAAS |
| 84 | cmd: | |
| 85 | salt-call maas.deploy_machines; |
| 86 | node_name: {{ HOSTNAME_CFG01 }} |
| 87 | retry: {count: 3, delay: 5} |
| 88 | skip_fail: false |
| 89 | |
| 90 | - description: Wait for machines deployed |
| 91 | cmd: | |
| 92 | salt-call maas.machines_status && timeout 300 salt-call state.sls maas.machines.wait_for_deployed |
| 93 | node_name: {{ HOSTNAME_CFG01 }} |
| 94 | retry: {count: 6, delay: 5} |
| 95 | skip_fail: false |
| 96 | |
Hanna Arhipova | aad914c | 2020-04-13 17:10:20 +0300 | [diff] [blame] | 97 | {{SHARED_TEST_TOOLS.MACRO_INSTALL_RECLASS_TOOLS()}} |
Denis V. Meltsaykin | b3b14f0 | 2020-04-27 15:50:02 +0200 | [diff] [blame] | 98 | {{ SHARED_WORKAROUNDS.MACRO_CEPH_SET_PGNUM() }} |
| 99 | {{ SHARED_WORKAROUNDS.CLEAR_CEPH_OSD_DRIVES() }} |