blob: cdd1b3b00ca0fbb0da5928794567bf1c7673313b [file] [log] [blame]
Dennis Dmitrievab83ea42017-05-12 16:52:45 +03001{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CFG01 with context %}
Dennis Dmitrievd52025d2018-02-20 07:46:56 +02002{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CMP01 with context %}
3{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_CMP02 with context %}
4{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import HOSTNAME_GTW01 with context %}
Dennis Dmitriev5ec4d572017-09-27 00:47:54 +03005{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import LAB_CONFIG_NAME with context %}
6{% from 'virtual-mcp-ocata-ovs/underlay.yaml' import DOMAIN_NAME with context %}
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +03007
8{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
Sergii Golovatiuk50f91892017-08-04 18:11:06 +02009# Other salt model repository parameters see in shared-salt.yaml
ibumarskov5921bb22018-06-25 16:49:37 +040010{% set OVERRIDES = os_env('OVERRIDES', 'override_example: true') %}
11{% set OVERRIDES_FILENAME = os_env('OVERRIDES_FILENAME', '/srv/salt/reclass/classes/environment/virtual-mcp-ocata-ovs/overrides.yml') %}
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +030012
Sergii Golovatiuk50f91892017-08-04 18:11:06 +020013{% import 'shared-salt.yaml' as SHARED with context %}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030014
Dennis Dmitriev492813e2017-08-09 15:08:58 +030015{{ SHARED.MACRO_INSTALL_SALT_MASTER() }}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030016
Dennis Dmitriev492813e2017-08-09 15:08:58 +030017{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030018
ibumarskov75e90102018-05-24 14:45:46 +040019{{ SHARED.MACRO_CONFIGURE_RECLASS(FORMULA_SERVICES='"linux" "reclass" "salt" "openssh" "ntp" "git" "nginx" "collectd" "sensu" "heka" "sphinx" "keystone" "mysql" "grafana" "haproxy" "rsyslog" "horizon" "prometheus" "telegraf" "elasticsearch" "glusterfs" "jenkins" "maas" "backupninja" "fluentd"') }}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030020
Dennis Dmitriev492813e2017-08-09 15:08:58 +030021{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030022
Dennis Dmitriev492813e2017-08-09 15:08:58 +030023{{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030024
ibumarskov5921bb22018-06-25 16:49:37 +040025{%- if OVERRIDES != '' %}
26{%- for param in OVERRIDES.splitlines() %}
27{%- set key, value = param.replace(' ','').split(':') %}
28- description: Override cluster parameters
29 cmd: |
30 salt-call reclass.cluster_meta_set name='{{ key }}' value='{{ value }}' file_name='{{OVERRIDES_FILENAME}}'
31 node_name: {{ HOSTNAME_CFG01 }}
32 retry: {count: 1, delay: 1}
33 skip_fail: false
34{%- endfor %}
35
36- description: Refresh pillar
37 cmd: salt '*' saltutil.refresh_pillar
38 node_name: {{ HOSTNAME_CFG01 }}
39 retry: {count: 1, delay: 1}
40 skip_fail: false
41{%- endif %}
42
Dennis Dmitriev257a9382018-02-15 04:00:46 +020043{{ SHARED.ADJUST_SL_OPTS(OVERRIDES_FILENAME='/srv/salt/reclass/classes/cluster/' + SHARED.CLUSTER_NAME + '/stacklight/server.yml') }}
44
Dennis Dmitriev492813e2017-08-09 15:08:58 +030045{{ SHARED.MACRO_GENERATE_INVENTORY() }}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030046
Dennis Dmitriev492813e2017-08-09 15:08:58 +030047{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
Tatyana Leontovichd8bf14f2017-04-19 12:20:50 +030048
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +030049- description: Hack gtw node
Dennis Dmitrievd52025d2018-02-20 07:46:56 +020050 cmd: salt '{{ HOSTNAME_GTW01 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.110/24 dev ens4; ip addr flush dev ens4";
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +030051 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 10}
53 skip_fail: false
54
55- description: Hack cmp01 node
Dennis Dmitrievd52025d2018-02-20 07:46:56 +020056 cmd: salt '{{ HOSTNAME_CMP01 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.105/24 dev ens4; ip addr flush dev ens4";
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +030057 node_name: {{ HOSTNAME_CFG01 }}
58 retry: {count: 1, delay: 10}
59 skip_fail: false
60
61- description: Hack cmp02 node
Dennis Dmitrievd52025d2018-02-20 07:46:56 +020062 cmd: salt '{{ HOSTNAME_CMP02 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.106/24 dev ens4; ip addr flush dev ens4";
Dennis Dmitriev99b26fe2017-04-26 12:34:44 +030063 node_name: {{ HOSTNAME_CFG01 }}
64 retry: {count: 1, delay: 10}
65 skip_fail: false