blob: dedbab8624b3e495543434d515eee6b8b9da69b2 [file] [log] [blame]
Tatyana Leontovichd34f4102018-04-03 17:49:24 +03001{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_APT01 with context %}
2{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CFG01 with context %}
3{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL01 with context %}
4{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL02 with context %}
5{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CTL03 with context %}
6{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CMP01 with context %}
7{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_CMP02 with context %}
8{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_GTW01 with context %}
9{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_PRX01 with context %}
Tatyana Leontovich5fb5ea52018-07-27 19:35:36 +030010{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_DNS01 with context %}
11{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_DNS02 with context %}
12{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_MDB01 with context %}
13{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_MDB02 with context %}
14{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_MDB03 with context %}
Tatyana Leontovichd34f4102018-04-03 17:49:24 +030015{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_VS with context %}
16{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import LAB_CONFIG_NAME with context %}
17{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import DOMAIN_NAME with context %}
18
19{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.local.test/salt-models/mcp-virtual-lab') %}
20# Other salt model repository parameters see in shared-salt.yaml
21
22
23{% import 'shared-salt.yaml' as SHARED with context %}
24{% from 'shared-salt.yaml' import IPV4_NET_CONTROL_PREFIX with context %}
25{% import 'virtual-offline-pike-ovs-dpdk/vswitch-config.yaml' as VSWITCH with context %}
26{% set VSWITCH_IP = SHARED.IPV4_NET_CONTROL_PREFIX+'.178' %}
27
Tatyana Leontovichd34f4102018-04-03 17:49:24 +030028- description: Check nginx APT node is ready
29 cmd: systemctl status nginx;
30 node_name: {{ HOSTNAME_APT01 }}
31 retry: {count: 1, delay: 10}
32 skip_fail: false
33
34- description: Check dnsmasq on APT node is ready
35 cmd: systemctl status dnsmasq;
36 node_name: {{ HOSTNAME_APT01 }}
37 retry: {count: 1, delay: 10}
38 skip_fail: false
39
40{{ VSWITCH.MACRO_CONFIGURE_VSWITCH(HOSTNAME_VS, VSWITCH_IP) }}
41
42{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }}
43{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL01) }}
44{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL02) }}
45{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL03) }}
46{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CMP01) }}
47{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CMP02) }}
48{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_GTW01) }}
49{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_PRX01) }}
Tatyana Leontovich5fb5ea52018-07-27 19:35:36 +030050{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_DNS01) }}
51{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_DNS02) }}
52{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MDB01) }}
53{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MDB02) }}
54{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MDB03) }}
Tatyana Leontovichd34f4102018-04-03 17:49:24 +030055
56{{ SHARED.MACRO_INSTALL_SALT_MASTER() }}
57
58{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
59
60- description: 'Workaround of local_repo_url - set to offline image repository structure'
61 cmd: |
62 find /srv/salt/reclass/classes/cluster -type f -exec sed -i 's/local_repo_url: .*/local_repo_url: mirror.mcp.mirantis.local.test/g' {} +
63 find /srv/salt/reclass/classes/cluster -type f -exec sed -i 's/aptly_server_address: .*/aptly_server_address: {{ os_env('HOST_APT') }}/g' {} +
64 node_name: {{ HOSTNAME_CFG01 }}
65 retry: {count: 1, delay: 10}
66 skip_fail: false
67
Tatyana Leontovich5fb5ea52018-07-27 19:35:36 +030068{{ 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" "powerdns" "fluentd" "backupninja" "watchdog" "runtest" "auditd" "logrotate" "gnocchi" "manila"') }}
Tatyana Leontovichd34f4102018-04-03 17:49:24 +030069
70{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
71
72{{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }}
73
74{{ SHARED.MACRO_GENERATE_INVENTORY() }}
75
76{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
77
Tatyana Leontovich4453dd62018-06-26 18:44:31 +030078{{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
79{{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}
80
Tatyana Leontovichd34f4102018-04-03 17:49:24 +030081{{ VSWITCH.MACRO_CHECK_BGPVPN_ENABLED_BY_DEFAULT() }}
82
83{{ VSWITCH.MACRO_ENABLE_L2GW(SHARED.CLUSTER_NAME, VSWITCH_IP) }}
Tatyana Leontovicha0cb2702018-07-17 12:30:18 +030084
Tatyana Leontoviche1d16192018-07-18 15:07:51 +030085- description: Enable hugepages on cmp nodes
86 cmd: salt 'cmp*' cmd.run "apt-get install -y hugepages; echo 2048 > /proc/sys/vm/nr_hugepages";
87 node_name: {{ HOSTNAME_CFG01 }}
88 retry: {count: 1, delay: 10}
89 skip_fail: false
90
91- description: Workaround to avoid reboot cmp nodes bring OVS interfaces UP
92 cmd: |
93 salt 'cmp*' cmd.run "ifup br-mesh";
94 node_name: {{ HOSTNAME_CFG01 }}
95 retry: {count: 1, delay: 10}
96 skip_fail: false