From 8361b7492673ef35cfdbb5209e794a27e8327687 Mon Sep 17 00:00:00 2001 From: Steve Wilkerson Date: Sat, 2 Feb 2019 16:58:11 -0600 Subject: [PATCH] Add Armada job for testing update of release uuids This adds both a periodic and experimental job for deploying Ceph and the LMA components via Armada. This job will then generate a new release uuid, render an updated manifest for all previously deployed releases, then apply that manifest to validate the ability for all deployed charts to update successfully with the new release uuid annotation Change-Id: Ic1eed1bd949279f4630fb3964fbb03788536213c --- playbooks/gather-armada-manifests.yaml | 3 ++ .../armada/035-armada-update-uuids.sh | 46 +++++++++++++++++++ .../armada/manifests/armada-lma.yaml | 1 - zuul.d/jobs.yaml | 23 ++++++++++ zuul.d/project.yaml | 2 + 5 files changed, 74 insertions(+), 1 deletion(-) create mode 100755 tools/deployment/armada/035-armada-update-uuids.sh diff --git a/playbooks/gather-armada-manifests.yaml b/playbooks/gather-armada-manifests.yaml index 8ad6f90e0..82335e4b3 100644 --- a/playbooks/gather-armada-manifests.yaml +++ b/playbooks/gather-armada-manifests.yaml @@ -26,6 +26,9 @@ - armada-cluster-ingress - armada-ceph - armada-lma + - updated-armada-cluster-ingress + - updated-armada-ceph + - updated-armada-lma args: executable: /bin/bash ignore_errors: True diff --git a/tools/deployment/armada/035-armada-update-uuids.sh b/tools/deployment/armada/035-armada-update-uuids.sh new file mode 100755 index 000000000..1a651aedb --- /dev/null +++ b/tools/deployment/armada/035-armada-update-uuids.sh @@ -0,0 +1,46 @@ +#!/bin/bash + +# Copyright 2017 The Openstack-Helm Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +set -xe + +# NOTE(srwilkers): sexport all passwords and environment variables used in the original +# manifests +while read -r line; do $line; done < /tmp/osh-infra-passwords.env +: ${OSH_INFRA_PATH:="../openstack-helm-infra"} +: ${OSH_PATH:="./"} + +export CEPH_NETWORK=$(./tools/deployment/multinode/kube-node-subnet.sh) +export CEPH_FS_ID="$(cat /tmp/ceph-fs-uuid.txt)" +export RELEASE_UUID=$(uuidgen) +export TUNNEL_DEVICE=$(ip -4 route list 0/0 | awk '{ print $5; exit }') +export OSH_INFRA_PATH +export OSH_PATH + +# NOTE(srwilkers): We add this here due to envsubst expanding the ${tag} placeholder in +# fluentd's configuration. This ensures the placeholder value gets rendered appropriately +export tag='${tag}' + +manifests="armada-cluster-ingress armada-ceph armada-lma" +for manifest in $manifests; do + echo "Rendering updated-$manifest manifest" + envsubst < ./tools/deployment/armada/manifests/$manifest.yaml > /tmp/updated-$manifest.yaml + + echo "Validating updated-$manifest manifest" + armada validate /tmp/updated-$manifest.yaml + + echo "Applying updated-$manifest manifest" + armada apply /tmp/updated-$manifest.yaml +done diff --git a/tools/deployment/armada/manifests/armada-lma.yaml b/tools/deployment/armada/manifests/armada-lma.yaml index 902b4e19c..de433cefd 100644 --- a/tools/deployment/armada/manifests/armada-lma.yaml +++ b/tools/deployment/armada/manifests/armada-lma.yaml @@ -191,7 +191,6 @@ data: labels: release_group: osh-infra-osh-infra-ldap values: - release_uuid: ${RELEASE_UUID} labels: server: node_selector_key: openstack-control-plane diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index f36d0c0a4..252002018 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -296,6 +296,29 @@ - ./tools/deployment/armada/025-armada-validate-manifests.sh - ./tools/deployment/armada/030-armada-apply-manifests.sh +- job: + name: openstack-helm-infra-armada-update-uuid + parent: openstack-helm-infra-functional + nodeset: openstack-helm-five-node-ubuntu + timeout: 7200 + pre-run: + - playbooks/osh-infra-upgrade-host.yaml + - playbooks/osh-infra-deploy-docker.yaml + - playbooks/osh-infra-build.yaml + - playbooks/osh-infra-deploy-k8s.yaml + run: playbooks/osh-infra-gate-runner.yaml + post-run: + - playbooks/osh-infra-collect-logs.yaml + - playbooks/gather-armada-manifests.yaml + vars: + gate_scripts: + - ./tools/deployment/armada/010-armada-host-setup.sh + - ./tools/deployment/armada/015-armada-build.sh + - ./tools/deployment/armada/020-armada-render-manifests.sh + - ./tools/deployment/armada/025-armada-validate-manifests.sh + - ./tools/deployment/armada/030-armada-apply-manifests.sh + - ./tools/deployment/armada/035-armada-update-uuids.sh + - job: name: openstack-helm-infra-airship-divingbell parent: openstack-helm-infra diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index bd1918ece..8626652d4 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -41,6 +41,7 @@ - openstack-helm-infra-tenant-ceph - openstack-helm-infra-five-ubuntu - openstack-helm-infra-armada-deploy + - openstack-helm-infra-armada-update-uuid experimental: jobs: #NOTE(srwilkers): Disable fedora experimental jobs until issues resolved @@ -49,3 +50,4 @@ #- openstack-helm-infra-five-centos - openstack-helm-infra-elastic-beats - openstack-helm-infra-armada-deploy + - openstack-helm-infra-armada-update-uuid