blob: 9a571ba597c24ed6d7276255e7bb3fc5c613dd1d [file] [log] [blame]
sgudzc97385a2018-11-29 17:01:53 +02001{% from 'cookied-cicd-bm-os-contrail40-maas/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'cookied-cicd-bm-os-contrail40-maas/underlay.yaml' import LAB_CONFIG_NAME with context %}
3{% from 'cookied-cicd-bm-os-contrail40-maas/underlay.yaml' import DOMAIN_NAME with context %}
4
5# Other salt model repository parameters see in shared-salt.yaml
6
7{% import 'shared-salt.yaml' as SHARED with context %}
8
9- description: Wait for salt-master is ready after configdrive user-data
10 cmd: |
11 timeout 120 salt-call test.ping
12 node_name: {{ HOSTNAME_CFG01 }}
13 retry: {count: 2, delay: 5}
14 skip_fail: false
15
16{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
17
18{{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
19
20{{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}
21
22- description: Prepare maas
23 cmd: |
24 salt-call state.sls maas.cluster;
25 salt-call state.sls maas.region;
26 node_name: {{ HOSTNAME_CFG01 }}
27 retry: {count: 2, delay: 5}
28 skip_fail: false
29
Dennis Dmitriev74cda482018-12-14 13:01:32 +020030- description: Generate a public key for machines in MAAS
31 cmd: |
32 ssh-keygen -y -f ~root/.ssh/id_rsa > ~root/.ssh/id_rsa.pub
33 maas mirantis sshkeys create key="$(cat ~root/.ssh/id_rsa.pub)"
34 node_name: {{ HOSTNAME_CFG01 }}
35 retry: {count: 1, delay: 5}
36 skip_fail: false
37
sgudzc97385a2018-11-29 17:01:53 +020038- description: Run comissioning of BM nodes
39 cmd: |
40 salt-call maas.process_machines
41 node_name: {{ HOSTNAME_CFG01 }}
42 retry: {count: 1, delay: 5}
43 skip_fail: false
44
45- description: Wait for machines ready
46 cmd: |
47 salt-call maas.machines_status && timeout 120 salt-call state.sls maas.machines.wait_for_ready
48 node_name: {{ HOSTNAME_CFG01 }}
49 retry: {count: 7, delay: 5}
50 skip_fail: false
51
52- description: Enforce the interfaces configuration defined in the model for servers
53 cmd: |
54 salt-call state.sls maas.machines.assign_ip;
55 node_name: {{ HOSTNAME_CFG01 }}
56 retry: {count: 1, delay: 5}
57 skip_fail: false
58
59- description: provision the automatically commissioned physical nodes through MAAS
60 cmd: |
61 salt-call maas.deploy_machines;
62 node_name: {{ HOSTNAME_CFG01 }}
63 retry: {count: 3, delay: 5}
64 skip_fail: false
65
66- description: Wait for machines deployed
67 cmd: |
68 salt-call maas.machines_status && timeout 300 salt-call state.sls maas.machines.wait_for_deployed
69 node_name: {{ HOSTNAME_CFG01 }}
70 retry: {count: 6, delay: 5}
71 skip_fail: false