blob: 69b3d07f559d5d806b8de070da651aca4b898ff2 [file] [log] [blame]
Vladimir Khlyunev375b9452024-11-21 01:46:31 +04001{% set HOSTNAME_CFG01='cfg01.bm-queens-sriov-ovs.local' %}
2{% set LAB_CONFIG_NAME='bm-queens-sriov-ovs' %}
3{% set DOMAIN_NAME='bm-queens-sriov-ovs.local' %}
4
5{% import 'shared-salt.yaml' as SHARED with context %}
6{% import 'shared-test-tools.yaml' as SHARED_TEST_TOOLS with context %}
7{% import 'shared-workarounds.yaml' as SHARED_WORKAROUNDS with context %}
8{% import 'shared-maas.yaml' as SHARED_MAAS with context %}
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() }}
18
19{{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
20
21{{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}
22
23- description: Generate a public key for machines in MAAS
24 cmd: |
25 ssh-keygen -y -f ~root/.ssh/id_rsa > ~root/.ssh/id_rsa.pub
26 maas mirantis sshkeys create key="$(cat ~root/.ssh/id_rsa.pub)"
27 node_name: {{ HOSTNAME_CFG01 }}
28 retry: {count: 1, delay: 5}
29 skip_fail: false
30
31- description: Run comissioning of BM nodes
32 cmd: |
33 salt-call maas.process_machines
34 node_name: {{ HOSTNAME_CFG01 }}
35 retry: {count: 1, delay: 5}
36 skip_fail: false
37
38- description: Wait for machines ready
39 cmd: |
40 salt-call maas.machines_status && timeout 120 salt-call state.sls maas.machines.wait_for_ready
41 node_name: {{ HOSTNAME_CFG01 }}
42 retry: {count: 7, delay: 5}
43 skip_fail: false
44
45- description: Enforce the interfaces configuration defined in the model for servers
46 cmd: |
47 salt-call state.sls maas.machines.assign_ip;
48 node_name: {{ HOSTNAME_CFG01 }}
49 retry: {count: 1, delay: 5}
50 skip_fail: false
51
52- description: Assign drive partitions to machines
53 cmd: salt-call state.sls maas.machines.storage
54 node_name: {{ HOSTNAME_CFG01 }}
55 retry: {count: 1, delay: 5}
56 skip_fail: false
57
58- description: Remove all the salt-minions and re-register the cfg01 minion
59 cmd: |
60 salt-key -y -D;
61 salt-call test.ping
62 sleep 5
63 # Check that the cfg01 is registered
64 salt-key | grep cfg01
65 node_name: {{ HOSTNAME_CFG01 }}
66 retry: {count: 1, delay: 5}
67 skip_fail: false
68
69- description: provision the automatically commissioned physical nodes through MAAS
70 cmd: |
71 salt-call maas.deploy_machines;
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 3, delay: 5}
74 skip_fail: false
75
76- description: Wait for machines deployed
77 cmd: |
78 salt-call maas.machines_status && timeout 300 salt-call state.sls maas.machines.wait_for_deployed
79 node_name: {{ HOSTNAME_CFG01 }}
80 retry: {count: 6, delay: 5}
81 skip_fail: false
82
83{{SHARED_TEST_TOOLS.MACRO_INSTALL_RECLASS_TOOLS()}}
84{{ SHARED_WORKAROUNDS.MACRO_CEPH_SET_PGNUM() }}
85{{ SHARED_WORKAROUNDS.CLEAR_CEPH_OSD_DRIVES() }}