diff options
Diffstat (limited to 'mcp/config')
29 files changed, 675 insertions, 289 deletions
diff --git a/mcp/config/labs/local/idf-pod1.yaml b/mcp/config/labs/local/idf-pod1.yaml index 4ee359f88..b916707a1 100644 --- a/mcp/config/labs/local/idf-pod1.yaml +++ b/mcp/config/labs/local/idf-pod1.yaml @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2017 Mirantis Inc., Enea AB and others. +# Copyright (c) 2018 Linux Foundation, 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 @@ -10,13 +10,50 @@ idf: version: 0.1 + net_config: + # NOTE: Network names are likely to change after the PDF spec is updated + oob: + interface: 0 + ip-range: 172.30.8.65-172.30.8.75 + vlan: 410 + admin: + interface: 0 + vlan: native + network: 192.168.11.0 # Untagged, 'PXE/Admin' on wiki, different IP + mask: 24 + mgmt: + interface: 0 + vlan: 300 + network: 10.167.4.0 # Tagged, 'vlan 300' on wiki + ip-range: 10.167.4.10-10.167.4.254 # Some IPs are in use by lab infra + mask: 24 + storage: + interface: 3 + vlan: 301 + network: 10.2.0.0 # Tagged, not the same with 'storage' on wiki + mask: 24 + private: + interface: 1 + vlan: 1000 + network: 10.1.0.0 # Tagged, not the same with 'private' on wiki + mask: 24 + public: + interface: 2 + vlan: native + network: 172.30.10.0 # Untagged, 'public' on wiki + ip-range: 172.30.10.100-172.30.10.254 # Some IPs are in use by lab infra + mask: 24 + gateway: 172.30.10.1 + dns: + - 8.8.8.8 + - 8.8.4.4 fuel: jumphost: bridges: admin: 'pxebr' mgmt: 'br-ctl' - private: '' - public: '' + private: ~ + public: ~ network: node: # Ordered-list, index should be in sync with node index in PDF diff --git a/mcp/config/labs/local/idf-virtual1.yaml b/mcp/config/labs/local/idf-virtual1.yaml new file mode 100644 index 000000000..79a5fa044 --- /dev/null +++ b/mcp/config/labs/local/idf-virtual1.yaml @@ -0,0 +1,101 @@ +############################################################################## +# Copyright (c) 2018 Ericsson AB, 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 +############################################################################## +--- +### Fuel@OPNFV sample VIRTUAL installer descriptor file ### + +idf: + version: 0.0 # Intentionally invalid to indicate this is experimental + net_config: + # NOTE: Network names are likely to change after the PDF spec is updated + oob: + interface: 0 + ip-range: ~ + vlan: native + # All networks (except OOB) are virtual networks managed by `libvirt` + # Interface indexes are based on Fuel installer defaults + admin: + interface: 0 # when used, will be first vnet interface, untagged + vlan: native + network: 192.168.11.0 + mask: 24 + mgmt: + interface: 1 # when used, will be second vnet interface, untagged + vlan: native + network: 172.16.10.0 + ip-range: 172.16.10.10-172.16.10.254 # Some IPs are in use by lab infra + mask: 24 + storage: + interface: 4 # when used, will be fifth vnet interface, untagged + vlan: native + network: 192.168.20.0 + mask: 24 + private: + interface: 2 # when used, will be third vnet interface, untagged + vlan: 1000-1999 + network: 10.1.0.0 + mask: 24 + public: + interface: 3 # when used, will be fourth vnet interface, untagged + vlan: native + network: 10.16.0.0 + ip-range: 10.16.0.100-10.16.0.254 # Some IPs are in use by lab infra + mask: 24 + gateway: 10.16.0.1 + dns: + - 8.8.8.8 + - 8.8.4.4 + fuel: + jumphost: + bridges: + admin: ~ + mgmt: ~ + private: ~ + public: ~ + network: + node: + # Ordered-list, index should be in sync with node index in PDF + - interfaces: &interfaces + # Ordered-list, index should be in sync with interface index in PDF + - 'ens3' + - 'ens4' + - 'ens5' + - 'ens6' + busaddr: &busaddr + # Bus-info reported by `ethtool -i ethX` + - '0000:00:03.0' + - '0000:00:04.0' + - '0000:00:05.0' + - '0000:00:06.0' + - interfaces: *interfaces + busaddr: *busaddr + - interfaces: *interfaces + busaddr: *busaddr + - interfaces: *interfaces + busaddr: *busaddr + - interfaces: *interfaces + busaddr: *busaddr + reclass: + node: + - compute_params: &compute_params + common: &compute_params_common + compute_hugepages_size: 2M + compute_hugepages_count: 2048 + compute_hugepages_mount: /mnt/hugepages_2M + dpdk: + <<: *compute_params_common + compute_dpdk_driver: uio + compute_ovs_pmd_cpu_mask: "0x6" + compute_ovs_dpdk_socket_mem: "1024" + compute_ovs_dpdk_lcore_mask: "0x8" + compute_ovs_memory_channels: "2" + dpdk0_driver: igb_uio + dpdk0_n_rxq: 2 + - compute_params: *compute_params + - compute_params: *compute_params + - compute_params: *compute_params + - compute_params: *compute_params diff --git a/mcp/config/labs/local/pod1.yaml b/mcp/config/labs/local/pod1.yaml index cf60dcf72..219b2a683 100644 --- a/mcp/config/labs/local/pod1.yaml +++ b/mcp/config/labs/local/pod1.yaml @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2017 Mirantis Inc., Enea AB and others. +# Copyright (c) 2018 Linux Foundation, 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 @@ -8,6 +8,7 @@ --- ### LF POD 2 descriptor file ### +version: 1.0 details: pod_owner: Trevor Bramwell contact: tbramwell@linuxfoundation.org @@ -16,42 +17,6 @@ details: type: production link: https://wiki.opnfv.org/display/pharos/LF+POD+2 ############################################################################## -net_config: - # NOTE: Network names are likely to change after the PDF spec is updated - oob: - interface: 0 - ip-range: 172.30.8.65-172.30.8.75 - vlan: 410 - admin: - interface: 0 - vlan: native - network: 192.168.11.0 # Untagged, 'PXE/Admin' on wiki, different IP - mask: 24 - mgmt: - interface: 0 - vlan: 300 - network: 10.167.4.0 # Tagged, 'vlan 300' on wiki - mask: 24 - storage: - interface: 3 - vlan: 301 - network: 10.2.0.0 # Tagged, not the same with 'storage' on wiki - mask: 24 - private: - interface: 1 - vlan: 1000 - network: 10.1.0.0 # Tagged, not the same with 'private' on wiki - mask: 24 - public: - interface: 2 - vlan: native - network: 172.30.10.0 # Untagged, 'public' on wiki - mask: 24 - gateway: 172.30.10.1 - dns: - - 8.8.8.8 - - 8.8.4.4 -############################################################################## jumphost: name: pod2-jump node: @@ -68,7 +33,7 @@ jumphost: disk_capacity: 2400G disk_type: hdd disk_interface: sas - disk_rotation: + disk_rotation: 0 os: centos-7 remote_params: &remote_params type: ipmi @@ -84,19 +49,20 @@ jumphost: - mac_address: "00:25:b5:a0:00:1a" speed: 40gb features: 'dpdk|sriov' + address: 192.168.11.1 + name: 'nic1' - mac_address: "00:25:b5:a0:00:1b" speed: 40gb features: 'dpdk|sriov' + name: 'nic2' - mac_address: "00:25:b5:a0:00:1c" speed: 40gb features: 'dpdk|sriov' + name: 'nic3' - mac_address: "00:25:b5:a0:00:1d" speed: 40gb features: 'dpdk|sriov' - fixed_ips: - admin: 192.168.11.1 - mgmt: 10.167.4.1 - public: 172.30.10.72 + name: 'nic4' ############################################################################## nodes: - name: pod2-node1 @@ -118,19 +84,19 @@ nodes: - mac_address: "00:25:b5:a0:00:2a" speed: 40gb features: 'dpdk|sriov' + name: 'nic1' - mac_address: "00:25:b5:a0:00:2b" speed: 40gb features: 'dpdk|sriov' + name: 'nic2' - mac_address: "00:25:b5:a0:00:2c" speed: 40gb features: 'dpdk|sriov' + name: 'nic3' - mac_address: "00:25:b5:a0:00:2d" speed: 40gb features: 'dpdk|sriov' - fixed_ips: - admin: 192.168.11.2 - mgmt: 10.167.4.2 - public: 172.30.10.2 + name: 'nic4' ############################################################################ - name: pod2-node2 node: *nodeparams @@ -143,19 +109,19 @@ nodes: - mac_address: "00:25:b5:a0:00:3a" speed: 40gb features: 'dpdk|sriov' + name: 'nic1' - mac_address: "00:25:b5:a0:00:3b" speed: 40gb features: 'dpdk|sriov' + name: 'nic2' - mac_address: "00:25:b5:a0:00:3c" speed: 40gb features: 'dpdk|sriov' + name: 'nic3' - mac_address: "00:25:b5:a0:00:3d" speed: 40gb features: 'dpdk|sriov' - fixed_ips: - admin: 192.168.11.3 - mgmt: 10.167.4.3 - public: 172.30.10.3 + name: 'nic4' ############################################################################ - name: pod2-node3 node: *nodeparams @@ -168,19 +134,19 @@ nodes: - mac_address: "00:25:b5:a0:00:4a" speed: 40gb features: 'dpdk|sriov' + name: 'nic1' - mac_address: "00:25:b5:a0:00:4b" speed: 40gb features: 'dpdk|sriov' + name: 'nic2' - mac_address: "00:25:b5:a0:00:4c" speed: 40gb features: 'dpdk|sriov' + name: 'nic3' - mac_address: "00:25:b5:a0:00:4d" speed: 40gb features: 'dpdk|sriov' - fixed_ips: - admin: 192.168.11.4 - mgmt: 10.167.4.4 - public: 172.30.10.4 + name: 'nic4' ############################################################################ - name: pod2-node4 node: *nodeparams @@ -193,19 +159,19 @@ nodes: - mac_address: "00:25:b5:a0:00:5a" speed: 40gb features: 'dpdk|sriov' + name: 'nic1' - mac_address: "00:25:b5:a0:00:5b" speed: 40gb features: 'dpdk|sriov' + name: 'nic2' - mac_address: "00:25:b5:a0:00:5c" speed: 40gb features: 'dpdk|sriov' + name: 'nic3' - mac_address: "00:25:b5:a0:00:5d" speed: 40gb features: 'dpdk|sriov' - fixed_ips: - admin: 192.168.11.5 - mgmt: 10.167.4.5 - public: 172.30.10.5 + name: 'nic4' ############################################################################ - name: pod2-node5 node: *nodeparams @@ -218,16 +184,16 @@ nodes: - mac_address: "00:25:b5:a0:00:6a" speed: 40gb features: 'dpdk|sriov' + name: 'nic1' - mac_address: "00:25:b5:a0:00:6b" speed: 40gb features: 'dpdk|sriov' + name: 'nic2' - mac_address: "00:25:b5:a0:00:6c" speed: 40gb features: 'dpdk|sriov' + name: 'nic3' - mac_address: "00:25:b5:a0:00:6d" speed: 40gb features: 'dpdk|sriov' - fixed_ips: - admin: 192.168.11.6 - mgmt: 10.167.4.6 - public: 172.30.10.6 + name: 'nic4' diff --git a/mcp/config/labs/local/virtual1.yaml b/mcp/config/labs/local/virtual1.yaml new file mode 100644 index 000000000..e46a2c6c9 --- /dev/null +++ b/mcp/config/labs/local/virtual1.yaml @@ -0,0 +1,127 @@ +############################################################################## +# Copyright (c) 2018 Ericsson AB, 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 +############################################################################## +--- +### Fuel@OPNFV sample VIRTUAL POD descriptor file ### +### NOTE: This is subject to change as vPDF is not yet officialy supported ### + +version: 0.0 # Intentionally invalid to indicate this is experimental +details: + pod_owner: Fuel@OPNFV + contact: Fuel@OPNFV + lab: Example Lab + location: Example Location + type: development + link: https://wiki.opnfv.org/display/pharos/ +############################################################################## +jumphost: + name: virtual1-jump + node: + type: baremetal + vendor: HP + model: ProLiant BL460c Gen8 + arch: x86_64 + cpus: 2 + cpu_cflags: ivybridge + cores: 10 + memory: 64G + disks: + - name: 'disk1' + disk_capacity: 800G + disk_type: hdd + disk_interface: scsi + disk_rotation: 15000 + os: ubuntu-16.04 + remote_management: + type: ipmi + versions: + - 1.0 + - 2.0 + user: changeme + pass: changeme + address: 0.0.0.0 + mac_address: "00:00:00:00:00:00" + interfaces: + - name: 'nic1' + speed: 10gb + features: 'dpdk|sriov' + mac_address: "00:00:00:00:00:00" + vlan: native + - name: 'nic2' + speed: 10gb + features: 'dpdk|sriov' + mac_address: "00:00:00:00:00:00" + vlan: native +############################################################################## +nodes: + - name: node-1 + node: &nodeparams + # Fuel overrides certain params (e.g. cpus, mem) based on node role later + type: virtual + vendor: libvirt + model: virt + arch: x86_64 + cpus: 1 + cpu_cflags: ivybridge + cores: 8 + memory: 6G + disks: &disks + - name: 'disk1' + disk_capacity: 100G + disk_type: hdd + disk_interface: scsi # virtio-scsi + disk_rotation: 15000 + remote_management: &remotemgmt + type: libvirt + user: changeme + pass: changeme + address: 127.0.0.1 # Not used currently, will be 'qemu:///system' later + interfaces: &interfaces + - name: 'nic1' + speed: 10gb + features: 'dpdk|sriov' + mac_address: "00:00:00:00:00:00" # MACs will be assigned by libvirt + vlan: native + - name: 'nic2' + speed: 10gb + features: 'dpdk|sriov' + mac_address: "00:00:00:00:00:00" + vlan: native + - name: 'nic3' + speed: 10gb + features: 'dpdk|sriov' + mac_address: "00:00:00:00:00:00" + vlan: native + - name: 'nic4' + speed: 10gb + features: 'dpdk|sriov' + mac_address: "00:00:00:00:00:00" + vlan: native + ############################################################################ + - name: node-2 + node: *nodeparams + disks: *disks + remote_management: *remotemgmt + interfaces: *interfaces + ############################################################################ + - name: node-3 + node: *nodeparams + disks: *disks + remote_management: *remotemgmt + interfaces: *interfaces + ############################################################################ + - name: node-4 + node: *nodeparams + disks: *disks + remote_management: *remotemgmt + interfaces: *interfaces + ############################################################################ + - name: node-5 + node: *nodeparams + disks: *disks + remote_management: *remotemgmt + interfaces: *interfaces diff --git a/mcp/config/scenario/.gitignore b/mcp/config/scenario/.gitignore new file mode 100644 index 000000000..46c7f92c8 --- /dev/null +++ b/mcp/config/scenario/.gitignore @@ -0,0 +1 @@ +*-ha.yaml diff --git a/mcp/config/scenario/README.rst b/mcp/config/scenario/README.rst index 389877ac4..e03182f11 100644 --- a/mcp/config/scenario/README.rst +++ b/mcp/config/scenario/README.rst @@ -19,4 +19,4 @@ feature scenarios used by Fuel@OPNFV, e.g.: NOTES: ------ This directory is highly likely to change and/or be replaced/complemented -by the new PDF (Pod Descriptor File) info in securedlab OPNFV git repo. +by the new PDF (Pod Descriptor File) info in Pharos OPNFV git repo. diff --git a/mcp/config/scenario/baremetal/os-nosdn-nofeature-ha.yaml b/mcp/config/scenario/baremetal/os-nosdn-nofeature-ha.yaml deleted file mode 100644 index b721db431..000000000 --- a/mcp/config/scenario/baremetal/os-nosdn-nofeature-ha.yaml +++ /dev/null @@ -1,26 +0,0 @@ -############################################################################## -# Copyright (c) 2017 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 -############################################################################## ---- -cluster: - domain: baremetal-mcp-pike-ovs-ha.local - states: - - maas - - baremetal_init - - virtual_control_plane - - openstack_ha - - networks -virtual: - nodes: - - cfg01 - - mas01 - cfg01: - vcpus: 4 - ram: 6144 - mas01: - vcpus: 4 - ram: 6144 diff --git a/mcp/config/scenario/baremetal/os-nosdn-ovs-ha.yaml b/mcp/config/scenario/baremetal/os-nosdn-ovs-ha.yaml deleted file mode 100644 index eec97eb96..000000000 --- a/mcp/config/scenario/baremetal/os-nosdn-ovs-ha.yaml +++ /dev/null @@ -1,28 +0,0 @@ -############################################################################## -# Copyright (c) 2017 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 -############################################################################## ---- -cluster: - domain: baremetal-mcp-pike-ovs-dpdk-ha.local - states: - - maas - - baremetal_init - - virtual_control_plane - - dpdk - - openstack_ha - - networks - - networking_gw -virtual: - nodes: - - cfg01 - - mas01 - cfg01: - vcpus: 4 - ram: 6144 - mas01: - vcpus: 4 - ram: 6144 diff --git a/mcp/config/scenario/baremetal/os-odl-nofeature-ha.yaml b/mcp/config/scenario/baremetal/os-odl-nofeature-ha.yaml deleted file mode 100644 index a72c00d7d..000000000 --- a/mcp/config/scenario/baremetal/os-odl-nofeature-ha.yaml +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################## -# Copyright (c) 2017 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 -############################################################################## ---- -cluster: - domain: baremetal-mcp-pike-odl-ha.local - states: - - maas - - baremetal_init - - virtual_control_plane - - opendaylight - - openstack_ha - - networks -virtual: - nodes: - - cfg01 - - mas01 - cfg01: - vcpus: 4 - ram: 6144 - mas01: - vcpus: 4 - ram: 6144 diff --git a/mcp/config/scenario/defaults-x86_64.yaml b/mcp/config/scenario/defaults-x86_64.yaml deleted file mode 100644 index 18b0826f9..000000000 --- a/mcp/config/scenario/defaults-x86_64.yaml +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################## -# Copyright (c) 2017 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 -############################################################################## ---- -base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img -virtual: - default: - vcpus: 2 - ram: 4096 - common: - apt: - keys: - - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11/SALTSTACK-GPG-KEY.pub - 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/2016.11 xenial main - pkg: - install: - - salt-minion - control: - pkg: - install: - - cloud-init diff --git a/mcp/config/scenario/defaults-aarch64.yaml b/mcp/config/scenario/defaults.yaml index 1efa12ae4..13f2dd527 100644 --- a/mcp/config/scenario/defaults-aarch64.yaml +++ b/mcp/config/scenario/defaults.yaml @@ -1,13 +1,34 @@ ############################################################################## -# Copyright (c) 2017 Mirantis Inc. and others. +# 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 ############################################################################## --- -base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img -virtual: +x86_64: + base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img + default: + vcpus: 2 + ram: 4096 + common: + apt: + keys: + - https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11/SALTSTACK-GPG-KEY.pub + 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/2016.11 xenial main + pkg: + install: + - linux-generic-hwe-16.04 + - salt-minion + control: + apt: ~ + pkg: + install: + - cloud-init +aarch64: + base_image: https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-arm64-uefi1.img default: vcpus: 6 ram: 4096 @@ -25,6 +46,7 @@ virtual: - linux-headers-generic-hwe-16.04-edge - salt-minion control: + apt: ~ pkg: install: - cloud-init diff --git a/mcp/config/scenario/os-nosdn-nofeature-ha.yaml.j2 b/mcp/config/scenario/os-nosdn-nofeature-ha.yaml.j2 new file mode 100644 index 000000000..2c4a5f197 --- /dev/null +++ b/mcp/config/scenario/os-nosdn-nofeature-ha.yaml.j2 @@ -0,0 +1,67 @@ +############################################################################## +# 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 +############################################################################## +{%- import 'net_map.j2' as nm with context %} +{%- set cluster = {'has_virtual_nodes': False} %} +{%- for node in conf.nodes %} + {%- if not cluster.has_virtual_nodes and node.node.type == 'baremetal' %} + {%- do cluster.update({'has_baremetal_nodes': True}) %} + {%- endif %} +{%- endfor %} +--- +cluster: + domain: mcp-pike-ovs-ha.local + states: +{%- if cluster.has_baremetal_nodes %} + - maas + - baremetal_init +{%- endif %} +{%- if conf.MCP_VCP %} + - virtual_control_plane +{%- endif %} + - openstack_ha + - networks +virtual: + nodes: + - cfg01 +{%- if cluster.has_baremetal_nodes %} + - mas01 +{%- endif %} +{#- Most likely, controllers will always have the same type and number (3) #} +{%- if conf.nodes[nm.ctl01.idx].node.type == 'virtual' %} + - kvm01 + - kvm02 + - kvm03 +{%- endif %} +{#- Later, we might have mixed computes here, for hybrid multi-arch testing #} +{%- if conf.nodes[nm.cmp001.idx].node.type == 'virtual' %} + - cmp001 + - cmp002 +{%- endif %} + cfg01: + vcpus: 4 + ram: 6144 + # Below values are only used when nodes are defined in virtual.nodes above + mas01: + vcpus: 4 + ram: 6144 + # NOTE: We might need to add more RAM here + kvm01: + vcpus: 4 + ram: 14336 + kvm02: + vcpus: 4 + ram: 14336 + kvm03: + vcpus: 4 + ram: 14336 + cmp001: + vcpus: 4 + ram: 8192 + cmp002: + vcpus: 4 + ram: 8192 diff --git a/mcp/config/scenario/virtual/os-nosdn-nofeature-noha.yaml b/mcp/config/scenario/os-nosdn-nofeature-noha.yaml index b35e66fc7..3a36ae297 100644 --- a/mcp/config/scenario/virtual/os-nosdn-nofeature-noha.yaml +++ b/mcp/config/scenario/os-nosdn-nofeature-noha.yaml @@ -7,11 +7,10 @@ ############################################################################## --- cluster: - domain: virtual-mcp-pike-ovs-noha.local + domain: mcp-pike-ovs-noha.local states: - openstack_noha - neutron_gateway - - neutron_compute - networks virtual: nodes: diff --git a/mcp/config/scenario/os-nosdn-ovs-ha.yaml.j2 b/mcp/config/scenario/os-nosdn-ovs-ha.yaml.j2 new file mode 100644 index 000000000..96db11739 --- /dev/null +++ b/mcp/config/scenario/os-nosdn-ovs-ha.yaml.j2 @@ -0,0 +1,68 @@ +############################################################################## +# 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 +############################################################################## +{%- import 'net_map.j2' as nm with context %} +{%- set cluster = {'has_virtual_nodes': False} %} +{%- for node in conf.nodes %} + {%- if not cluster.has_virtual_nodes and node.node.type == 'baremetal' %} + {%- do cluster.update({'has_baremetal_nodes': True}) %} + {%- endif %} +{%- endfor %} +--- +cluster: + domain: mcp-pike-ovs-dpdk-ha.local + states: +{%- if cluster.has_baremetal_nodes %} + - maas + - baremetal_init +{%- endif %} +{%- if conf.MCP_VCP %} + - virtual_control_plane +{%- endif %} + - dpdk + - openstack_ha + - networks +virtual: + nodes: + - cfg01 +{%- if cluster.has_baremetal_nodes %} + - mas01 +{%- endif %} +{#- Most likely, controllers will always have the same type and number (3) #} +{%- if conf.nodes[nm.ctl01.idx].node.type == 'virtual' %} + - kvm01 + - kvm02 + - kvm03 +{%- endif %} +{#- Later, we might have mixed computes here, for hybrid multi-arch testing #} +{%- if conf.nodes[nm.cmp001.idx].node.type == 'virtual' %} + - cmp001 + - cmp002 +{%- endif %} + cfg01: + vcpus: 4 + ram: 6144 + # Below values are only used when nodes are defined in virtual.nodes above + mas01: + vcpus: 4 + ram: 6144 + # NOTE: We might need to add more RAM here + kvm01: + vcpus: 4 + ram: 14336 + kvm02: + vcpus: 4 + ram: 14336 + kvm03: + vcpus: 4 + ram: 14336 + cmp001: + vcpus: 4 + ram: 8192 + cmp002: + vcpus: 4 + ram: 8192 diff --git a/mcp/config/scenario/virtual/os-nosdn-ovs-noha.yaml b/mcp/config/scenario/os-nosdn-ovs-noha.yaml index e3cd3dbd9..eed17c1a4 100644 --- a/mcp/config/scenario/virtual/os-nosdn-ovs-noha.yaml +++ b/mcp/config/scenario/os-nosdn-ovs-noha.yaml @@ -7,12 +7,11 @@ ############################################################################## --- cluster: - domain: virtual-mcp-pike-ovs-dpdk-noha.local + domain: mcp-pike-ovs-dpdk-noha.local states: - dpdk - openstack_noha - neutron_gateway - - neutron_compute - networks virtual: nodes: diff --git a/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2 b/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2 new file mode 100644 index 000000000..0bd3a1307 --- /dev/null +++ b/mcp/config/scenario/os-odl-nofeature-ha.yaml.j2 @@ -0,0 +1,68 @@ +############################################################################## +# 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 +############################################################################## +{%- import 'net_map.j2' as nm with context %} +{%- set cluster = {'has_virtual_nodes': False} %} +{%- for node in conf.nodes %} + {%- if not cluster.has_virtual_nodes and node.node.type == 'baremetal' %} + {%- do cluster.update({'has_baremetal_nodes': True}) %} + {%- endif %} +{%- endfor %} +--- +cluster: + domain: mcp-pike-odl-ha.local + states: +{%- if cluster.has_baremetal_nodes %} + - maas + - baremetal_init +{%- endif %} +{%- if conf.MCP_VCP %} + - virtual_control_plane +{%- endif %} + - opendaylight + - openstack_ha + - networks +virtual: + nodes: + - cfg01 +{%- if cluster.has_baremetal_nodes %} + - mas01 +{%- endif %} +{#- Most likely, controllers will always have the same type and number (3) #} +{%- if conf.nodes[nm.ctl01.idx].node.type == 'virtual' %} + - kvm01 + - kvm02 + - kvm03 +{%- endif %} +{#- Later, we might have mixed computes here, for hybrid multi-arch testing #} +{%- if conf.nodes[nm.cmp001.idx].node.type == 'virtual' %} + - cmp001 + - cmp002 +{%- endif %} + cfg01: + vcpus: 4 + ram: 6144 + # Below values are only used when nodes are defined in virtual.nodes above + mas01: + vcpus: 4 + ram: 6144 + # NOTE: We might need to add more RAM here + kvm01: + vcpus: 4 + ram: 14336 + kvm02: + vcpus: 4 + ram: 14336 + kvm03: + vcpus: 4 + ram: 14336 + cmp001: + vcpus: 4 + ram: 8192 + cmp002: + vcpus: 4 + ram: 8192 diff --git a/mcp/config/scenario/virtual/os-odl-nofeature-noha.yaml b/mcp/config/scenario/os-odl-nofeature-noha.yaml index cef41270c..f52eaf5aa 100644 --- a/mcp/config/scenario/virtual/os-odl-nofeature-noha.yaml +++ b/mcp/config/scenario/os-odl-nofeature-noha.yaml @@ -1,5 +1,5 @@ ############################################################################## -# Copyright (c) 2017 Mirantis Inc., Enea AB and others. +# 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 @@ -7,7 +7,7 @@ ############################################################################## --- cluster: - domain: virtual-mcp-pike-odl-noha.local + domain: mcp-pike-odl-noha.local states: - opendaylight - openstack_noha diff --git a/mcp/config/scenario/os-ovn-nofeature-ha.yaml.j2 b/mcp/config/scenario/os-ovn-nofeature-ha.yaml.j2 new file mode 100644 index 000000000..8b7fda0c4 --- /dev/null +++ b/mcp/config/scenario/os-ovn-nofeature-ha.yaml.j2 @@ -0,0 +1,67 @@ +############################################################################## +# 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 +############################################################################## +{%- import 'net_map.j2' as nm with context %} +{%- set cluster = {'has_virtual_nodes': False} %} +{%- for node in conf.nodes %} + {%- if not cluster.has_virtual_nodes and node.node.type == 'baremetal' %} + {%- do cluster.update({'has_baremetal_nodes': True}) %} + {%- endif %} +{%- endfor %} +--- +cluster: + domain: mcp-pike-ovn-ha.local + states: +{%- if cluster.has_baremetal_nodes %} + - maas + - baremetal_init +{%- endif %} +{%- if conf.MCP_VCP %} + - virtual_control_plane +{%- endif %} + - openstack_ha + - networks +virtual: + nodes: + - cfg01 +{%- if cluster.has_baremetal_nodes %} + - mas01 +{%- endif %} +{#- Most likely, controllers will always have the same type and number (3) #} +{%- if conf.nodes[nm.ctl01.idx].node.type == 'virtual' %} + - kvm01 + - kvm02 + - kvm03 +{%- endif %} +{#- Later, we might have mixed computes here, for hybrid multi-arch testing #} +{%- if conf.nodes[nm.cmp001.idx].node.type == 'virtual' %} + - cmp001 + - cmp002 +{%- endif %} + cfg01: + vcpus: 4 + ram: 6144 + # Below values are only used when nodes are defined in virtual.nodes above + mas01: + vcpus: 4 + ram: 6144 + # NOTE: We might need to add more RAM here + kvm01: + vcpus: 4 + ram: 14336 + kvm02: + vcpus: 4 + ram: 14336 + kvm03: + vcpus: 4 + ram: 14336 + cmp001: + vcpus: 4 + ram: 8192 + cmp002: + vcpus: 4 + ram: 8192 diff --git a/mcp/config/scenario/virtual/os-ovn-nofeature-noha.yaml b/mcp/config/scenario/os-ovn-nofeature-noha.yaml index e0a19ebb2..104df96d3 100644 --- a/mcp/config/scenario/virtual/os-ovn-nofeature-noha.yaml +++ b/mcp/config/scenario/os-ovn-nofeature-noha.yaml @@ -7,11 +7,9 @@ ############################################################################## --- cluster: - domain: virtual-mcp-pike-ovn-noha.local + domain: mcp-pike-ovn-noha.local states: - openstack_noha - - ovn_ctl_opts - - neutron_compute - networks virtual: nodes: diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init index c14772837..891eae365 100755 --- a/mcp/config/states/baremetal_init +++ b/mcp/config/states/baremetal_init @@ -1,6 +1,6 @@ #!/bin/bash -e ############################################################################## -# Copyright (c) 2017 Mirantis Inc., Enea AB and others. +# 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 @@ -25,8 +25,11 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ salt -C 'kvm*' pkg.install bridge-utils salt -C 'kvm*' state.apply linux.network,linux.system.kernel salt -C 'kvm* or cmp*' state.apply salt.minion -salt -C 'cmp*' state.apply linux.system +wait_for 5.0 "salt -C 'cmp*' state.apply linux.system" +# wrap distro `route` binary to silence errors when route already exists +wait_for 5.0 "salt -C 'kvm* or cmp*' state.apply opnfv.route_wrapper" salt -C 'cmp*' state.apply linux.network || true +wait_for 30.0 "salt -C 'kvm* or cmp*' test.ping" # disable dhcp offered routes on compute nodes salt -C 'cmp*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \ diff --git a/mcp/config/states/dpdk b/mcp/config/states/dpdk index 5ae2aac48..281b78fed 100755 --- a/mcp/config/states/dpdk +++ b/mcp/config/states/dpdk @@ -12,8 +12,5 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x # shellcheck disable=SC1090 source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" -salt -I 'nova:compute' system.reboot -wait_for 90.0 "salt -I 'nova:compute' test.ping" - salt -I 'nova:compute' alternatives.set ovs-vswitchd /usr/lib/openvswitch-switch-dpdk/ovs-vswitchd-dpdk salt -I 'nova:compute' service.restart openvswitch-switch diff --git a/mcp/config/states/maas b/mcp/config/states/maas index 8f7a86611..10cfd01bf 100755 --- a/mcp/config/states/maas +++ b/mcp/config/states/maas @@ -14,6 +14,9 @@ ERASE_ENV=${ERASE_ENV:-0} source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/globals.sh" source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" +bm_nodes=$(salt --out yaml 'mas01*' pillar.get maas:region:machines | \ + awk '/^\s+\w+[[:digit:]]+:$/ {gsub(/:$/, "*"); printf "%s ", $1}') + # Wait for MaaS commissioning/deploy to finish, retry on failure function maas_fixup() { local statuscmd="salt 'mas01*' --out yaml state.apply maas.machines.status" @@ -27,12 +30,19 @@ function maas_fixup() { local fcnodes=$(echo "${statusout}" | \ grep -Pzo 'status: Failed commissioning\n\s+system_id: \K.+\n') + local ftnodes=$(echo "${statusout}" | \ + grep -Pzo 'status: Failed testing\n\s+system_id: \K.+\n') for node_system_id in ${fcnodes}; do salt -C 'mas01*' state.apply maas.machines.delete \ pillar="{'system_id': '${node_system_id}'}" sleep 10 done - if [ -n "${fcnodes}" ]; then + for node_system_id in ${ftnodes}; do + salt -C 'mas01*' state.apply maas.machines.override_failed_testing \ + pillar="{'system_id': '${node_system_id}'}" + sleep 10 + done + if [ -n "${fcnodes}" ] || [ -n "${ftnodes}" ]; then salt -C 'mas01*' state.apply maas.machines return 1 fi @@ -47,6 +57,16 @@ function maas_fixup() { sleep 10 done if [ -n "${fdnodes}" ] || [ -n "${rnodes}" ]; then + for node_system_id in ${fdnodes} ${rnodes}; do + # For now, we allocate 30GB (fixed) for / on cmp nodes + local node_hostname=$(echo "${statusout}" | \ + grep -Pzo 'hostname: \K.+(?=\n.+\n\s+system_id: '"${node_system_id}"')') + if [[ "${node_hostname}" =~ ^cmp ]]; then + salt -C 'mas01*' state.apply maas.machines.set_storage_layout \ + pillar="{'system_id': '${node_system_id}', 'lv_size': '32212254720'}" + sleep 10 + fi + done salt -C 'mas01*' state.apply maas.machines.deploy return 1 fi @@ -68,16 +88,19 @@ fi # MaaS rack/region controller, node commissioning salt -C 'mas01*' state.apply linux,salt,openssh,ntp +salt -C 'mas01*' state.apply maas.pxe_nat salt -C 'mas01*' state.apply maas.cluster wait_for 10 "salt -C 'mas01*' state.apply maas.region" -salt -C 'mas01*' state.apply maas.machines +if [ -n "${bm_nodes}" ]; then + salt -C 'mas01*' state.apply maas.machines +fi # cleanup outdated salt keys sleep 30 salt-key --out yaml | awk '!/^(minions|- cfg01|- mas01)/ {print $2}' | \ - xargs -I{} salt-key -yd {} + xargs --no-run-if-empty -I{} salt-key -yd {} # MaaS node deployment wait_for 10 maas_fixup @@ -87,18 +110,6 @@ salt -C 'mas01*' pillar.item\ maas:region:admin:password # Check all baremetal nodes are available -rc=1 -attempt=0 -total_attempts=10 -while [ $rc -ne 0 ] && [ ${attempt} -lt ${total_attempts} ]; do - bm_nodes=$(salt --out yaml 'mas01*' pillar.get maas:region:machines | \ - awk '/^\s+\w+[[:digit:]]+:$/ {gsub(/:$/, "*"); print $1}') - rc=0 - for node in $bm_nodes; do - salt "$node" test.ping 2>/dev/null || { rc=$?; break; }; - done - sleep 5 - ((attempt+=1)) -done +wait_for 5.0 "(for n in ${bm_nodes}; do salt \${n} test.ping 2>/dev/null || exit; done)" wait_for 10.0 "salt -C '* and not cfg01* and not mas01*' saltutil.sync_all" diff --git a/mcp/config/states/networking_gw b/mcp/config/states/networking_gw deleted file mode 100755 index ea7c87b01..000000000 --- a/mcp/config/states/networking_gw +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -e -############################################################################## -# 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 - -salt -I 'neutron:gateway' cmd.run 'ifup --force --ignore-errors br-ex' diff --git a/mcp/config/states/neutron_compute b/mcp/config/states/neutron_compute deleted file mode 100755 index c6b90e20d..000000000 --- a/mcp/config/states/neutron_compute +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -e -############################################################################## -# Copyright (c) 2017 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 - -salt -I 'neutron:compute' state.sls neutron diff --git a/mcp/config/states/opendaylight b/mcp/config/states/opendaylight index 34a2c3bd8..de15d0cef 100755 --- a/mcp/config/states/opendaylight +++ b/mcp/config/states/opendaylight @@ -1,6 +1,6 @@ #!/bin/bash -e ############################################################################## -# Copyright (c) 2017 Mirantis Inc., Enea AB and others. +# 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 @@ -9,7 +9,13 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x -salt -I 'opendaylight:server' state.sls opendaylight -salt -I 'opendaylight:client' state.sls opendaylight.client -salt -I 'opendaylight:client' cmd.run 'neutron-odl-ovs-hostconfig --noovs_dpdk' -salt -I 'neutron:server' state.sls opendaylight.client +# shellcheck disable=SC1090 +source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" + +# Get OpenDaylight server options with prefix odl_ +function odl() { + salt --out txt -I 'opendaylight:server' pillar.get "opendaylight:server:odl_$1" | cut -d ' ' -f2 +} + +wait_for 5.0 "salt -I 'opendaylight:server' state.sls opendaylight" +wait_for 20 "salt --out yaml -C 'I@neutron:server and *01*' network.connect $(odl bind_ip) $(odl rest_port) | fgrep -q 'result: true'" diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index 0bbf7cde5..77063d6c8 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -12,8 +12,8 @@ CI_DEBUG=${CI_DEBUG:-0}; [[ "${CI_DEBUG}" =~ (false|0) ]] || set -x # shellcheck disable=SC1090 source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh" -salt -I 'keepalived:cluster' state.sls keepalived -b 1 -salt -I 'keepalived:cluster' pillar.get keepalived:cluster:instance:VIP:address +wait_for 5.0 "salt -I 'keepalived:cluster' state.sls keepalived -b 1" +wait_for 5.0 "salt -I 'keepalived:cluster' pillar.get keepalived:cluster:instance:VIP:address" salt -C 'I@rabbitmq:server and *01*' state.sls rabbitmq salt -I 'rabbitmq:server' state.sls rabbitmq @@ -25,10 +25,10 @@ salt -I 'glusterfs:server' cmd.run "gluster peer status; gluster volume status" salt -I 'glusterfs:client' state.sls glusterfs.client salt -I 'galera:master' state.sls galera -salt -I 'galera:slave' state.sls galera +salt -I 'galera:slave' state.sls galera -b 1 salt -I 'galera:master' mysql.status | grep -A1 wsrep_cluster_size -salt -I 'memcached:server' state.sls memcached +wait_for 3.0 "salt -I 'memcached:server' state.sls memcached" salt -I 'haproxy:proxy' state.sls haproxy salt -I 'haproxy:proxy' service.status haproxy @@ -38,15 +38,15 @@ set +e; salt -I 'keystone:server' state.sls keystone.server -b 1; set -e salt -I 'keystone:server' service.restart apache2 salt -I 'keystone:server' state.sls keystone.server -b 1 -wait_for 30 "salt -I 'keystone:client' state.sls keystone.client" +wait_for 30.0 "salt -I 'keystone:client' state.sls keystone.client" salt -I 'keystone:server' cmd.run ". /root/keystonercv3; openstack service list" salt -I 'glance:server' state.sls glance -b 1 salt -I 'nova:controller' state.sls nova -b 1 salt -I 'heat:server' state.sls heat -b 1 -wait_for 5 "salt -I 'cinder:controller' state.sls cinder -b 1" -wait_for 3 "salt -I 'cinder:volume' state.sls cinder" +wait_for 5.0 "salt -I 'cinder:controller' state.sls cinder -b 1" +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 @@ -54,7 +54,7 @@ salt -I 'neutron:gateway' state.sls neutron.gateway salt -I 'nova:compute' state.sls nova salt -C 'I@mongodb:server and *01*' state.sls mongodb || true -wait_for 10 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'" +wait_for 10.0 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'" salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin --eval "rs.initiate()"' salt -I 'mongodb:server' state.sls mongodb @@ -63,23 +63,27 @@ salt -I 'ceilometer:server' state.sls ceilometer salt -I 'ceilometer:agent' state.sls ceilometer salt -I 'horizon:server' state.sls horizon -salt -I 'nginx:server' state.sls nginx,sphinx - -# workaround for the pike horizon is missing css, FUEL-324 -salt -I 'horizon:server' file.symlink \ - /var/lib/openstack-dashboard/static \ - /usr/share/openstack-dashboard/static -salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput" -salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force" -salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \ - "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]" -salt -I 'horizon:server' service.reload apache2 - -clstr_vip_addr=$(salt -C 'I@nginx:server and *01*' --out=yaml \ - pillar.get _param:cluster_vip_address | awk '{print $2; exit}') -salt -C 'I@nginx:server and *01*' cp.push \ - "/etc/ssl/certs/${clstr_vip_addr}-with-chain.crt" upload_path='certs/os_cacert' -cd /etc/ssl/certs && ln -sf /var/cache/salt/master/minions/prx01.*/files/certs/os_cacert +salt -I 'nginx:server' state.sls nginx + +# workaround for Ubuntu Pike Horizon missing css, FUEL-324 +if ! salt -C 'I@horizon:server and *01*' --out=yaml pkg.version openstack-dashboard | grep -qE ':.*mcp'; then + salt -I 'horizon:server' file.symlink \ + /var/lib/openstack-dashboard/static \ + /usr/share/openstack-dashboard/static + salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py collectstatic --noinput" + salt -I 'horizon:server' cmd.run "/usr/share/openstack-dashboard/manage.py compress --force" + salt -I 'horizon:server' file.append /etc/openstack-dashboard/local_settings.py \ + "AVAILABLE_THEMES = [ ('default', 'Default', 'themes/default'),]" + salt -I 'horizon:server' service.reload apache2 +fi + +cluster_public_host=$(salt -C 'I@nginx:server and *01*' --out=yaml \ + pillar.get _param:cluster_public_host | awk '{print $2; exit}') +dashboard_host=$(salt -C 'I@nginx:server and *01*' --out=yaml cp.push \ + "/etc/ssl/certs/${cluster_public_host}-with-chain.crt" \ + upload_path='certs/os_cacert' | cut -d':' -f1) +cd /etc/ssl/certs && \ + ln -sf "/var/cache/salt/master/minions/${dashboard_host}/files/certs/os_cacert" # glance v1 api is required by orchestra tests salt -I 'glance:server' ini.set_option /etc/glance/glance-api.conf '{DEFAULT: {enable_v1_api: True}}' diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha index 9fc30bbf1..4c8cbcf8a 100755 --- a/mcp/config/states/openstack_noha +++ b/mcp/config/states/openstack_noha @@ -42,6 +42,7 @@ salt -I 'cinder:controller' state.sls cinder wait_for 3 "salt -I 'cinder:volume' state.sls cinder" salt -I 'neutron:server' state.sls neutron +salt -I 'neutron:compute' state.sls neutron salt -I 'nova:compute' state.sls nova diff --git a/mcp/config/states/ovn_ctl_opts b/mcp/config/states/ovn_ctl_opts deleted file mode 100755 index eeb336b28..000000000 --- a/mcp/config/states/ovn_ctl_opts +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -e -############################################################################## -# Copyright (c) 2017 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 - -salt -I 'neutron:server' file.append /etc/default/ovn-central \ - args="OVN_CTL_OPTS='--db-nb-create-insecure-remote=yes --db-sb-create-insecure-remote=yes'" -salt -I 'neutron:server' service.restart ovn-central -sleep 30 diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane index 338c4470f..c391cfe6f 100755 --- a/mcp/config/states/virtual_control_plane +++ b/mcp/config/states/virtual_control_plane @@ -33,20 +33,10 @@ 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(/:$/, "*"); print $1}') + awk '/\s+\w+:$/ {gsub(/:$/, "*"); printf "%s ", $1}') # Check all vcp nodes are available -rc=1 -attempt=0 -total_attempts=50 -while [ $rc -ne 0 ] && [ ${attempt} -lt ${total_attempts} ]; do - rc=0 - for node in $vcp_nodes; do - salt "$node" test.ping 2>/dev/null || { rc=$?; break; }; - done - sleep 5 - ((attempt+=1)) -done +wait_for 25.0 "(for n in ${vcp_nodes}; do salt \${n} test.ping 2>/dev/null || exit; done)" wait_for 10.0 "salt -C '* and not cfg01* and not mas01*' saltutil.sync_all" @@ -58,7 +48,7 @@ cd /srv/salt/env/prd/maas/files && ln -sf \ salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' cp.get_file \ "salt://maas/files/$(basename "${APT_CONF_D_CURTIN}")" "${APT_CONF_D_CURTIN}" -wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply salt" +wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply salt" wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply linux,ntp" wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_USER} \ @@ -67,6 +57,7 @@ wait_for 10.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_ # Disable proxy dhcp routes after installation salt -C 'prx*' file.write /etc/dhcp/dhclient-enter-hooks.d/no-default-route \ args='unset new_routers' +salt -C 'prx*' state.apply opnfv.route_wrapper salt -C 'prx*' system.reboot wait_for 30.0 "salt -C 'prx*' test.ping" |