blob: 21d8fb4689fa989da8467aaab7a75715821e0637 [file] [log] [blame]
Andrew Baraniuk6361cfc2019-06-04 12:58:14 +03001{% set HOSTNAME_CFG01='cfg01.heat-bm-cicd-pike-contrail-sl.local' %}
2{% set LAB_CONFIG_NAME='heat-bm-cicd-pike-contrail-sl' %}
3{% set DOMAIN_NAME='heat-bm-cicd-pike-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 Kruglovbaea3572019-09-27 10:30:40 +02008{% import 'shared-test-tools.yaml' as SHARED_TEST_TOOLS with context %}
Hanna Arhipovaaad914c2020-04-13 17:10:20 +03009{% import 'shared-workarounds.yaml' as SHARED_WORKAROUNDS with context %}
Hanna Arhipovab41cf972021-04-09 01:02:37 +030010{% import 'shared-maas.yaml' as SHARED_MAAS with context %}
Andrew Baraniuk6361cfc2019-06-04 12:58:14 +030011
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() }}
20
21{{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
22
23{{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}
24
25- description: Generate a public key for machines in MAAS
26 cmd: |
27 ssh-keygen -y -f ~root/.ssh/id_rsa > ~root/.ssh/id_rsa.pub
28 maas mirantis sshkeys create key="$(cat ~root/.ssh/id_rsa.pub)"
29 node_name: {{ HOSTNAME_CFG01 }}
30 retry: {count: 1, delay: 5}
31 skip_fail: false
32
33- description: Run comissioning of BM nodes
34 cmd: |
35 salt-call maas.process_machines
36 node_name: {{ HOSTNAME_CFG01 }}
37 retry: {count: 1, delay: 5}
38 skip_fail: false
39
40- description: Wait for machines ready
41 cmd: |
42 salt-call maas.machines_status && timeout 120 salt-call state.sls maas.machines.wait_for_ready
43 node_name: {{ HOSTNAME_CFG01 }}
44 retry: {count: 7, delay: 5}
45 skip_fail: false
46
47- description: Enforce the interfaces configuration defined in the model for servers
48 cmd: |
49 salt-call state.sls maas.machines.assign_ip;
50 node_name: {{ HOSTNAME_CFG01 }}
51 retry: {count: 1, delay: 5}
52 skip_fail: false
53
54- description: Remove all the salt-minions and re-register the cfg01 minion
55 cmd: |
56 salt-key -y -D;
57 salt-call test.ping
58 sleep 5
59 # Check that the cfg01 is registered
60 salt-key | grep cfg01
61 node_name: {{ HOSTNAME_CFG01 }}
62 retry: {count: 1, delay: 5}
63 skip_fail: false
64
65- description: provision the automatically commissioned physical nodes through MAAS
66 cmd: |
67 salt-call maas.deploy_machines;
68 node_name: {{ HOSTNAME_CFG01 }}
69 retry: {count: 3, delay: 5}
70 skip_fail: false
71
72- description: Wait for machines deployed
73 cmd: |
74 salt-call maas.machines_status && timeout 300 salt-call state.sls maas.machines.wait_for_deployed
75 node_name: {{ HOSTNAME_CFG01 }}
76 retry: {count: 6, delay: 5}
77 skip_fail: false
78
Hanna Arhipova3df06bb2021-10-22 17:09:38 +030079{{ SHARED_TEST_TOOLS.MACRO_INSTALL_RECLASS_TOOLS() }}
80{{ SHARED_WORKAROUNDS.DELETE_BOND0() }}
Hanna Arhipovaaad914c2020-04-13 17:10:20 +030081{{ SHARED_WORKAROUNDS.MACRO_CEPH_SET_PGNUM() }}
Denis V. Meltsaykinb3b14f02020-04-27 15:50:02 +020082{{ SHARED_WORKAROUNDS.CLEAR_CEPH_OSD_DRIVES() }}