Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 1 | {% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_CFG01 with context %} |
| 2 | {% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_CMP01 with context %} |
| 3 | {% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_CMP02 with context %} |
| 4 | {% from 'cookied-mcp-pike-dpdk/underlay.yaml' import HOSTNAME_GTW01 with context %} |
| 5 | {% from 'cookied-mcp-pike-dpdk/underlay.yaml' import LAB_CONFIG_NAME with context %} |
| 6 | {% from 'cookied-mcp-pike-dpdk/underlay.yaml' import DOMAIN_NAME with context %} |
| 7 | |
| 8 | {% set SALT_MODELS_REPOSITORY = os_env('SALT_MODELS_REPOSITORY','https://gerrit.mcp.mirantis.net/salt-models/mcp-virtual-lab') %} |
| 9 | # Other salt model repository parameters see in shared-salt.yaml |
| 10 | |
| 11 | {% import 'shared-salt.yaml' as SHARED with context %} |
| 12 | |
| 13 | {{ SHARED.MACRO_INSTALL_SALT_MASTER() }} |
| 14 | |
| 15 | {{ SHARED.MACRO_CLONE_RECLASS_MODELS() }} |
| 16 | |
| 17 | {{ 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" "fluentd"') }} |
| 18 | |
| 19 | {{ SHARED.MACRO_INSTALL_SALT_MINIONS() }} |
| 20 | |
| 21 | {{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }} |
| 22 | |
| 23 | {{ SHARED.MACRO_GENERATE_INVENTORY() }} |
| 24 | |
Dennis Dmitriev | 90877b1 | 2018-03-21 21:52:51 +0200 | [diff] [blame] | 25 | {{ SHARED.MACRO_NETWORKING_WORKAROUNDS() }} |
| 26 | |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 27 | - description: Enable hugepages on cmp nodes |
| 28 | cmd: salt 'cmp*' cmd.run "apt-get install -y hugepages; echo 2048 > /proc/sys/vm/nr_hugepages"; |
| 29 | node_name: {{ HOSTNAME_CFG01 }} |
| 30 | retry: {count: 1, delay: 10} |
| 31 | skip_fail: false |
| 32 | |
Dennis Dmitriev | ff833b7 | 2018-03-23 23:42:25 +0200 | [diff] [blame] | 33 | - description: "Workaround for PROD-18834: Pre-install linux-headers package" |
| 34 | cmd: salt 'cmp*' cmd.run "apt-get install -y linux-headers-$(uname -r)"; |
| 35 | node_name: {{ HOSTNAME_CFG01 }} |
| 36 | retry: {count: 1, delay: 10} |
| 37 | skip_fail: false |
| 38 | |
Dennis Dmitriev | c1e95c2 | 2018-03-29 03:35:43 +0300 | [diff] [blame^] | 39 | - description: "Workaround for PROD-17975: Pre-install ovs packages to update alternatives to DPDK" |
Dennis Dmitriev | ff833b7 | 2018-03-23 23:42:25 +0200 | [diff] [blame] | 40 | cmd: | |
| 41 | set -ex; |
Dennis Dmitriev | c1e95c2 | 2018-03-29 03:35:43 +0300 | [diff] [blame^] | 42 | salt --hard-crash --state-output=mixed --state-verbose=False -C 'I@linux:system' state.sls linux.system.repo |
Dennis Dmitriev | ff833b7 | 2018-03-23 23:42:25 +0200 | [diff] [blame] | 43 | salt 'cmp*' cmd.run "apt-get install -y openvswitch-switch openvswitch-switch-dpdk"; |
Dennis Dmitriev | c1e95c2 | 2018-03-29 03:35:43 +0300 | [diff] [blame^] | 44 | salt 'cmp*' cmd.run "service openvswitch-switch stop"; |
| 45 | salt 'cmp*' cmd.run "rm -f /var/lib/openvswitch/*"; |
| 46 | salt 'cmp*' cmd.run "update-alternatives --remove ovs-vswitchd /usr/lib/openvswitch-switch/ovs-vswitchd"; |
| 47 | salt 'cmp*' cmd.run "service openvswitch-switch start"; |
Dennis Dmitriev | ff833b7 | 2018-03-23 23:42:25 +0200 | [diff] [blame] | 48 | node_name: {{ HOSTNAME_CFG01 }} |
| 49 | retry: {count: 1, delay: 10} |
| 50 | skip_fail: false |
| 51 | |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 52 | {{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }} |
| 53 | |
Dennis Dmitriev | c1e95c2 | 2018-03-29 03:35:43 +0300 | [diff] [blame^] | 54 | - description: "Workaround to avoid reboot cmp nodes: bring OVS interfaces UP" |
| 55 | cmd: | |
| 56 | salt 'cmp*' cmd.run "ifup br-prv"; |
| 57 | salt 'cmp*' cmd.run "ip l set up br-floating"; |
| 58 | node_name: {{ HOSTNAME_CFG01 }} |
| 59 | retry: {count: 1, delay: 10} |
| 60 | skip_fail: false |
| 61 | |
Dennis Dmitriev | 67aea4a | 2018-03-14 14:20:20 +0200 | [diff] [blame] | 62 | - description: Hack gtw node |
| 63 | cmd: salt '{{ HOSTNAME_GTW01 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.110/24 dev ens4; ip addr flush dev ens4"; |
| 64 | node_name: {{ HOSTNAME_CFG01 }} |
| 65 | retry: {count: 1, delay: 10} |
| 66 | skip_fail: false |
| 67 | |
| 68 | - description: Hack cmp01 node |
| 69 | cmd: salt '{{ HOSTNAME_CMP01 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.105/24 dev ens4; ip addr flush dev ens4"; |
| 70 | node_name: {{ HOSTNAME_CFG01 }} |
| 71 | retry: {count: 1, delay: 10} |
| 72 | skip_fail: false |
| 73 | |
| 74 | - description: Hack cmp02 node |
| 75 | cmd: salt '{{ HOSTNAME_CMP02 }}' cmd.run "ip addr del {{ SHARED.IPV4_NET_CONTROL_PREFIX }}.106/24 dev ens4; ip addr flush dev ens4"; |
| 76 | node_name: {{ HOSTNAME_CFG01 }} |
| 77 | retry: {count: 1, delay: 10} |
| 78 | skip_fail: false |