blob: 78a2ef6234ede283d8440eb798ade82267bc0fc8 [file] [log] [blame]
Tatyana Leontovichecd491d2017-09-13 13:51:12 +03001{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_APT01 with context %}
2{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_CFG01 with context %}
3{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_CTL01 with context %}
4{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_CTL02 with context %}
5{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_CTL03 with context %}
6{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_CMP01 with context %}
7{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_CMP02 with context %}
8{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_GTW01 with context %}
9{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_PRX01 with context %}
10{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_MON01 with context %}
11{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_MON02 with context %}
12{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import HOSTNAME_MON03 with context %}
13{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import LAB_CONFIG_NAME with context %}
14{% from 'mcp-ocata-local-repo-dvr/underlay.yaml' import DOMAIN_NAME with context %}
15
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-offline.yaml' as SHARED with context %}
21{% from 'shared-salt.yaml' import IPV4_NET_CONTROL_PREFIX with context %}
22
23#- description: 'Generate nginx cert'
24# cmd: |
25# openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \
26# -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.gerrit.com" \
27# -keyout ssl-nginx.key -out ssl-nginx.crt;
28# node_name: {{ HOSTNAME_APT01 }}
29# retry: {count: 1, delay: 5}
30# skip_fail: false
31
32- description: Check nginx APT node is ready
33 cmd: systemctl status nginx;
34 node_name: {{ HOSTNAME_APT01 }}
35 retry: {count: 1, delay: 10}
36 skip_fail: false
37
38- description: Check dnsmasq on APT node is ready
39 cmd: systemctl status dnsmasq;
40 node_name: {{ HOSTNAME_APT01 }}
41 retry: {count: 1, delay: 10}
42 skip_fail: false
43
44{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CFG01) }}
45{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL01) }}
46{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL02) }}
47{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CTL03) }}
48{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CMP01) }}
49{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_CMP02) }}
50{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MON03) }}
51{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MON02) }}
52{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_MON01) }}
53{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_GTW01) }}
54{{ SHARED.MACRO_INSTALL_PACKAGES_ON_NODES(HOSTNAME_PRX01) }}
55
56{{ SHARED.MACRO_INSTALL_SALT_MASTER() }}
57
58{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
59
60{{ 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"') }}
61
62{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
63
64{{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }}
65
66{{ SHARED.MACRO_GENERATE_INVENTORY() }}
67
68{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}
69
70- description: Hack gtw node
71 cmd: salt 'gtw*' cmd.run "ip addr del {{ IPV4_NET_CONTROL_PREFIX }}.110/24 dev ens4; ip addr flush dev ens4";
72 node_name: {{ HOSTNAME_CFG01 }}
73 retry: {count: 1, delay: 10}
74 skip_fail: false
75
76- description: Hack cmp01 node
77 cmd: salt 'cmp01*' cmd.run "ip addr del {{ IPV4_NET_CONTROL_PREFIX }}.105/24 dev ens4; ip addr flush dev ens4";
78 node_name: {{ HOSTNAME_CFG01 }}
79 retry: {count: 1, delay: 10}
80 skip_fail: false
81
82- description: Hack cmp02 node
83 cmd: salt 'cmp02*' cmd.run "ip addr del {{ IPV4_NET_CONTROL_PREFIX }}.106/24 dev ens4; ip addr flush dev ens4";
84 node_name: {{ HOSTNAME_CFG01 }}
85 retry: {count: 1, delay: 10}
86 skip_fail: false