blob: bbc098a20595771c66f5e296a1ef046aec8f1a83 [file] [log] [blame]
Dennis Dmitriev77d886c2017-05-24 13:13:26 +03001{% from 'physical_mcp11_dvr/underlay.yaml' import HOSTNAME_CFG01 with context %}
Dennis Dmitriev77d886c2017-05-24 13:13:26 +03002
3{% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-baremetal-lab') %}
Sergii Golovatiuk50f91892017-08-04 18:11:06 +02004# Other salt model repository parameters see in shared-salt.yaml
Dennis Dmitriev77d886c2017-05-24 13:13:26 +03005
Sergii Golovatiuk50f91892017-08-04 18:11:06 +02006{% import 'shared-salt.yaml' as SHARED with context %}
Dennis Dmitriev77d886c2017-05-24 13:13:26 +03007
Dennis Dmitriev492813e2017-08-09 15:08:58 +03008{{ SHARED.MACRO_INSTALL_SALT_MASTER() }}
Dennis Dmitriev77d886c2017-05-24 13:13:26 +03009
Dennis Dmitriev492813e2017-08-09 15:08:58 +030010{{ SHARED.MACRO_CLONE_RECLASS_MODELS() }}
Dennis Dmitriev77d886c2017-05-24 13:13:26 +030011
Dennis Dmitriev492813e2017-08-09 15:08:58 +030012{{ 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"') }}
Dennis Dmitriev77d886c2017-05-24 13:13:26 +030013
Dennis Dmitriev492813e2017-08-09 15:08:58 +030014{{ SHARED.MACRO_INSTALL_SALT_MINIONS() }}
Dennis Dmitriev77d886c2017-05-24 13:13:26 +030015
Dennis Dmitriev492813e2017-08-09 15:08:58 +030016{{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }}
Dennis Dmitriev77d886c2017-05-24 13:13:26 +030017
Dennis Dmitriev492813e2017-08-09 15:08:58 +030018{{ SHARED.MACRO_GENERATE_INVENTORY() }}
Dennis Dmitriev77d886c2017-05-24 13:13:26 +030019
Dennis Dmitrieve17bcaf2017-05-25 00:26:57 +030020
21- description: Configure linux for present baremetal nodes
22 cmd: salt --hard-crash --state-output=mixed --state-verbose=False -C '* and not
23 cfg01*' state.sls linux
24 node_name: {{ HOSTNAME_CFG01 }}
25 retry: {count: 3, delay: 5}
26 skip_fail: false
27
28- description: '*Workaround* of the bug https://mirantis.jira.com/browse/PROD-9576 to get bond0-connectivity *without* rebooting nodes'
29 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' cmd.run
30 "cat /etc/network/interfaces | grep bond-slaves | awk '{print \$2}' | xargs -I {} ifenslave bond0 {}"
Dennis Dmitriev77d886c2017-05-24 13:13:26 +030031 node_name: {{ HOSTNAME_CFG01 }}
32 retry: {count: 1, delay: 5}
33 skip_fail: false
34
35- description: ovs-dvr-vlan model specific Execute 'libvirt' states to create necessary libvirt networks
36 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'kvm*' state.sls libvirt
37 node_name: {{ HOSTNAME_CFG01 }}
38 retry: {count: 1, delay: 10}
39 skip_fail: false
40
41- description: Create VMs for control plane
42 cmd: salt --hard-crash --state-output=mixed --state-verbose=False 'kvm*' state.sls salt.control
43 node_name: {{ HOSTNAME_CFG01 }}
44 retry: {count: 3, delay: 10}
45 skip_fail: false
46
47
48
49- description: Refresh pillars on all minions
50 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.refresh_pillar
51 node_name: {{ HOSTNAME_CFG01 }}
52 retry: {count: 1, delay: 5}
53 skip_fail: false
54
55- description: Sync all salt resources
56 cmd: salt --hard-crash --state-output=mixed --state-verbose=False '*' saltutil.sync_all
57 node_name: {{ HOSTNAME_CFG01 }}
58 retry: {count: 1, delay: 5}
59 skip_fail: false
60
61- description: Show reclass-salt --top for generated nodes
62 cmd: reclass-salt --top -u /srv/salt/reclass/nodes/_generated/
63 node_name: {{ HOSTNAME_CFG01 }}
64 retry: {count: 1, delay: 5}
65 skip_fail: false
66
67- description: Execute salt.minion.cert
68 cmd: salt-call --no-color state.sls salt.minion.cert -l info;
69 node_name: {{ HOSTNAME_CFG01 }}
70 retry: {count: 1, delay: 5}
71 skip_fail: false
72
Dennis Dmitriev492813e2017-08-09 15:08:58 +030073{{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }}