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