Oleksii Butenko | f65a004 | 2018-06-27 13:38:43 +0300 | [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 | |
Dennis Dmitriev | 0f27231 | 2018-10-01 13:29:40 +0300 | [diff] [blame] | 4 | {% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.com/salt-models/mcp-baremetal-lab') %} |
Oleksii Butenko | f65a004 | 2018-06-27 13:38:43 +0300 | [diff] [blame] | 5 | # Other salt model repository parameters see in shared-salt.yaml |
| 6 | {% set LAB_CONFIG_NAME = 'cookied-bm-dpdk-pipeline' %} |
| 7 | {% set SALT_VERSION = os_env('SALT_VERSION', '2017.7') %} |
| 8 | # Name of the context file (without extension, that is fixed .yaml) used to render the Environment model |
| 9 | {% set ENVIRONMENT_MODEL_INVENTORY_NAME = os_env('ENVIRONMENT_MODEL_INVENTORY_NAME','cookied-bm-dpdk-pipeline') %} |
| 10 | # Path to the context files used to render Cluster and Environment models |
| 11 | {%- set CLUSTER_CONTEXT_NAME = 'salt-context-cookiecutter-openstack_ovs_dpdk.yaml' %} |
| 12 | {%- set ENVIRONMENT_CONTEXT_NAMES = ['salt-context-vcp-environment.yaml', 'salt-context-environment.yaml'] %} |
| 13 | {%- set CONTROL_VLAN = os_env('CONTROL_VLAN', '2416') %} |
| 14 | {%- set TENANT_VLAN = os_env('TENANT_VLAN', '2417') %} |
| 15 | {% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %} |
| 16 | {% set SALT_REPOSITORY = os_env('SALT_REPOSITORY', "deb [arch=amd64] http://apt.mirantis.com/${DISTRIB_CODENAME}/salt/" + SALT_VERSION + REPOSITORY_SUITE + " main") %} |
| 17 | {# set SALT_REPOSITORY = os_env('SALT_REPOSITORY', "deb [arch=amd64] http://mirror.mirantis.com/" + REPOSITORY_SUITE+ "/saltstack-2016.3/${DISTRIB_CODENAME} ${DISTRIB_CODENAME} main") #} |
| 18 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 19 | |
| 20 | {{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }} |
| 21 | |
| 22 | {{ SHARED.MACRO_INSTALL_FORMULAS('\*') }} |
| 23 | |
| 24 | {{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }} |
| 25 | |
| 26 | {{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }} |
| 27 | |
| 28 | - description: "Workaround for rack01 compute generator" |
| 29 | cmd: | |
| 30 | set -e; |
| 31 | . /root/venv-reclass-tools/bin/activate; |
| 32 | # Remove rack01 key |
| 33 | reclass-tools del-key parameters.reclass.storage.node.openstack_compute_rack01 /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml; |
| 34 | # Add openstack_compute_node definition from system |
| 35 | 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] | 36 | # Workaround for compute nodes addresses |
Dennis Dmitriev | 85cf5da | 2018-08-11 02:24:27 +0300 | [diff] [blame] | 37 | 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; |
| 38 | 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; |
Oleksii Butenko | f65a004 | 2018-06-27 13:38:43 +0300 | [diff] [blame] | 39 | node_name: {{ HOSTNAME_CFG01 }} |
| 40 | retry: {count: 1, delay: 10} |
| 41 | skip_fail: false |
| 42 | |
| 43 | |
| 44 | - description: Temporary workaround for removing cinder-volume from CTL nodes |
| 45 | cmd: | |
| 46 | sed -i 's/\-\ system\.cinder\.volume\.single//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml; |
| 47 | sed -i 's/\-\ system\.cinder\.volume\.notification\.messagingv2//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml; |
| 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 1, delay: 5} |
| 50 | skip_fail: true |
| 51 | |
| 52 | - description: Temporary WR for correct bridge name according to envoronment templates |
| 53 | cmd: | |
| 54 | sed -i 's/br\-ctl/br\_ctl/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml; |
| 55 | sed -i 's/br\-mgm/br\_mgm/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/infra/kvm.yml; |
| 56 | sed -i 's/br\-ctl/br\_ctl/g' /srv/salt/reclass/classes/cluster/{{ LAB_CONFIG_NAME }}/openstack/gateway.yml; |
| 57 | salt '*' saltutil.refresh_pillar; |
| 58 | node_name: {{ HOSTNAME_CFG01 }} |
| 59 | retry: {count: 1, delay: 10} |
| 60 | skip_fail: false |
| 61 | |
| 62 | {{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }} |
| 63 | |