Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 1 | {% from 'cookied-model-generator/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | {% from 'cookied-model-generator/underlay.yaml' import DOMAIN_NAME with context %} |
| 3 | |
| 4 | {% set LAB_CONFIG_NAME = 'cookied-bm-mcp-dvr-vxlan' %} |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 5 | {% set SALT_VERSION = os_env('SALT_VERSION', '2017.7') %} |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 6 | # Name of the context file (without extension, that is fixed .yaml) used to render the Environment model |
| 7 | {% set ENVIRONMENT_MODEL_INVENTORY_NAME = os_env('ENVIRONMENT_MODEL_INVENTORY_NAME','cookied-bm-mcp-dvr-vxlan') %} |
| 8 | # Path to the context files used to render Cluster and Environment models |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 9 | {% set CLUSTER_CONTEXT_NAME = 'salt-context-cookiecutter-openstack_ovs_dvr_vxlan.yaml' %} |
| 10 | {% set ENVIRONMENT_CONTEXT_NAMES = ['salt-context-vcp-environment.yaml', 'salt-context-lab03-environment.yaml'] %} |
| 11 | {% set CONTROL_VLAN = os_env('CONTROL_VLAN', '2403') %} |
| 12 | {% set TENANT_VLAN = os_env('TENANT_VLAN', '2406') %} |
| 13 | {% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'proposed') %} |
| 14 | {% set SALT_REPOSITORY = os_env('SALT_REPOSITORY', "deb [arch=amd64] http://mirror.mirantis.com/" + REPOSITORY_SUITE+ "/saltstack-2016.3/${DISTRIB_CODENAME} ${DISTRIB_CODENAME} main") %} |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 15 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 16 | |
Dennis Dmitriev | 2c9db8d | 2018-03-26 21:49:59 +0300 | [diff] [blame] | 17 | {{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }} |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 18 | {{ SHARED.MACRO_INSTALL_FORMULAS('\*') }} |
Tatyana Leontovich | 2e89275 | 2018-07-05 19:56:10 +0300 | [diff] [blame] | 19 | |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 20 | {{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }} |
| 21 | |
| 22 | {{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }} |
| 23 | |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 24 | - description: "Workaround for rack01 compute generator" |
| 25 | cmd: | |
| 26 | set -e; |
| 27 | . /root/venv-reclass-tools/bin/activate; |
| 28 | # Remove rack01 key |
Dennis Dmitriev | cb77f02 | 2018-02-18 20:42:35 +0200 | [diff] [blame] | 29 | reclass-tools del-key parameters.reclass.storage.node.openstack_compute_rack01 /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml; |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 30 | # Add openstack_compute_node definition from system |
Dennis Dmitriev | cb77f02 | 2018-02-18 20:42:35 +0200 | [diff] [blame] | 31 | reclass-tools add-key 'classes' 'system.reclass.storage.system.openstack_compute_multi' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml --merge; |
Dennis Dmitriev | 759f323 | 2018-08-03 17:11:13 +0300 | [diff] [blame^] | 32 | # Workaround for compute nodes addresses |
| 33 | reclass-tools add-key parameters._param.openstack_compute_node01_address ${_param:openstack_compute_rack01_single_subnet}.105 /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml; |
| 34 | reclass-tools add-key parameters._param.openstack_compute_node02_address ${_param:openstack_compute_rack01_single_subnet}.106 /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml; |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 35 | node_name: {{ HOSTNAME_CFG01 }} |
| 36 | retry: {count: 1, delay: 10} |
| 37 | skip_fail: false |
| 38 | |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 39 | |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 40 | - description: Temporary workaround for removing cinder-volume from CTL nodes |
| 41 | cmd: | |
Dennis Dmitriev | cb77f02 | 2018-02-18 20:42:35 +0200 | [diff] [blame] | 42 | sed -i 's/\-\ system\.cinder\.volume\.single//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml; |
| 43 | sed -i 's/\-\ system\.cinder\.volume\.notification\.messagingv2//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml; |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 44 | node_name: {{ HOSTNAME_CFG01 }} |
| 45 | retry: {count: 1, delay: 5} |
| 46 | skip_fail: true |
| 47 | |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 48 | - description: Temporary WR for correct bridge name according to envoronment templates |
| 49 | cmd: | |
| 50 | sed -i 's/br\-ctl/br\_ctl/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml; |
| 51 | sed -i 's/br\-mgm/br\_mgm/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml; |
| 52 | sed -i 's/br\-ctl/br\_ctl/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/gateway.yml; |
| 53 | salt '*' saltutil.refresh_pillar; |
| 54 | node_name: {{ HOSTNAME_CFG01 }} |
| 55 | retry: {count: 1, delay: 10} |
| 56 | skip_fail: false |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 57 | |
| 58 | {{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }} |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 59 | |