blob: 4da1add9b0413432d00f10da38a6fc318bb32d4d [file] [log] [blame]
Dennis Dmitriev85559962018-01-30 15:35:51 +02001{% 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
15{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }}
16
17{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
18
19- description: Temporary WR for cinder backend defined by default in reclass.system
20 cmd: |
21 sed -i 's/backend\:\ {}//g' /srv/salt/reclass/classes/system/cinder/control/cluster.yml;
22 node_name: {{ HOSTNAME_CFG01 }}
23 retry: {count: 1, delay: 5}
24 skip_fail: false
25
26- description: "Workaround for rack01 compute generator"
27 cmd: |
28 set -e;
29 . /root/venv-reclass-tools/bin/activate;
30 # Remove rack01 key
Dennis Dmitrievcb77f022018-02-18 20:42:35 +020031 reclass-tools del-key parameters.reclass.storage.node.openstack_compute_rack01 /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml;
Dennis Dmitriev85559962018-01-30 15:35:51 +020032 # Add openstack_compute_node definition from system
Dennis Dmitrievcb77f022018-02-18 20:42:35 +020033 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 Dmitriev85559962018-01-30 15:35:51 +020034
35 node_name: {{ HOSTNAME_CFG01 }}
36 retry: {count: 1, delay: 10}
37 skip_fail: false
38
39
40- description: Temporary workaround for removing cinder-volume from CTL nodes
41 cmd: |
Dennis Dmitrievcb77f022018-02-18 20:42:35 +020042 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 Dmitriev85559962018-01-30 15:35:51 +020044 node_name: {{ HOSTNAME_CFG01 }}
45 retry: {count: 1, delay: 5}
46 skip_fail: true
47
48{{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }}
49
50- description: "Workaround for PROD-14060"
51 cmd: |
52 set -e;
53 # Add tenant and single addresses for computes
54 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
55 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
56 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
57
58 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
59 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
60 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
61
62 node_name: {{ HOSTNAME_CFG01 }}
63 retry: {count: 1, delay: 10}
64 skip_fail: false