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-ocata-contrail' %} |
| 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','physical-cookied-bm-mcp-ocata-contrail') %} |
| 7 | # Path to the context files used to render Cluster and Environment models |
| 8 | {%- set CLUSTER_CONTEXT_NAME = 'salt-context-cookiecutter-contrail-dpdk.yaml' %} |
| 9 | {%- set ENVIRONMENT_CONTEXT_NAMES = ['salt-context-environment.yaml','lab04-physical-inventory.yaml'] %} |
| 10 | {%- set CONTROL_VLAN = os_env('CONTROL_VLAN', '2422') %} |
| 11 | {%- set TENANT_VLAN = os_env('TENANT_VLAN', '2423') %} |
| 12 | |
| 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) }} |
Dennis Dmitriev | 2c9db8d | 2018-03-26 21:49:59 +0300 | [diff] [blame] | 16 | |
Dennis Dmitriev | 739762f | 2018-07-31 11:24:04 +0300 | [diff] [blame] | 17 | {{ SHARED.MACRO_INSTALL_FORMULAS('\*') }} |
Tatyana Leontovich | 2e89275 | 2018-07-05 19:56:10 +0300 | [diff] [blame] | 18 | |
Dennis Dmitriev | 8555996 | 2018-01-30 15:35:51 +0200 | [diff] [blame] | 19 | {{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }} |
| 20 | |
| 21 | {{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }} |
| 22 | |
| 23 | - description: Temporary WR for cinder backend defined by default in reclass.system |
| 24 | cmd: | |
| 25 | sed -i 's/backend\:\ {}//g' /srv/salt/reclass/classes/system/cinder/control/cluster.yml; |
| 26 | node_name: {{ HOSTNAME_CFG01 }} |
| 27 | retry: {count: 1, delay: 5} |
| 28 | skip_fail: false |
| 29 | |
| 30 | - description: "Workaround for rack01 compute generator" |
| 31 | cmd: | |
| 32 | set -e; |
| 33 | . /root/venv-reclass-tools/bin/activate; |
| 34 | # Remove rack01 key |
Dennis Dmitriev | cb77f02 | 2018-02-18 20:42:35 +0200 | [diff] [blame] | 35 | 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] | 36 | # Add openstack_compute_node definition from system |
Dennis Dmitriev | cb77f02 | 2018-02-18 20:42:35 +0200 | [diff] [blame] | 37 | 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] | 38 | # Workaround for compute nodes addresses |
Dennis Dmitriev | 85cf5da | 2018-08-11 02:24:27 +0300 | [diff] [blame] | 39 | 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; |
| 40 | 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] | 41 | node_name: {{ HOSTNAME_CFG01 }} |
| 42 | retry: {count: 1, delay: 10} |
| 43 | skip_fail: false |
| 44 | |
| 45 | |
| 46 | - description: Temporary workaround for removing cinder-volume from CTL nodes |
| 47 | cmd: | |
Dennis Dmitriev | cb77f02 | 2018-02-18 20:42:35 +0200 | [diff] [blame] | 48 | sed -i 's/\-\ system\.cinder\.volume\.single//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml; |
| 49 | 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] | 50 | node_name: {{ HOSTNAME_CFG01 }} |
| 51 | retry: {count: 1, delay: 5} |
| 52 | skip_fail: true |
| 53 | |
| 54 | {{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }} |
| 55 | |
| 56 | - description: "Workaround for PROD-14060" |
| 57 | cmd: | |
| 58 | set -e; |
| 59 | # Add tenant and single addresses for computes |
| 60 | salt-call reclass.cluster_meta_set deploy_address 172.16.49.72 /srv/salt/reclass/nodes/_generated/cmp001.cookied-bm-mcp-ocata-contrail.local.yml |
| 61 | salt-call reclass.cluster_meta_set tenant_address 192.168.0.101 /srv/salt/reclass/nodes/_generated/cmp001.cookied-bm-mcp-ocata-contrail.local.yml |
| 62 | salt-call reclass.cluster_meta_set single_address 10.167.8.101 /srv/salt/reclass/nodes/_generated/cmp001.cookied-bm-mcp-ocata-contrail.local.yml |
| 63 | |
| 64 | salt-call reclass.cluster_meta_set deploy_address 172.16.49.74 /srv/salt/reclass/nodes/_generated/cmp002.cookied-bm-mcp-ocata-contrail.local.yml |
| 65 | salt-call reclass.cluster_meta_set tenant_address 192.168.0.102 /srv/salt/reclass/nodes/_generated/cmp002.cookied-bm-mcp-ocata-contrail.local.yml |
| 66 | salt-call reclass.cluster_meta_set single_address 10.167.8.102 /srv/salt/reclass/nodes/_generated/cmp002.cookied-bm-mcp-ocata-contrail.local.yml |
| 67 | |
| 68 | node_name: {{ HOSTNAME_CFG01 }} |
| 69 | retry: {count: 1, delay: 10} |
| 70 | skip_fail: false |