Dennis Dmitriev | 6412e8b | 2018-02-18 04:17:09 +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 | {% from 'cookied-model-generator/underlay.yaml' import CLUSTER_NAME with context %} |
| 4 | |
| 5 | {% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %} |
| 6 | # Other salt model repository parameters see in shared-salt.yaml |
| 7 | |
| 8 | {% set LAB_CONFIG_NAME = 'virtual-mcp-pike-ovs' %} |
| 9 | # Name of the context file (without extension, that is fixed .yaml) used to render the Environment model |
| 10 | {% set ENVIRONMENT_MODEL_INVENTORY_NAME = os_env('ENVIRONMENT_MODEL_INVENTORY_NAME', CLUSTER_NAME) %} |
| 11 | # Path to the context files used to render Cluster and Environment models |
| 12 | {%- set CLUSTER_CONTEXT_NAME = '_context-cookiecutter-mcp-pike-ovs.yaml' %} |
| 13 | {%- set ENVIRONMENT_CONTEXT_NAMES = ['_context-environment.yaml'] %} |
| 14 | |
| 15 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 16 | |
| 17 | {{ SHARED.MACRO_GENERATE_COOKIECUTTER_MODEL() }} |
| 18 | |
| 19 | {{ SHARED.MACRO_GENERATE_AND_ENABLE_ENVIRONMENT_MODEL() }} |
| 20 | |
| 21 | - description: "Workaround for combined roles: remove unnecessary classes" |
| 22 | cmd: | |
| 23 | set -e; |
| 24 | sed -i '/system.reclass.storage.system.openstack_database_cluster/d' /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 25 | sed -i '/system.reclass.storage.system.openstack_message_queue_cluster/d' /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 26 | sed -i '/system.reclass.storage.system.stacklight_telemetry_cluster/d' /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 27 | sed -i '/system.reclass.storage.system.stacklight_log_cluster/d' /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 28 | |
| 29 | . /root/venv-reclass-tools/bin/activate; |
| 30 | reclass-tools del-key parameters.reclass.storage.node.openstack_database_node01 /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 31 | reclass-tools del-key parameters.reclass.storage.node.openstack_database_node02 /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 32 | reclass-tools del-key parameters.reclass.storage.node.openstack_database_node03 /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 33 | reclass-tools del-key parameters.reclass.storage.node.openstack_message_queue_node01 /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 34 | reclass-tools del-key parameters.reclass.storage.node.openstack_message_queue_node02 /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 35 | reclass-tools del-key parameters.reclass.storage.node.openstack_message_queue_node03 /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 36 | reclass-tools del-key parameters.reclass.storage.node.stacklight_log_node01 /srv/salt/reclass/classes/cluster/{{ CLUSTER_NAME }}/infra/config.yml; |
| 37 | node_name: {{ HOSTNAME_CFG01 }} |
| 38 | retry: {count: 1, delay: 5} |
| 39 | skip_fail: false |
| 40 | |
| 41 | {{ SHARED.MACRO_GENERATE_INVENTORY(RERUN_SALTMASTER_STATE=true) }} |