blob: 24cdb042c1d26fc4ddf021590d3a4c866ee94cf6 [file] [log] [blame]
Anastasia Kuznetsova6823b062018-03-23 15:52:17 +04001{% from 'virtual-mcp-pike-ovs-l2gw-bgpvpn/underlay.yaml' import HOSTNAME_CFG01 with context %}
2{% from 'virtual-mcp-pike-ovs-l2gw-bgpvpn/underlay.yaml' import HOSTNAME_CMP01 with context %}
3{% from 'virtual-mcp-pike-ovs-l2gw-bgpvpn/underlay.yaml' import HOSTNAME_CMP02 with context %}
4{% from 'virtual-mcp-pike-ovs-l2gw-bgpvpn/underlay.yaml' import HOSTNAME_GTW01 with context %}
5{% from 'virtual-mcp-pike-ovs-l2gw-bgpvpn/underlay.yaml' import LAB_CONFIG_NAME with context %}
6{% from 'virtual-mcp-pike-ovs-l2gw-bgpvpn/underlay.yaml' import DOMAIN_NAME with context %}
7{% from 'virtual-mcp-pike-ovs-l2gw-bgpvpn/underlay.yaml' import HOSTNAME_VSWITCH with context %}
8
9{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %}
10# Other salt model repository parameters see in shared-salt.yaml
11
12{% import 'shared-salt.yaml' as SHARED with context %}
13{% import 'virtual-mcp-pike-ovs-l2gw-bgpvpn/vswitch-config.yaml' as VSWITCH with context %}
14
15{% set VSWITCH_IP = SHARED.IPV4_NET_CONTROL_PREFIX+'.178' %}
16
17{{ VSWITCH.MACRO_CONFIGURE_VSWITCH(HOSTNAME_VSWITCH, VSWITCH_IP) }}
18
19{{ SHARED.MACRO_INSTALL_SALT_MASTER() }}
20
21{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
22
23{{ 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" "fluentd" "backupninja"') }}
24
25{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
26
27{{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }}
28
29{{ SHARED.ADJUST_SL_OPTS(OVERRIDES_FILENAME='/srv/salt/reclass/classes/cluster/' + SHARED.CLUSTER_NAME + '/stacklight/server.yml') }}
30
31{{ SHARED.MACRO_GENERATE_INVENTORY() }}
32
33{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
34
35{{ VSWITCH.MACRO_CHECK_BGPVPN_ENABLED_BY_DEFAULT() }}
36
37{{ VSWITCH.MACRO_ENABLE_L2GW(SHARED.CLUSTER_NAME, VSWITCH_IP) }}
38
39- description: Hack gtw node
40 cmd: salt '{{ HOSTNAME_GTW01 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.110/24 dev ens4; ip addr flush dev ens4";
41 node_name: {{ HOSTNAME_CFG01 }}
42 retry: {count: 1, delay: 10}
43 skip_fail: false
44
45- description: Hack cmp01 node
46 cmd: salt '{{ HOSTNAME_CMP01 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.105/24 dev ens4; ip addr flush dev ens4";
47 node_name: {{ HOSTNAME_CFG01 }}
48 retry: {count: 1, delay: 10}
49 skip_fail: false
50
51- description: Hack cmp02 node
52 cmd: salt '{{ HOSTNAME_CMP02 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.106/24 dev ens4; ip addr flush dev ens4";
53 node_name: {{ HOSTNAME_CFG01 }}
54 retry: {count: 1, delay: 10}
55 skip_fail: false