blob: 46ab1e4d451ec102e32b9f9abfcf262ea235ee62 [file] [log] [blame]
Tatyana Leontovich50e62dd2018-03-28 20:59:52 +03001{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_APT01 with context %}
2{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_CFG01 with context %}
3{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_CTL01 with context %}
4{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_CTL02 with context %}
5{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_CTL03 with context %}
6{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_CMP01 with context %}
7{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_CMP02 with context %}
8{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_GTW01 with context %}
9{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_PRX01 with context %}
10{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_MDB01 with context %}
11{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_MDB02 with context %}
12{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_MDB03 with context %}
13{% from 'virtual-offline-ssl/underlay.yaml' import HOSTNAME_SHARE01 with context %}
14{% from 'virtual-offline-ssl/underlay.yaml' import LAB_CONFIG_NAME with context %}
15{% from 'virtual-offline-ssl/underlay.yaml' import DOMAIN_NAME with context %}
16{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.local.test/salt-models/mcp-virtual-lab') %}
17# Other salt model repository parameters see in shared-salt.yaml
18
19
20{% import 'shared-salt.yaml' as SHARED with context %}
21{% from 'shared-salt.yaml' import IPV4_NET_CONTROL_PREFIX with context %}
22
23
24- description: Check nginx APT node is ready
25 cmd: systemctl status nginx;
26 node_name: {{ HOSTNAME_APT01 }}
27 retry: {count: 1, delay: 10}
28 skip_fail: false
29
30- description: Check dnsmasq on APT node is ready
31 cmd: systemctl status dnsmasq;
32 node_name: {{ HOSTNAME_APT01 }}
33 retry: {count: 1, delay: 10}
34 skip_fail: false
35
36{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }}
37{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL01) }}
38{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL02) }}
39{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL03) }}
40{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CMP01) }}
41{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CMP02) }}
42{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_GTW01) }}
43{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_PRX01) }}
44{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MDB01) }}
45{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MDB02) }}
46{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MDB03) }}
47{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_SHARE01) }}
48
49{{ SHARED.MACRO_INSTALL_SALT_MASTER() }}
50
51{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
52
53- description: 'Workaround of local_repo_url - set to offline image repository structure'
54 cmd: |
55 find /srv/salt/reclass/classes/cluster -type f -exec sed -i 's/local_repo_url: .*/local_repo_url: mirror.mcp.mirantis.local.test/g' {} +
56 find /srv/salt/reclass/classes/cluster -type f -exec sed -i 's/aptly_server_address: .*/aptly_server_address: {{ os_env('HOST_APT') }}/g' {} +
57 node_name: {{ HOSTNAME_CFG01 }}
58 retry: {count: 1, delay: 10}
59 skip_fail: false
60
Tatyana Leontovicheea03e92018-11-20 12:51:50 +020061- description: '*Workaround* to remove apt key until migrate on CC'
62 cmd: salt-key -d apt01.virtual-offline-pike-ovs-dpdk -y
63 node_name: {{ HOSTNAME_CFG01 }}
64 retry: {count: 1, delay: 1}
65 skip_fail: true
66
67- description: '*Workaround* stop minion on apt like proxy node'
68 cmd: systemctl stop salt-minion.service
69 node_name: {{ HOSTNAME_APT01 }}
70 retry: {count: 1, delay: 1}
71 skip_fail: true
72
Tatyana Leontovichdb185db2018-11-30 12:46:40 +020073{{ 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" "dogtag" "runtest" "manila" "auditd" "logrotate" "gnocchi" "neutron" ') }}
Tatyana Leontovich50e62dd2018-03-28 20:59:52 +030074
75{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
76
77{{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }}
78
79{{ SHARED.MACRO_GENERATE_INVENTORY() }}
80
81{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
Tatyana Leontoviche1d16192018-07-18 15:07:51 +030082
83- description: Enable hugepages on cmp nodes
84 cmd: salt 'cmp*' cmd.run "apt-get install -y hugepages; echo 2048 > /proc/sys/vm/nr_hugepages";
85 node_name: {{ HOSTNAME_CFG01 }}
86 retry: {count: 1, delay: 10}
87 skip_fail: false
88
Tatyana Leontovicheea03e92018-11-20 12:51:50 +020089#- description: Workaround to avoid reboot cmp nodes bring OVS interfaces UP
90# cmd: |
91# salt 'cmp*' cmd.run "ifup br-mesh";
92# node_name: {{ HOSTNAME_CFG01 }}
93# retry: {count: 1, delay: 10}
94# skip_fail: false