blob: f8368a3e23710b6ed034be2366370787cddba8ca [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 %}
Andrew Baraniuk6361cfc2019-06-04 12:58:14 +03009
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: Remove all the salt-minions and re-register the cfg01 minion
53 cmd: |
54 salt-key -y -D;
55 salt-call test.ping
56 sleep 5
57 # Check that the cfg01 is registered
58 salt-key | grep cfg01
59 node_name: {{ HOSTNAME_CFG01 }}
60 retry: {count: 1, delay: 5}
61 skip_fail: false
62
63- description: provision the automatically commissioned physical nodes through MAAS
64 cmd: |
65 salt-call maas.deploy_machines;
66 node_name: {{ HOSTNAME_CFG01 }}
67 retry: {count: 3, delay: 5}
68 skip_fail: false
69
70- description: Wait for machines deployed
71 cmd: |
72 salt-call maas.machines_status && timeout 300 salt-call state.sls maas.machines.wait_for_deployed
73 node_name: {{ HOSTNAME_CFG01 }}
74 retry: {count: 6, delay: 5}
75 skip_fail: false
76
Dmitriy Kruglovbaea3572019-09-27 10:30:40 +020077{{SHARED_TEST_TOOLS.MACRO_INSTALL_RECLASS_TOOLS()}}