blob: 7b33cd2013f268ffbe066059829db87d7562a0e2 [file] [log] [blame]
Oleksii Butenko4b494f82019-05-29 17:39:15 +03001{% 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 Butenkoef540152019-03-22 15:52:54 +02004
5{% import 'shared-salt.yaml' as SHARED with context %}
Dmitriy Kruglovbaea3572019-09-27 10:30:40 +02006{% import 'shared-test-tools.yaml' as SHARED_TEST_TOOLS with context %}
Hanna Arhipovaaad914c2020-04-13 17:10:20 +03007{% import 'shared-workarounds.yaml' as SHARED_WORKAROUNDS with context %}
Hanna Arhipovab41cf972021-04-09 01:02:37 +03008{% import 'shared-maas.yaml' as SHARED_MAAS with context %}
Oleksii Butenkoef540152019-03-22 15:52:54 +02009
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
Dmitriy Kruglovbaea3572019-09-27 10:30:40 +020082
Hanna Arhipovaaad914c2020-04-13 17:10:20 +030083{{SHARED_TEST_TOOLS.MACRO_INSTALL_RECLASS_TOOLS()}}
Denis V. Meltsaykinb3b14f02020-04-27 15:50:02 +020084{{ SHARED_WORKAROUNDS.MACRO_CEPH_SET_PGNUM() }}
85{{ SHARED_WORKAROUNDS.CLEAR_CEPH_OSD_DRIVES() }}