blob: 59e85e344616f6bff77418a66f8d282071bc7a63 [file] [log] [blame]
{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_CFG01 with context %}
{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_CTL01 with context %}
{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_CTL02 with context %}
{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_CTL03 with context %}
{% from 'cookied-mcp-pike-dvr/underlay.yaml' import HOSTNAME_GTW01 with context %}
{% from 'cookied-mcp-pike-dvr/underlay.yaml' import LAB_CONFIG_NAME with context %}
{% from 'cookied-mcp-pike-dvr/underlay.yaml' import DOMAIN_NAME with context %}
{% from 'shared-salt.yaml' import IPV4_NET_EXTERNAL_PREFIX with context %}
{% from 'shared-salt.yaml' import IPV4_NET_TENANT_PREFIX with context %}
{% set LAB_CONFIG_NAME = os_env('LAB_CONFIG_NAME') %}
{% set OVERRIDE_POLICY = os_env('OVERRIDE_POLICY', '') %}
{% import 'shared-salt.yaml' as SHARED with context %}
{% import 'shared-openstack.yaml' as SHARED_OPENSTACK with context %}
# Install OpenStack control services
{%- if OVERRIDE_POLICY != '' %}
- description: Upload policy override
upload:
local_path: {{ config.salt_deploy.templates_dir }}{{ LAB_CONFIG_NAME }}/
local_filename: overrides-policy.yml
remote_path: /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/
node_name: {{ HOSTNAME_CFG01 }}
- description: Create custom cluster control class
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
node_name: {{ HOSTNAME_CFG01 }}
- description: Rename control classes
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 &&
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 &&
salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_all &&
salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.refresh_pillar
node_name: {{ HOSTNAME_CFG01 }}
{%- endif %}
# Install OpenStack control services
{{ SHARED_OPENSTACK.MACRO_INSTALL_KEYSTONE() }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_GLANCE() }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_NOVA() }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_CINDER(INSTALL_VOLUME=true) }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_NEUTRON() }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_HEAT() }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_DESIGNATE(INSTALL_BIND=true) }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_HORIZON() }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_COMPUTE(CELL_MAPPING=true) }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_MANILA() }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_OCTAVIA_API() }}
{{ SHARED_OPENSTACK.MACRO_INSTALL_OCTAVIA_MANAGER() }}