blob: a52bf048f3fa482dc1bbe771853f4fef8f877c4c [file] [log] [blame]
Oleksii Butenkoade9c6c2018-03-05 15:16:40 +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 SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-baremetal-lab') %}
5# Other salt model repository parameters see in shared-salt.yaml
6{% set LAB_CONFIG_NAME = 'cookied-bm-mcp-ovs-dpdk' %}
7# Name of the context file (without extension, that is fixed .yaml) used to render the Environment model
8{% set ENVIRONMENT_MODEL_INVENTORY_NAME = os_env('ENVIRONMENT_MODEL_INVENTORY_NAME','cookied-bm-mcp-ovs-dpdk') %}
9# Path to the context files used to render Cluster and Environment models
10{%- set CLUSTER_CONTEXT_NAME = 'salt-context-cookiecutter-openstack_ovs_dpdk.yaml' %}
11{%- set ENVIRONMENT_CONTEXT_NAMES = ['salt-context-vcp-environment.yaml', 'salt-context-environment.yaml'] %}
12{%- set CONTROL_VLAN = os_env('CONTROL_VLAN', '2416') %}
13{%- set TENANT_VLAN = os_env('TENANT_VLAN', '2417') %}
Oleksii Butenko9d9b0502018-04-25 15:45:07 +030014{% set REPOSITORY_SUITE = os_env('REPOSITORY_SUITE', 'testing') %}
15{% set SALT_REPOSITORY = os_env('SALT_REPOSITORY', "deb [arch=amd64] http://mirror.mirantis.com/" + REPOSITORY_SUITE+ "/saltstack-2016.3/${DISTRIB_CODENAME} ${DISTRIB_CODENAME} main") %}
Oleksii Butenkoade9c6c2018-03-05 15:16:40 +020016{% import 'shared-salt.yaml' as SHARED with context %}
17
18{{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL(CONTROL_VLAN=CONTROL_VLAN, TENANT_VLAN=TENANT_VLAN) }}
19
20{{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }}
21
22{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }}
23
24- description: Re-install all the fromulas
25 cmd: |
26 set -e;
27 apt-get install -y salt-formula-*
28 node_name: {{ HOSTNAME_CFG01 }}
29 retry: {count: 1, delay: 1}
30 skip_fail: false
31
Oleksii Butenkoade9c6c2018-03-05 15:16:40 +020032- description: "Workaround for rack01 compute generator"
33 cmd: |
34 set -e;
35 . /root/venv-reclass-tools/bin/activate;
36 # Remove rack01 key
37 reclass-tools del-key parameters.reclass.storage.node.openstack_compute_rack01 /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml;
38 # Add openstack_compute_node definition from system
39 reclass-tools add-key 'classes' 'system.reclass.storage.system.openstack_compute_multi' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/infra/config.yml --merge;
Oleksii Butenkoade9c6c2018-03-05 15:16:40 +020040 node_name: {{ HOSTNAME_CFG01 }}
41 retry: {count: 1, delay: 10}
42 skip_fail: false
43
44
45- description: Temporary workaround for removing cinder-volume from CTL nodes
46 cmd: |
47 sed -i 's/\-\ system\.cinder\.volume\.single//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml;
48 sed -i 's/\-\ system\.cinder\.volume\.notification\.messagingv2//g' /srv/salt/reclass/classes/cluster/{{ SHARED.CLUSTER_NAME }}/openstack/control.yml;
49 node_name: {{ HOSTNAME_CFG01 }}
50 retry: {count: 1, delay: 5}
51 skip_fail: true
52
53{{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }}
54