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