Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 1 | {% 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 Butenko | 2e8e8ee | 2018-06-21 11:10:13 +0300 | [diff] [blame] | 6 | {% 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 Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 8 | {% 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 Butenko | 5cd0a16 | 2018-06-14 18:18:10 +0300 | [diff] [blame] | 13 | {% import 'shared-salt.yaml' as SHARED with context %} |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 14 | {% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %} |
Oleksii Butenko | 5cd0a16 | 2018-06-14 18:18:10 +0300 | [diff] [blame] | 15 | |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 16 | # 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 | |
sgudz | 62df2fc | 2018-10-09 12:26:19 +0300 | [diff] [blame^] | 38 | {{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }} |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 39 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 40 | {{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }} |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 41 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 42 | {{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }} |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 43 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 44 | {{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER() }} |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 45 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 46 | {{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }} |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 47 | |
| 48 | # isntall designate |
obutenko | 830e6f6 | 2018-07-03 16:37:13 +0300 | [diff] [blame] | 49 | #- 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 Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 55 | |
obutenko | 830e6f6 | 2018-07-03 16:37:13 +0300 | [diff] [blame] | 56 | #- 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 Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 62 | |
Dennis Dmitriev | 4034db0 | 2018-08-26 21:50:13 +0300 | [diff] [blame] | 63 | {{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }} |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 64 | |
| 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} |
sgudz | 62df2fc | 2018-10-09 12:26:19 +0300 | [diff] [blame^] | 99 | skip_fail: false |