blob: f97830a61a0ec8cc556867f84534335521af0ea0 [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 %}
10{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import HOSTNAME_VS with context %}
11{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import LAB_CONFIG_NAME with context %}
12{% from 'virtual-offline-pike-ovs-dpdk/underlay.yaml' import DOMAIN_NAME with context %}
13
14{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.local.test/salt-models/mcp-virtual-lab') %}
15# Other salt model repository parameters see in shared-salt.yaml
16
17
18{% import 'shared-salt.yaml' as SHARED with context %}
19{% from 'shared-salt.yaml' import IPV4_NET_CONTROL_PREFIX with context %}
20{% import 'virtual-offline-pike-ovs-dpdk/vswitch-config.yaml' as VSWITCH with context %}
21{% set VSWITCH_IP = SHARED.IPV4_NET_CONTROL_PREFIX+'.178' %}
22
Tatyana Leontovichd34f4102018-04-03 17:49:24 +030023- description: Check nginx APT node is ready
24 cmd: systemctl status nginx;
25 node_name: {{ HOSTNAME_APT01 }}
26 retry: {count: 1, delay: 10}
27 skip_fail: false
28
29- description: Check dnsmasq on APT node is ready
30 cmd: systemctl status dnsmasq;
31 node_name: {{ HOSTNAME_APT01 }}
32 retry: {count: 1, delay: 10}
33 skip_fail: false
34
35{{ VSWITCH.MACRO_CONFIGURE_VSWITCH(HOSTNAME_VS, VSWITCH_IP) }}
36
37{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }}
38{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL01) }}
39{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL02) }}
40{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL03) }}
41{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CMP01) }}
42{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CMP02) }}
43{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_GTW01) }}
44{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_PRX01) }}
45
46{{ SHARED.MACRO_INSTALL_SALT_MASTER() }}
47
48{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
49
50- description: 'Workaround of local_repo_url - set to offline image repository structure'
51 cmd: |
52 find /srv/salt/reclass/classes/cluster -type f -exec sed -i 's/local_repo_url: .*/local_repo_url: mirror.mcp.mirantis.local.test/g' {} +
53 find /srv/salt/reclass/classes/cluster -type f -exec sed -i 's/aptly_server_address: .*/aptly_server_address: {{ os_env('HOST_APT') }}/g' {} +
54 node_name: {{ HOSTNAME_CFG01 }}
55 retry: {count: 1, delay: 10}
56 skip_fail: false
57
Tatyana Leontovich0eb5ca32018-07-13 22:05:17 +030058{{ 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"') }}
Tatyana Leontovichd34f4102018-04-03 17:49:24 +030059
60{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
61
62{{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }}
63
64{{ SHARED.MACRO_GENERATE_INVENTORY() }}
65
66{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
67
Tatyana Leontovich4453dd62018-06-26 18:44:31 +030068{{SHARED.MACRO_CHECK_SALT_VERSION_SERVICES_ON_CFG()}}
69{{SHARED.MACRO_CHECK_SALT_VERSION_ON_NODES()}}
70
Tatyana Leontovichd34f4102018-04-03 17:49:24 +030071{{ VSWITCH.MACRO_CHECK_BGPVPN_ENABLED_BY_DEFAULT() }}
72
73{{ VSWITCH.MACRO_ENABLE_L2GW(SHARED.CLUSTER_NAME, VSWITCH_IP) }}
Tatyana Leontovicha0cb2702018-07-17 12:30:18 +030074