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