blob: 98307e3ca802b4e9190a1373a953c77e2666a59c [file] [log] [blame]
Dmitry Tyzhnenko80ce0202019-02-07 13:27:19 +02001{%- set test_public_key = config.underlay.ssh_keys[0]["public"] %}
2
3{% from 'physical-mcp-offline-vxlan/underlay.yaml' import HOSTNAME_CFG01 with context %}
4{% from 'physical-mcp-offline-vxlan/underlay.yaml' import ETH0_IP_ADDRESS_CFG01 with context %}
5
6{% import 'shared-maas.yaml' as SHARED_MAAS with context %}
7
8- description: Wait while a salt-minion is started
9 cmd: systemctl is-active salt-minion
10 node_name: {{ HOSTNAME_CFG01 }}
11 retry: {count: 10, delay: 10}
12 skip_fail: false
13
14- description: Refresh pillars on master node
15 cmd: sleep 90; salt-call --hard-crash --state-output=mixed --state-verbose=False saltutil.refresh_pillar
16 node_name: {{ HOSTNAME_CFG01 }}
17 retry: {count: 1, delay: 5}
18 skip_fail: false
19
20- description: Sync all salt resources on master node
21 cmd: sleep 60; salt-call --hard-crash --state-output=mixed --state-verbose=False saltutil.sync_all && sleep 5
22 node_name: {{ HOSTNAME_CFG01 }}
23 retry: {count: 1, delay: 5}
24 skip_fail: false
25
26- description: Setup NTP
27 cmd: salt-call --hard-crash --state-output=mixed --state-verbose=False state.sls ntp.server
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 5}
30 skip_fail: false
31
32- description: Wait until salt is up
33 cmd: sleep 60
34 node_name: {{ HOSTNAME_CFG01 }}
35 retry: {count: 1, delay: 5}
36 skip_fail: false
37
38{{ SHARED_MAAS.AUTH_IN_MAAS() }}
39{{ SHARED_MAAS.SET_LOCAL_DNS() }}
40{{ SHARED_MAAS.ADD_ROOT_SSH_KEY_TO_NODES() }}
41{{ SHARED_MAAS.ADD_TEST_SSH_KEY_TO_NODES(test_public_key) }}
42{{ SHARED_MAAS.ADD_ROOT_PUB_SSH_TO_MASS() }}
43{{ SHARED_MAAS.COMMISSION_VMS() }}
44{{ SHARED_MAAS.DEPLOY_VMS() }}
45{{ SHARED_MAAS.CONFIG_MACHINES(target='I@salt:control or I@nova:compute or I@ceph:osd or I@neutron:gateway') }}
46{{ SHARED_MAAS.ADD_ROOT_SSH_KEY_TO_NODES() }}
47{{ SHARED_MAAS.ADD_TEST_SSH_KEY_TO_NODES(test_public_key) }}