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