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' %} |
| 5 | # Name of the context file (without extension, that is fixed .yaml) used to render the Environment model |
| 6 | {% set ENVIRONMENT_MODEL_INVENTORY_NAME = os_env('ENVIRONMENT_MODEL_INVENTORY_NAME','cookied-bm-mcp-dvr-vxlan') %} |
| 7 | # Path to the context files used to render Cluster and Environment models |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 8 | {% set CLUSTER_CONTEXT_NAME = 'salt-context-cookiecutter-openstack_ovs_dvr_vxlan.yaml' %} |
obutenko | a87bca9 | 2018-12-20 15:25:57 +0200 | [diff] [blame] | 9 | {% set ENVIRONMENT_CONTEXT_NAMES = ['salt-context-vcp-environment.yaml', 'salt-context-lab03-environment.yaml', 'salt-context-cookiecutter-openstack_ovs_dvr_vxlan.yaml'] %} |
Oleksii Butenko | 20947f2 | 2018-08-29 15:48:21 +0300 | [diff] [blame] | 10 | {% set CONTROL_VLAN = os_env('CONTROL_VLAN', '2404') %} |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 11 | {% set TENANT_VLAN = os_env('TENANT_VLAN', '2406') %} |
Dennis Dmitriev | d9168b5 | 2018-12-19 18:53:52 +0200 | [diff] [blame] | 12 | |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 13 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 14 | |
Dennis Dmitriev | 2c9db8d | 2018-03-26 21:49:59 +0300 | [diff] [blame] | 15 | {{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }} |
Tatyana Leontovich | 3fb5341 | 2019-05-24 00:46:12 +0300 | [diff] [blame] | 16 | |
| 17 | {{ SHARED.MACRO_INSTALL_FORMULAS_FROM_UPDATE() }} |
| 18 | |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 19 | {{ SHARED.MACRO_INSTALL_FORMULAS('\*') }} |
Tatyana Leontovich | 2e89275 | 2018-07-05 19:56:10 +0300 | [diff] [blame] | 20 | |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 21 | {{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }} |
| 22 | |
| 23 | {{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }} |
| 24 | |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 25 | - description: Temporary workaround for removing cinder-volume from CTL nodes |
| 26 | cmd: | |
Dennis Dmitriev | cb77f02 | 2018-02-18 20:42:35 +0200 | [diff] [blame] | 27 | sed -i 's/\-\ system\.cinder\.volume\.single//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml; |
| 28 | 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] | 29 | node_name: {{ HOSTNAME_CFG01 }} |
| 30 | retry: {count: 1, delay: 5} |
| 31 | skip_fail: true |
| 32 | |
Oleksii Butenko | a679841 | 2018-10-19 17:50:52 +0300 | [diff] [blame] | 33 | - description: Temporary workaround for removing virtual gtw nodes |
| 34 | cmd: | |
| 35 | sed -i 's/\-\ system\.salt\.control\.sizes\.ovs\.compact//g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml; |
| 36 | sed -i 's/\-\ system\.salt\.control\.placement\.ovs\.compact//g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml; |
| 37 | node_name: {{ HOSTNAME_CFG01 }} |
| 38 | retry: {count: 1, delay: 5} |
| 39 | skip_fail: true |
| 40 | |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 41 | - description: Temporary WR for correct bridge name according to envoronment templates |
| 42 | cmd: | |
| 43 | sed -i 's/br\-ctl/br\_ctl/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml; |
| 44 | sed -i 's/br\-mgm/br\_mgm/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml; |
| 45 | sed -i 's/br\-ctl/br\_ctl/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/gateway.yml; |
| 46 | salt '*' saltutil.refresh_pillar; |
| 47 | node_name: {{ HOSTNAME_CFG01 }} |
| 48 | retry: {count: 1, delay: 10} |
| 49 | skip_fail: false |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 50 | |
Oleksii Butenko | a679841 | 2018-10-19 17:50:52 +0300 | [diff] [blame] | 51 | - description: "WR for PROD-24311" |
| 52 | cmd: | |
| 53 | set -e; |
| 54 | . /root/venv-reclass-tools/bin/activate; |
Dennis Dmitriev | e15a4f4 | 2018-10-30 13:11:56 +0200 | [diff] [blame] | 55 | reclass-tools add-key parameters._param.salt_control_xenial_image 'http://images.mcp.mirantis.net/ubuntu-16-04-x64-mcp{{ SHARED.REPOSITORY_SUITE }}.qcow2' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/init.yml; |
| 56 | reclass-tools add-key parameters._param.salt_control_trusty_image 'http://images.mcp.mirantis.net/ubuntu-14-04-x64-mcp{{ SHARED.REPOSITORY_SUITE }}.qcow2' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/init.yml; |
Oleksii Butenko | a679841 | 2018-10-19 17:50:52 +0300 | [diff] [blame] | 57 | node_name: {{ HOSTNAME_CFG01 }} |
| 58 | retry: {count: 1, delay: 10} |
| 59 | skip_fail: false |
| 60 | |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 61 | {{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }} |
Oleksii Butenko | 336e441 | 2018-05-21 14:59:27 +0300 | [diff] [blame] | 62 | |