Tatyana Leontovich | 50e62dd | 2018-03-28 20:59:52 +0300 | [diff] [blame] | 1 | {% 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 Leontovich | 29935f7 | 2018-07-18 23:29:54 +0300 | [diff] [blame] | 61 | {{ 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"') }} |
Tatyana Leontovich | 50e62dd | 2018-03-28 20:59:52 +0300 | [diff] [blame] | 62 | |
| 63 | {{ SHARED.MACRO_INSTALL_SALT_MINIONS() }} |
| 64 | |
| 65 | {{ SHARED.MACRO_RUN_SALT_MASTER_UNDERLAY_STATES() }} |
| 66 | |
| 67 | {{ SHARED.MACRO_GENERATE_INVENTORY() }} |
| 68 | |
| 69 | {{ SHARED.MACRO_BOOTSTRAP_ALL_MINIONS() }} |
Tatyana Leontovich | e1d1619 | 2018-07-18 15:07:51 +0300 | [diff] [blame] | 70 | |
| 71 | - description: Enable hugepages on cmp nodes |
| 72 | cmd: salt 'cmp*' cmd.run "apt-get install -y hugepages; echo 2048 > /proc/sys/vm/nr_hugepages"; |
| 73 | node_name: {{ HOSTNAME_CFG01 }} |
| 74 | retry: {count: 1, delay: 10} |
| 75 | skip_fail: false |
| 76 | |
| 77 | - description: Workaround to avoid reboot cmp nodes bring OVS interfaces UP |
| 78 | cmd: | |
| 79 | salt 'cmp*' cmd.run "ifup br-mesh"; |
| 80 | node_name: {{ HOSTNAME_CFG01 }} |
| 81 | retry: {count: 1, delay: 10} |
| 82 | skip_fail: false |