blob: 8c5bee99e1774cddf998b42f17648eae9134661c [file] [log] [blame]
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +02001{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_CTL01 with context %}
3{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_CTL02 with context %}
4{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_CTL03 with context %}
5{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_GTW01 with context %}
Oleksii Butenko2e8e8ee2018-06-21 11:10:13 +03006{% from 'cookied-mcp-pike-dvr/underlay.yaml' import LAB_CONFIG_NAME with context %}
7{% from 'cookied-mcp-pike-dvr/underlay.yaml' import DOMAIN_NAME with context %}
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +02008{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
9{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
10{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME') %}
11{% set OVERRIDE_POLICY = os_env('OVERRIDE_POLICY', '') %}
12
Oleksii Butenko5cd0a162018-06-14 18:18:10 +030013{% import 'shared-salt.yaml' as SHARED with context %}
Dennis Dmitriev4034db02018-08-26 21:50:13 +030014{% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
Oleksii Butenko5cd0a162018-06-14 18:18:10 +030015
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020016# Install OpenStack control services
17
18{%- if OVERRIDE_POLICY != '' %}
19- description: Upload policy override
20 upload:
21 local_path: {{ config.salt_deploy.templates_dir }}{{ LAB_CONFIG_NAME }}/
22 local_filename: overrides-policy.yml
23 remote_path: /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/
24 node_name: {{ HOSTNAME_CFG01 }}
25
26- description: Create custom cluster control class
27 cmd: echo -e "classes:\n- cluster.{{ LAB_CONFIG_NAME }}.openstack.control_orig\n$(cat /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml)" > /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml
28 node_name: {{ HOSTNAME_CFG01 }}
29
30- description: Rename control classes
31 cmd: mv /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control.yml /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control_orig.yml &&
32 ln -s /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/overrides-policy.yml /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/control.yml &&
33 salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_all &&
34 salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.refresh_pillar
35 node_name: {{ HOSTNAME_CFG01 }}
36{%- endif %}
37
sgudz62df2fc2018-10-09 12:26:19 +030038{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }}
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020039
Dennis Dmitriev4034db02018-08-26 21:50:13 +030040{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020041
Dennis Dmitriev4034db02018-08-26 21:50:13 +030042{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020043
Dennis Dmitriev4034db02018-08-26 21:50:13 +030044{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }}
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020045
Dennis Dmitriev4034db02018-08-26 21:50:13 +030046{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020047
48# isntall designate
obutenko830e6f62018-07-03 16:37:13 +030049#- description: Install powerdns
50# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
51# -C 'I@powerdns:server' state.sls powerdns.server
52# node_name: {{ HOSTNAME_CFG01 }}
53# retry: {count: 1, delay: 5}
54# skip_fail: false
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020055
obutenko830e6f62018-07-03 16:37:13 +030056#- description: Install designate
57# cmd: salt --hard-crash --state-output=mixed --state-verbose=False
58# -C 'I@designate:server' state.sls designate -b 1
59# node_name: {{ HOSTNAME_CFG01 }}
60# retry: {count: 5, delay: 10}
61# skip_fail: false
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020062
Dennis Dmitriev4034db02018-08-26 21:50:13 +030063{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
Dennis Dmitriev67aea4a2018-03-14 14:20:20 +020064
65- description: Deploy horizon dashboard
66 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
67 -C 'I@horizon:server' state.sls horizon
68 node_name: {{ HOSTNAME_CFG01 }}
69 retry: {count: 1, delay: 5}
70 skip_fail: true
71
72- description: Deploy nginx proxy
73 cmd: salt --hard-crash --state-output=mixed --state-verbose=False
74 -C 'I@nginx:server' state.sls nginx
75 node_name: {{ HOSTNAME_CFG01 }}
76 retry: {count: 1, delay: 5}
77 skip_fail: true
78
79
80# Install compute node
81
82- description: Apply formulas for compute node
83 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
84 node_name: {{ HOSTNAME_CFG01 }}
85 retry: {count: 1, delay: 5}
86 skip_fail: true
87
88- description: Re-apply(as in doc) formulas for compute node
89 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' state.apply
90 node_name: {{ HOSTNAME_CFG01 }}
91 retry: {count: 1, delay: 5}
92 skip_fail: false
93
94- description: Check IP on computes
95 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'cmp*' cmd.run
96 'ip a'
97 node_name: {{ HOSTNAME_CFG01 }}
98 retry: {count: 10, delay: 30}
sgudz62df2fc2018-10-09 12:26:19 +030099 skip_fail: false