diff options
Diffstat (limited to 'mcp/config')
-rw-r--r-- | mcp/config/scenario/.gitignore | 2 | ||||
-rw-r--r-- | mcp/config/scenario/defaults.yaml.j2 (renamed from mcp/config/scenario/defaults.yaml) | 21 | ||||
-rw-r--r-- | mcp/config/scenario/os-nosdn-nofeature-ha.yaml (renamed from mcp/config/scenario/os-nosdn-nofeature-ha.yaml.j2) | 16 | ||||
-rw-r--r-- | mcp/config/scenario/os-nosdn-nofeature-noha.yaml (renamed from mcp/config/scenario/os-nosdn-nofeature-noha.yaml.j2) | 10 | ||||
-rw-r--r-- | mcp/config/scenario/os-nosdn-ovs-ha.yaml (renamed from mcp/config/scenario/os-nosdn-ovs-ha.yaml.j2) | 16 | ||||
-rw-r--r-- | mcp/config/scenario/os-nosdn-ovs-noha.yaml (renamed from mcp/config/scenario/os-nosdn-ovs-noha.yaml.j2) | 10 | ||||
-rw-r--r-- | mcp/config/scenario/os-nosdn-vpp-ha.yaml (renamed from mcp/config/scenario/os-nosdn-vpp-ha.yaml.j2) | 13 | ||||
-rw-r--r-- | mcp/config/scenario/os-nosdn-vpp-noha.yaml (renamed from mcp/config/scenario/os-nosdn-vpp-noha.yaml.j2) | 10 | ||||
-rw-r--r-- | mcp/config/scenario/os-odl-nofeature-ha.yaml (renamed from mcp/config/scenario/os-odl-nofeature-ha.yaml.j2) | 16 | ||||
-rw-r--r-- | mcp/config/scenario/os-odl-nofeature-noha.yaml (renamed from mcp/config/scenario/os-odl-nofeature-noha.yaml.j2) | 10 | ||||
-rw-r--r-- | mcp/config/scenario/os-odl-ovs-noha.yaml (renamed from mcp/config/scenario/os-odl-ovs-noha.yaml.j2) | 10 | ||||
-rw-r--r-- | mcp/config/scenario/os-ovn-nofeature-ha.yaml (renamed from mcp/config/scenario/os-ovn-nofeature-ha.yaml.j2) | 16 | ||||
-rw-r--r-- | mcp/config/scenario/os-ovn-nofeature-noha.yaml (renamed from mcp/config/scenario/os-ovn-nofeature-noha.yaml.j2) | 10 | ||||
-rwxr-xr-x | mcp/config/states/dpdk | 3 | ||||
-rwxr-xr-x | mcp/config/states/openstack_ha | 6 | ||||
-rwxr-xr-x | mcp/config/states/openstack_noha | 4 | ||||
-rwxr-xr-x | mcp/config/states/virtual_control_plane | 6 | ||||
-rwxr-xr-x | mcp/config/states/virtual_init | 39 |
18 files changed, 77 insertions, 141 deletions
diff --git a/mcp/config/scenario/.gitignore b/mcp/config/scenario/.gitignore index a2d43db14..13346b908 100644 --- a/mcp/config/scenario/.gitignore +++ b/mcp/config/scenario/.gitignore @@ -1 +1 @@ -*ha.yaml +defaults.yaml diff --git a/mcp/config/scenario/defaults.yaml b/mcp/config/scenario/defaults.yaml.j2 index b228463c6..141af4d26 100644 --- a/mcp/config/scenario/defaults.yaml +++ b/mcp/config/scenario/defaults.yaml.j2 @@ -5,12 +5,29 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +{%- import 'net_map.j2' as nm with context %} --- x86_64: base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img default: vcpus: 2 ram: 4096 + virtual: &arch_default_virtual_nodes_infra + nodes: + infra: +{%- if nm.cluster.has_baremetal_nodes %} + - mas01 +{%- endif %} + cluster: &arch_default_cluster_states + states: + - virtual_init +{%- if nm.cluster.has_baremetal_nodes %} + - maas + - baremetal_init +{%- if conf.MCP_VCP %} + - virtual_control_plane +{%- endif %} +{%- endif %} common: apt: keys: @@ -32,6 +49,8 @@ aarch64: default: vcpus: 6 ram: 4096 + virtual: *arch_default_virtual_nodes_infra + cluster: *arch_default_cluster_states common: apt: keys: @@ -40,7 +59,7 @@ aarch64: repos: # <repo name> <repo prio> deb [arch=<arch>] <repo url> <repo dist> <repo comp> - saltstack 500 deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7 xenial main - - armband 1201 deb [arch=arm64] http://linux.enea.com/mcp-repos/queens/xenial queens-armband main + - armband_3 1201 deb [arch=arm64] http://linux.enea.com/mcp-repos/queens/xenial queens-armband main pkg: install: - python-futures diff --git a/mcp/config/scenario/os-nosdn-nofeature-ha.yaml.j2 b/mcp/config/scenario/os-nosdn-nofeature-ha.yaml index 7eb604e65..ce79b838e 100644 --- a/mcp/config/scenario/os-nosdn-nofeature-ha.yaml.j2 +++ b/mcp/config/scenario/os-nosdn-nofeature-ha.yaml @@ -5,27 +5,14 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-ovs-ha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} -{%- if conf.MCP_VCP %} - - virtual_control_plane -{%- endif %} - openstack_ha - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - kvm01 - kvm02 @@ -34,9 +21,6 @@ virtual: - cmp001 - cmp002 # Below values are only used for each node if said node is virtual - cfg01: - vcpus: 4 - ram: 6144 mas01: vcpus: 4 ram: 6144 diff --git a/mcp/config/scenario/os-nosdn-nofeature-noha.yaml.j2 b/mcp/config/scenario/os-nosdn-nofeature-noha.yaml index a0ad96b87..179313bc1 100644 --- a/mcp/config/scenario/os-nosdn-nofeature-noha.yaml.j2 +++ b/mcp/config/scenario/os-nosdn-nofeature-noha.yaml @@ -5,25 +5,15 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-ovs-noha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} - openstack_noha - neutron_gateway - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - ctl01 - gtw01 diff --git a/mcp/config/scenario/os-nosdn-ovs-ha.yaml.j2 b/mcp/config/scenario/os-nosdn-ovs-ha.yaml index da9938ce0..57f2140bb 100644 --- a/mcp/config/scenario/os-nosdn-ovs-ha.yaml.j2 +++ b/mcp/config/scenario/os-nosdn-ovs-ha.yaml @@ -5,28 +5,15 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-ovs-dpdk-ha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} -{%- if conf.MCP_VCP %} - - virtual_control_plane -{%- endif %} - dpdk - openstack_ha - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - kvm01 - kvm02 @@ -35,9 +22,6 @@ virtual: - cmp001 - cmp002 # Below values are only used for each node if said node is virtual - cfg01: - vcpus: 4 - ram: 6144 mas01: vcpus: 4 ram: 6144 diff --git a/mcp/config/scenario/os-nosdn-ovs-noha.yaml.j2 b/mcp/config/scenario/os-nosdn-ovs-noha.yaml index bee0e926f..15cad1d29 100644 --- a/mcp/config/scenario/os-nosdn-ovs-noha.yaml.j2 +++ b/mcp/config/scenario/os-nosdn-ovs-noha.yaml @@ -5,26 +5,16 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-ovs-dpdk-noha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} - dpdk - openstack_noha - neutron_gateway - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - ctl01 - gtw01 diff --git a/mcp/config/scenario/os-nosdn-vpp-ha.yaml.j2 b/mcp/config/scenario/os-nosdn-vpp-ha.yaml index 6ccb59061..9e7ebc1e2 100644 --- a/mcp/config/scenario/os-nosdn-vpp-ha.yaml.j2 +++ b/mcp/config/scenario/os-nosdn-vpp-ha.yaml @@ -5,27 +5,14 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-vpp-ha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} -{%- if conf.MCP_VCP %} - - virtual_control_plane -{%- endif %} - openstack_ha - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - kvm01 - kvm02 diff --git a/mcp/config/scenario/os-nosdn-vpp-noha.yaml.j2 b/mcp/config/scenario/os-nosdn-vpp-noha.yaml index 41cb504e1..e90300407 100644 --- a/mcp/config/scenario/os-nosdn-vpp-noha.yaml.j2 +++ b/mcp/config/scenario/os-nosdn-vpp-noha.yaml @@ -5,25 +5,15 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-vpp-noha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} - openstack_noha - neutron_gateway - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - ctl01 - gtw01 diff --git a/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2 b/mcp/config/scenario/os-odl-nofeature-ha.yaml index fbedbc6b9..51d476de5 100644 --- a/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2 +++ b/mcp/config/scenario/os-odl-nofeature-ha.yaml @@ -5,28 +5,15 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-odl-ha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} -{%- if conf.MCP_VCP %} - - virtual_control_plane -{%- endif %} - opendaylight - openstack_ha - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - kvm01 - kvm02 @@ -35,9 +22,6 @@ virtual: - cmp001 - cmp002 # Below values are only used for each node if said node is virtual - cfg01: - vcpus: 4 - ram: 6144 mas01: vcpus: 4 ram: 6144 diff --git a/mcp/config/scenario/os-odl-nofeature-noha.yaml.j2 b/mcp/config/scenario/os-odl-nofeature-noha.yaml index 7df28c2b3..3133d0e62 100644 --- a/mcp/config/scenario/os-odl-nofeature-noha.yaml.j2 +++ b/mcp/config/scenario/os-odl-nofeature-noha.yaml @@ -5,26 +5,16 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-odl-noha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} - opendaylight - openstack_noha - neutron_gateway - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - ctl01 - gtw01 diff --git a/mcp/config/scenario/os-odl-ovs-noha.yaml.j2 b/mcp/config/scenario/os-odl-ovs-noha.yaml index c81d35c51..e2df6a476 100644 --- a/mcp/config/scenario/os-odl-ovs-noha.yaml.j2 +++ b/mcp/config/scenario/os-odl-ovs-noha.yaml @@ -5,15 +5,10 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-odl-noha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} - dpdk - opendaylight - openstack_noha @@ -21,11 +16,6 @@ cluster: - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - ctl01 - gtw01 diff --git a/mcp/config/scenario/os-ovn-nofeature-ha.yaml.j2 b/mcp/config/scenario/os-ovn-nofeature-ha.yaml index f81779b8a..f76b0dce4 100644 --- a/mcp/config/scenario/os-ovn-nofeature-ha.yaml.j2 +++ b/mcp/config/scenario/os-ovn-nofeature-ha.yaml @@ -5,27 +5,14 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-ovn-ha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} -{%- if conf.MCP_VCP %} - - virtual_control_plane -{%- endif %} - openstack_ha - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - kvm01 - kvm02 @@ -34,9 +21,6 @@ virtual: - cmp001 - cmp002 # Below values are only used for each node if said node is virtual - cfg01: - vcpus: 4 - ram: 6144 mas01: vcpus: 4 ram: 6144 diff --git a/mcp/config/scenario/os-ovn-nofeature-noha.yaml.j2 b/mcp/config/scenario/os-ovn-nofeature-noha.yaml index fee47d7eb..0369f3fe9 100644 --- a/mcp/config/scenario/os-ovn-nofeature-noha.yaml.j2 +++ b/mcp/config/scenario/os-ovn-nofeature-noha.yaml @@ -5,24 +5,14 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -{%- import 'net_map.j2' as nm with context %} --- cluster: domain: mcp-ovn-noha.local states: -{%- if nm.cluster.has_baremetal_nodes %} - - maas - - baremetal_init -{%- endif %} - openstack_noha - networks virtual: nodes: - infra: - - cfg01 -{%- if nm.cluster.has_baremetal_nodes %} - - mas01 -{%- endif %} control: - ctl01 compute: diff --git a/mcp/config/states/dpdk b/mcp/config/states/dpdk index 281b78fed..efe1dafe5 100755 --- a/mcp/config/states/dpdk +++ b/mcp/config/states/dpdk @@ -14,3 +14,6 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" salt -I 'nova:compute' alternatives.set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk salt -I 'nova:compute' service.restart openvswitch-switch + +# Set datapath type to netdev for public bridge +salt -I 'nova:compute' cmd.run 'ovs-vsctl set bridge br-floating datapath_type=netdev' diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index d7d8cbd45..0f6858f1e 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -51,11 +51,15 @@ wait_for 3.0 "salt -I 'cinder:volume' state.sls cinder" salt -I 'neutron:server' state.sls neutron -b 1 salt -I 'neutron:gateway' state.sls neutron.gateway if salt 'cmp*' match.pillar 'neutron:compute:backend:engine:ovn' \ - --out yaml --static | grep -q -e "true" ; then + --out yaml --static | grep -q -e 'true' ; then salt -I 'neutron:compute' state.sls neutron.compute fi salt -I 'nova:compute' state.sls nova +if salt -I 'nova:compute' match.grain 'cpuarch:aarch64' \ + --out yaml --static | grep -q -e 'true' ; then + salt -C 'G@cpuarch:aarch64 and I@nova:compute' state.sls armband +fi salt -I 'barbican:server' state.sls barbican -b 1 salt -I 'barbican:client' state.sls barbican diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha index 9a42d4813..44360e5e9 100755 --- a/mcp/config/states/openstack_noha +++ b/mcp/config/states/openstack_noha @@ -45,6 +45,10 @@ salt -I 'neutron:server' state.sls neutron salt -I 'neutron:compute' state.sls neutron salt -I 'nova:compute' state.sls nova +if salt -I 'nova:compute' match.grain 'cpuarch:aarch64' \ + --out yaml --static | grep -q -e 'true' ; then + salt -C 'G@cpuarch:aarch64 and I@nova:compute' state.sls armband +fi salt -I 'barbican:server' state.sls barbican salt -I 'barbican:client' state.sls barbican diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane index 8ea5047ae..ef6ce59c3 100755 --- a/mcp/config/states/virtual_control_plane +++ b/mcp/config/states/virtual_control_plane @@ -27,13 +27,17 @@ if [ "${ERASE_ENV}" -eq 1 ]; then fi # KVM libvirt first, VCP deployment +if salt -C 'kvm*' match.grain 'cpuarch:aarch64' \ + --out yaml --static | grep -q -e 'true' ; then + wait_for 5.0 "salt -C 'G@cpuarch:aarch64 and kvm*' state.sls armband" +fi wait_for 5.0 "salt -C 'kvm*' state.sls libvirt" salt -C 'kvm* or cmp*' state.apply salt wait_for 10.0 "salt -C 'kvm*' state.sls salt.control" vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:node | \ - awk '/\s+\w+:$/ {gsub(/:$/, "*"); printf "%s ", $1}') + awk '/\s+\w+[[:digit:]]+:$/ {gsub(/:$/, "*"); printf "%s ", $1}') # Check all vcp nodes are available wait_for 25.0 "(for n in ${vcp_nodes}; do salt \${n} test.ping 2>/dev/null || exit; done)" diff --git a/mcp/config/states/virtual_init b/mcp/config/states/virtual_init new file mode 100755 index 000000000..47d69cd8a --- /dev/null +++ b/mcp/config/states/virtual_init @@ -0,0 +1,39 @@ +#!/bin/bash -e +# shellcheck disable=SC1090 +############################################################################## +# Copyright (c) 2018 Mirantis Inc., Enea AB and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x + +# shellcheck disable=SC1090 +source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" +source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/xdf_data.sh" + +CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x +# shellcheck disable=SC2154,SC2086,SC2116 +LOCAL_VIRT_NODES=$(echo ${virtual_nodes[*]}) # unquoted to filter space +NODE_MASK="${LOCAL_VIRT_NODES// /|}" + +wait_for 5.0 "salt-call state.sls reclass,linux.network,salt.minion \ + exclude='[{id: reclass_packages}, {id: /etc/reclass/reclass-config.yml}]'" +wait_for 3.0 "salt -C 'E@^(${NODE_MASK}).*' saltutil.refresh_pillar" + +# NOTE: domain name changes are not yet supported without a clean redeploy + +# Init specific to VMs on FN (all for virtual, mas for baremetal) +wait_for 3.0 "(for n in ${LOCAL_VIRT_NODES}; do salt -C \${n}.* test.ping || exit; done)" + +wait_for 3.0 "salt -C 'E@^(${NODE_MASK}).*' state.sls linux.system,linux.storage" +wait_for 2.0 "salt -C 'E@^(${NODE_MASK}).*' state.sls linux.network" +salt -C "E@^(${NODE_MASK}).*" system.reboot +wait_for 90.0 "salt -C 'E@^(${NODE_MASK}).*' test.ping" +wait_for 3.0 "salt -C 'E@^(${NODE_MASK}).*' pkg.upgrade refresh=False dist_upgrade=True" +wait_for 3.0 "salt -C 'E@^(${NODE_MASK}).*' saltutil.sync_all" +wait_for 3.0 "salt -C 'E@^(${NODE_MASK}).*' state.apply salt" + +wait_for 3.0 "salt -C 'E@^(${NODE_MASK}).*' state.sls ntp" |