Full-site deploy
Change-Id: I9a986aa1fb64e527f1e3b1d5077ccd60f563588b
This commit is contained in:
parent
01d80e18d8
commit
4ce712f177
102
.zuul.yaml
102
.zuul.yaml
@ -25,7 +25,7 @@
|
|||||||
- treasuremap-airsloop-site-lint
|
- treasuremap-airsloop-site-lint
|
||||||
- treasuremap-aiab-site-lint
|
- treasuremap-aiab-site-lint
|
||||||
- treasuremap-airskiff-deployment-ubuntu
|
- treasuremap-airskiff-deployment-ubuntu
|
||||||
# - treasuremap-airskiff-deployment-suse
|
- treasuremap-airskiff-multinode-full-site
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- treasuremap-seaworthy-site-lint
|
- treasuremap-seaworthy-site-lint
|
||||||
@ -56,6 +56,104 @@
|
|||||||
label: ubuntu-focal
|
label: ubuntu-focal
|
||||||
|
|
||||||
|
|
||||||
|
- nodeset:
|
||||||
|
name: treasuremap-airskiff-3nodes-ubuntu_focal
|
||||||
|
nodes:
|
||||||
|
- name: primary
|
||||||
|
label: ubuntu-focal
|
||||||
|
- name: node-1
|
||||||
|
label: ubuntu-focal
|
||||||
|
- name: node-2
|
||||||
|
label: ubuntu-focal
|
||||||
|
groups:
|
||||||
|
- name: primary
|
||||||
|
nodes:
|
||||||
|
- primary
|
||||||
|
- name: nodes
|
||||||
|
nodes:
|
||||||
|
- node-1
|
||||||
|
- node-2
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: treasuremap-airskiff-infra-deploy
|
||||||
|
abstract: true
|
||||||
|
roles:
|
||||||
|
- zuul: openstack/openstack-helm-infra
|
||||||
|
- zuul: zuul/zuul-jobs
|
||||||
|
required-projects:
|
||||||
|
- openstack/openstack-helm
|
||||||
|
- openstack/openstack-helm-infra
|
||||||
|
irrelevant-files:
|
||||||
|
- ^.*\.rst$
|
||||||
|
- ^doc/.*$
|
||||||
|
- ^releasenotes/.*$
|
||||||
|
- ^site/seaworthy/.*$
|
||||||
|
- ^site/airsloop/.*$
|
||||||
|
- ^site/aiab/.*$
|
||||||
|
timeout: 10800
|
||||||
|
pre-run:
|
||||||
|
- tools/gate/playbooks/prepare-hosts.yaml
|
||||||
|
- tools/gate/playbooks/mount-volumes.yaml
|
||||||
|
- tools/gate/playbooks/git-config.yaml
|
||||||
|
post-run: tools/gate/playbooks/osh-infra-collect-logs.yaml
|
||||||
|
run:
|
||||||
|
- tools/gate/playbooks/deploy-env.yaml
|
||||||
|
- tools/gate/playbooks/git-config.yaml
|
||||||
|
- tools/gate/playbooks/airship-run-scripts.yaml
|
||||||
|
vars:
|
||||||
|
extra_volume:
|
||||||
|
size: 80G
|
||||||
|
type: Linux
|
||||||
|
mount_point: /opt/ext_vol
|
||||||
|
docker:
|
||||||
|
root_path: "/opt/ext_vol/docker"
|
||||||
|
containerd:
|
||||||
|
root_path: "/opt/ext_vol/containerd"
|
||||||
|
kubeadm:
|
||||||
|
pod_network_cidr: "10.244.0.0/24"
|
||||||
|
service_cidr: "10.96.0.0/16"
|
||||||
|
loopback_setup: true
|
||||||
|
loopback_device: /dev/loop100
|
||||||
|
loopback_image: "/opt/ext_vol/openstack-helm/ceph-loop.img"
|
||||||
|
ceph_osd_data_device: /dev/loop100
|
||||||
|
kube_version: "1.28.4-1.1"
|
||||||
|
calico_version: "v3.27.0"
|
||||||
|
coredns_version: "v1.11.1"
|
||||||
|
helm_version: "v3.13.2"
|
||||||
|
yq_version: "v4.6.0"
|
||||||
|
crictl_version: "v1.26.1"
|
||||||
|
zuul_osh_infra_relative_path: ../openstack-helm-infra
|
||||||
|
gate_scripts_relative_path: ../openstack-helm-infra
|
||||||
|
run_helm_tests: "no"
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: treasuremap-airskiff-multinode-full-site
|
||||||
|
parent: treasuremap-airskiff-infra-deploy
|
||||||
|
nodeset: treasuremap-airskiff-3nodes-ubuntu_focal
|
||||||
|
description: |
|
||||||
|
Deploy Openstack using Airskiff and latest Treasuremap changes.
|
||||||
|
Airskiff is using latest Airship v1.x based on Airflow-2.6.2
|
||||||
|
voting: true
|
||||||
|
vars:
|
||||||
|
site: airskiff
|
||||||
|
HELM_ARTIFACT_URL: https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz
|
||||||
|
HTK_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
||||||
|
OSH_INFRA_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
||||||
|
OSH_COMMIT: 2d9457e34ca4200ed631466bd87569b0214c92e7
|
||||||
|
gate_scripts_relative_path: .
|
||||||
|
gate_scripts:
|
||||||
|
- ./tools/deployment/airskiff/developer/000-prepare-k8s.sh
|
||||||
|
- ./tools/deployment/airskiff/developer/000-clone-dependencies.sh
|
||||||
|
- ./tools/deployment/airskiff/developer/020-setup-client.sh
|
||||||
|
- ./tools/deployment/airskiff/developer/015-make-all-charts.sh
|
||||||
|
- ./tools/deployment/airskiff/developer/025-start-artifactory.sh
|
||||||
|
- ./tools/deployment/airskiff/developer/026-reduce-site.sh
|
||||||
|
- ./tools/deployment/airskiff/developer/030-armada-bootstrap.sh
|
||||||
|
- ./tools/deployment/airskiff/developer/100-deploy-osh.sh
|
||||||
|
- ./tools/deployment/airskiff/common/os-env.sh
|
||||||
|
- ./tools/gate/wait-for-shipyard.sh
|
||||||
|
- ./tools/deployment/airskiff/common/sleep.sh
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: treasuremap-site-lint
|
name: treasuremap-site-lint
|
||||||
description:
|
description:
|
||||||
@ -181,7 +279,7 @@
|
|||||||
post-run: tools/gate/playbooks/debug-report.yaml
|
post-run: tools/gate/playbooks/debug-report.yaml
|
||||||
vars:
|
vars:
|
||||||
site: airskiff
|
site: airskiff
|
||||||
HELM_ARTIFACT_URL: https://get.helm.sh/helm-v3.12.2-linux-amd64.tar.gz
|
HELM_ARTIFACT_URL: https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz
|
||||||
HTK_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
HTK_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
||||||
OSH_INFRA_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
OSH_INFRA_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
||||||
OSH_COMMIT: 2d9457e34ca4200ed631466bd87569b0214c92e7
|
OSH_COMMIT: 2d9457e34ca4200ed631466bd87569b0214c92e7
|
||||||
|
5
tools/deployment/airskiff/common/sleep.sh
Executable file
5
tools/deployment/airskiff/common/sleep.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
while true; do sleep 10; done
|
74
tools/deployment/airskiff/developer/000-prepare-k8s.sh
Executable file
74
tools/deployment/airskiff/developer/000-prepare-k8s.sh
Executable file
@ -0,0 +1,74 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 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 -ex
|
||||||
|
|
||||||
|
# Add labels to the core namespaces & nodes
|
||||||
|
kubectl label --overwrite namespace default name=default
|
||||||
|
kubectl label --overwrite namespace kube-system name=kube-system
|
||||||
|
kubectl label --overwrite namespace kube-public name=kube-public
|
||||||
|
kubectl label --overwrite nodes --all openstack-control-plane=enabled
|
||||||
|
kubectl label --overwrite nodes --all openstack-compute-node=enabled
|
||||||
|
kubectl label --overwrite nodes --all openvswitch=enabled
|
||||||
|
kubectl label --overwrite nodes --all linuxbridge=enabled
|
||||||
|
kubectl label --overwrite nodes --all ceph-mon=enabled
|
||||||
|
kubectl label --overwrite nodes --all ceph-osd=enabled
|
||||||
|
kubectl label --overwrite nodes --all ceph-mds=enabled
|
||||||
|
kubectl label --overwrite nodes --all ceph-rgw=enabled
|
||||||
|
kubectl label --overwrite nodes --all ceph-mgr=enabled
|
||||||
|
# We deploy l3 agent only on the node where we run test scripts.
|
||||||
|
# In this case virtual router will be created only on this node
|
||||||
|
# and we don't need L2 overlay (will be implemented later).
|
||||||
|
kubectl label --overwrite nodes -l "node-role.kubernetes.io/control-plane" l3-agent=enabled
|
||||||
|
|
||||||
|
for NAMESPACE in ceph mariadb-operator openstack osh-infra; do
|
||||||
|
tee /tmp/${NAMESPACE}-ns.yaml << EOF
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
kubernetes.io/metadata.name: ${NAMESPACE}
|
||||||
|
name: ${NAMESPACE}
|
||||||
|
name: ${NAMESPACE}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
kubectl apply -f /tmp/${NAMESPACE}-ns.yaml
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
PATCH=$(mktemp)
|
||||||
|
HOSTIP=$(hostname -I| awk '{print $1}')
|
||||||
|
kubectl get configmap coredns -n kube-system -o json | jq -r "{data: .data}" | sed 's/ready\\n/header \{\\n response set ra\\n \}\\n ready\\n/g' > "${PATCH}"
|
||||||
|
sed -i "s;forward . /etc/resolv.conf {\\\n max_concurrent 1000\\\n }\\\n;forward . /etc/resolv.conf {\\\n max_concurrent 1000\\\n }\\\n hosts {\\\n $HOSTIP control-plane.minikube.internal\\\n fallthrough\\\n }\\\n;" "${PATCH}"
|
||||||
|
kubectl patch configmap coredns -n kube-system --patch-file "${PATCH}"
|
||||||
|
kubectl set image deployment coredns -n kube-system "coredns=registry.k8s.io/coredns/coredns:${COREDNS_VERSION}"
|
||||||
|
rm -f "${PATCH}"
|
||||||
|
kubectl rollout restart -n kube-system deployment/coredns
|
||||||
|
kubectl rollout status --watch --timeout=300s -n kube-system deployment/coredns
|
||||||
|
sleep 10
|
||||||
|
host -v control-plane.minikube.internal
|
||||||
|
|
||||||
|
kubectl label nodes --all --overwrite ucp-control-plane=enabled
|
||||||
|
|
||||||
|
|
||||||
|
kubectl run multitool --image=praqma/network-multitool
|
||||||
|
kubectl wait --for=condition=ready pod multitool --timeout=300s
|
||||||
|
kubectl exec -it multitool -- nslookup control-plane.minikube.internal
|
||||||
|
kubectl exec -it multitool -- ping -c 4 8.8.8.8
|
||||||
|
kubectl exec -it multitool -- nslookup google.com
|
||||||
|
|
||||||
|
# add $USER to docker group
|
||||||
|
sudo usermod -aG docker ${USER}
|
||||||
|
sudo service docker restart
|
||||||
|
|
||||||
|
# make all
|
@ -20,7 +20,7 @@ set -xe
|
|||||||
CURRENT_DIR="$(pwd)"
|
CURRENT_DIR="$(pwd)"
|
||||||
: "${INSTALL_PATH:="../"}"
|
: "${INSTALL_PATH:="../"}"
|
||||||
: "${ARTIFACTS_PATH:="../artifacts"}"
|
: "${ARTIFACTS_PATH:="../artifacts"}"
|
||||||
: "${HTK_COMMIT:="ae91cf3fc3f288b6d92ace4a3a405606a653638f"}"
|
: "${HTK_COMMIT:="cfff60ec10a6c386f38db79bb9f59a552c2b032f"}"
|
||||||
: "${MAKE_CHARTS_OPENSTACK_HELM:=true}"
|
: "${MAKE_CHARTS_OPENSTACK_HELM:=true}"
|
||||||
: "${MAKE_CHARTS_OSH_INFRA:=true}"
|
: "${MAKE_CHARTS_OSH_INFRA:=true}"
|
||||||
: "${MAKE_CHARTS_ARMADA:=true}"
|
: "${MAKE_CHARTS_ARMADA:=true}"
|
||||||
|
11
tools/deployment/airskiff/developer/025-start-artifactory.sh
Executable file
11
tools/deployment/airskiff/developer/025-start-artifactory.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
# start http server with artifacts
|
||||||
|
whoami
|
||||||
|
ls -la /var/run/docker.sock
|
||||||
|
docker rm artifacts --force || true
|
||||||
|
docker run --name artifacts -p 8282:80 -v $(pwd)/../artifacts:/usr/share/nginx/html -d nginx
|
||||||
|
sleep 10
|
||||||
|
curl --verbose -I http://control-plane.minikube.internal:8282/memcached.tgz
|
4
tools/deployment/airskiff/developer/026-reduce-site.sh
Executable file
4
tools/deployment/airskiff/developer/026-reduce-site.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
mv tools/gate/manifests/full-site.yaml type/skiff/manifests/full-site.yaml
|
75
tools/gate/playbooks/airship-run-scripts.yaml
Normal file
75
tools/gate/playbooks/airship-run-scripts.yaml
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
- hosts: primary
|
||||||
|
tasks:
|
||||||
|
- name: Override images
|
||||||
|
when: buildset_registry is defined
|
||||||
|
vars:
|
||||||
|
work_dir: "{{ zuul.project.src_dir }}"
|
||||||
|
block:
|
||||||
|
- name: Buildset registry alias
|
||||||
|
include_role:
|
||||||
|
name: deploy-env
|
||||||
|
tasks_from: buildset_registry_alias
|
||||||
|
|
||||||
|
- name: Print zuul
|
||||||
|
debug:
|
||||||
|
var: zuul
|
||||||
|
|
||||||
|
- name: Override proposed images from artifacts
|
||||||
|
shell: >
|
||||||
|
find {{ override_paths | join(" ") }} -type f -exec sed -Ei
|
||||||
|
"s#['\"]?docker\.io/({{ repo }}):({{ tag }})['\"]?\$#{{ buildset_registry_alias }}:{{ buildset_registry.port }}/\1:\2#g" {} +
|
||||||
|
loop: "{{ zuul.artifacts | default([]) }}"
|
||||||
|
args:
|
||||||
|
chdir: "{{ work_dir }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: zj_zuul_artifact
|
||||||
|
when: "'metadata' in zj_zuul_artifact and zj_zuul_artifact.metadata.type | default('') == 'container_image'"
|
||||||
|
vars:
|
||||||
|
tag: "{{ zj_zuul_artifact.metadata.tag }}"
|
||||||
|
repo: "{{ zj_zuul_artifact.metadata.repository }}"
|
||||||
|
override_paths:
|
||||||
|
- ../openstack-helm*/*/values*
|
||||||
|
- ../openstack-helm-infra/tools/deployment/
|
||||||
|
|
||||||
|
- name: Diff
|
||||||
|
shell: |
|
||||||
|
set -ex;
|
||||||
|
for dir in openstack-helm openstack-helm-infra; do
|
||||||
|
path="{{ work_dir }}/../${dir}/"
|
||||||
|
if [ ! -d "${path}" ]; then continue; fi
|
||||||
|
echo "${dir} diff"
|
||||||
|
cd "${path}"; git diff; cd -;
|
||||||
|
done
|
||||||
|
|
||||||
|
- name: "creating directory for run artifacts"
|
||||||
|
file:
|
||||||
|
path: "/tmp/artifacts"
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Run gate scripts
|
||||||
|
include_role:
|
||||||
|
name: "{{ ([item] | flatten | length == 1) | ternary('airship-run-script', 'airship-run-script-set') }}"
|
||||||
|
vars:
|
||||||
|
workload: "{{ [item] | flatten }}"
|
||||||
|
loop: "{{ gate_scripts }}"
|
||||||
|
|
||||||
|
- name: "Downloads artifacts to executor"
|
||||||
|
synchronize:
|
||||||
|
src: "/tmp/artifacts"
|
||||||
|
dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
|
||||||
|
mode: pull
|
||||||
|
ignore_errors: True
|
||||||
|
...
|
@ -55,7 +55,7 @@
|
|||||||
./tools/deployment/airskiff/developer/020-setup-client.sh
|
./tools/deployment/airskiff/developer/020-setup-client.sh
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Build all charts locally
|
- name: Build all charts locally
|
||||||
shell: |
|
shell: |
|
||||||
@ -67,7 +67,7 @@
|
|||||||
./tools/deployment/airskiff/developer/015-make-all-charts.sh
|
./tools/deployment/airskiff/developer/015-make-all-charts.sh
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Start artifactory
|
- name: Start artifactory
|
||||||
shell: |
|
shell: |
|
||||||
@ -79,7 +79,7 @@
|
|||||||
curl --verbose -I http://control-plane.minikube.internal:8282/memcached.tgz
|
curl --verbose -I http://control-plane.minikube.internal:8282/memcached.tgz
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Deploy Airship components using Armada
|
- name: Deploy Airship components using Armada
|
||||||
shell: |
|
shell: |
|
||||||
@ -90,7 +90,7 @@
|
|||||||
./tools/deployment/airskiff/developer/030-armada-bootstrap.sh
|
./tools/deployment/airskiff/developer/030-armada-bootstrap.sh
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Deploy Software using Airship
|
- name: Deploy Software using Airship
|
||||||
shell: |
|
shell: |
|
||||||
@ -99,7 +99,7 @@
|
|||||||
./tools/deployment/airskiff/developer/100-deploy-osh.sh
|
./tools/deployment/airskiff/developer/100-deploy-osh.sh
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Wait for deployment completion
|
- name: Wait for deployment completion
|
||||||
shell: |
|
shell: |
|
||||||
@ -108,7 +108,7 @@
|
|||||||
./tools/gate/wait-for-shipyard.sh
|
./tools/gate/wait-for-shipyard.sh
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Stop artifactory
|
- name: Stop artifactory
|
||||||
shell: |
|
shell: |
|
||||||
@ -117,4 +117,4 @@
|
|||||||
docker rm artifacts --force || true
|
docker rm artifacts --force || true
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
38
tools/gate/playbooks/deploy-env.yaml
Normal file
38
tools/gate/playbooks/deploy-env.yaml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
become: true
|
||||||
|
gather_facts: true
|
||||||
|
|
||||||
|
roles:
|
||||||
|
- role: add-authorized-keys
|
||||||
|
public_keys:
|
||||||
|
- public_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDA7eM8WFJrqQmki8rR0O3QBHyl8xq42jb1RduwuRwjWoGYJI5cX7Fx+7VR4A9ITCoiqxKS8DMfgKbt5jKC6SmvMALULZsnYlthB34KywurgxsW6fgp68DHWQ7J4CCBhoIpl0W3JW7s6b0vHLhab59r0E+AYemBVuWUqbFEy8nDAHcQv1S/2o1udhmljIN7c2ogO4KAJ7Lge0BoIP9ps4u6AVwyQZixp4anU9DHGNA/UQj4M5UyuALj5buEAuATBe9Vqj4sOvZjObPJAGPUrNRrGEWAFk+lSZHRzKXo0eeWtPqoh5UN9UDb5Pocg1krncMIZwjHKovlD1z/O1y91aY5LM1wxm/7aaIiX8eCihyVZaOuDCLF7WDT2SMs7ABcotX2MDtVQTrNNV3MmMAScFNDflzPKszd7cdjLl6PBq8bvPxmCkLmnitPTGOoh9d8i+JlbINvgx1pguYrpeciIyreCO1rjTW3MgB0tyoMEa31V+7HrauBMeNnE68YTqLTIB0= smarkin@mirantis.com
|
||||||
|
- ensure-python
|
||||||
|
- ensure-pip
|
||||||
|
- ensure-tox
|
||||||
|
- clear-firewall
|
||||||
|
- deploy-apparmor
|
||||||
|
- deploy-selenium
|
||||||
|
- deploy-env
|
||||||
|
tasks:
|
||||||
|
- name: Install Packaging python module for tools/airship
|
||||||
|
block:
|
||||||
|
- pip:
|
||||||
|
name: packaging
|
||||||
|
version: 23.1
|
||||||
|
executable: pip3
|
||||||
|
become: True
|
||||||
|
|
||||||
|
...
|
@ -28,4 +28,4 @@
|
|||||||
/target/collected/treasuremap.yaml
|
/target/collected/treasuremap.yaml
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
17
tools/gate/playbooks/mount-volumes.yaml
Normal file
17
tools/gate/playbooks/mount-volumes.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- mount-extra-volume
|
||||||
|
...
|
43
tools/gate/playbooks/osh-infra-collect-logs.yaml
Normal file
43
tools/gate/playbooks/osh-infra-collect-logs.yaml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
vars_files:
|
||||||
|
- vars.yaml
|
||||||
|
vars:
|
||||||
|
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
|
||||||
|
logs_dir: "/tmp/logs"
|
||||||
|
roles:
|
||||||
|
- gather-host-logs
|
||||||
|
tags:
|
||||||
|
- gather-host-logs
|
||||||
|
|
||||||
|
- hosts: primary
|
||||||
|
vars_files:
|
||||||
|
- vars.yaml
|
||||||
|
vars:
|
||||||
|
work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
|
||||||
|
logs_dir: "/tmp/logs"
|
||||||
|
roles:
|
||||||
|
- helm-release-status
|
||||||
|
- describe-kubernetes-objects
|
||||||
|
- gather-pod-logs
|
||||||
|
- gather-prom-metrics
|
||||||
|
- gather-selenium-data
|
||||||
|
tags:
|
||||||
|
- helm-release-status
|
||||||
|
- describe-kubernetes-objects
|
||||||
|
- gather-pod-logs
|
||||||
|
- gather-prom-metrics
|
||||||
|
- gather-selenium-data
|
||||||
|
...
|
17
tools/gate/playbooks/prepare-hosts.yaml
Normal file
17
tools/gate/playbooks/prepare-hosts.yaml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- start-zuul-console
|
||||||
|
...
|
@ -0,0 +1,27 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
ceph_osd_data_device: "/dev/loop0"
|
||||||
|
kubeadm:
|
||||||
|
pod_network_cidr: "10.244.0.0/24"
|
||||||
|
osh_params:
|
||||||
|
container_distro_name: ubuntu
|
||||||
|
container_distro_version: focal
|
||||||
|
# feature_gates:
|
||||||
|
site: airskiff
|
||||||
|
HELM_ARTIFACT_URL: https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz
|
||||||
|
HTK_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
||||||
|
OSH_INFRA_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
||||||
|
OSH_COMMIT: 2d9457e34ca4200ed631466bd87569b0214c92e7
|
||||||
|
COREDNS_VERSION: v1.11.1
|
||||||
|
...
|
@ -0,0 +1,64 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
- block:
|
||||||
|
- name: "Run script set {{ workload }}"
|
||||||
|
shell: |
|
||||||
|
set -xe;
|
||||||
|
{{ gate_script_path }}
|
||||||
|
loop: "{{ workload }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: gate_script_path
|
||||||
|
pause: 5
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul.project.src_dir }}/{{ gate_scripts_relative_path }}"
|
||||||
|
environment:
|
||||||
|
CEPH_OSD_DATA_DEVICE: "{{ ceph_osd_data_device }}"
|
||||||
|
POD_NETWORK_CIDR: "{{ kubeadm.pod_network_cidr }}"
|
||||||
|
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
|
||||||
|
OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
|
||||||
|
OSH_PATH: "{{ zuul_osh_relative_path | default('../openstack-helm/') }}"
|
||||||
|
OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('../openstack-helm-infra/') }}"
|
||||||
|
OPENSTACK_RELEASE: "{{ osh_params.openstack_release | default('') }}"
|
||||||
|
CONTAINER_DISTRO_NAME: "{{ osh_params.container_distro_name | default('') }}"
|
||||||
|
CONTAINER_DISTRO_VERSION: "{{ osh_params.container_distro_version | default('') }}"
|
||||||
|
FEATURE_GATES: "{{ osh_params.feature_gates | default('') }}"
|
||||||
|
RUN_HELM_TESTS: "{{ run_helm_tests | default('yes') }}"
|
||||||
|
PL_SITE: "{{ site | default('airskiff') }}"
|
||||||
|
HELM_ARTIFACT_URL: "{{ HELM_ARTIFACT_URL | default('https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz') }}"
|
||||||
|
HTK_COMMIT: "{{ HTK_COMMIT | default('cfff60ec10a6c386f38db79bb9f59a552c2b032f') }}"
|
||||||
|
OSH_INFRA_COMMIT: "{{ OSH_INFRA_COMMIT | default('cfff60ec10a6c386f38db79bb9f59a552c2b032f') }}"
|
||||||
|
OSH_COMMIT: "{{ OSH_COMMIT | default('2d9457e34ca4200ed631466bd87569b0214c92e7') }}"
|
||||||
|
COREDNS_VERSION: "{{ coredns_version | default('v1.11.1') }}"
|
||||||
|
# NOTE(aostapenko) using bigger than async_status timeout due to async_status issue with
|
||||||
|
# not recognizing timed out jobs: https://github.com/ansible/ansible/issues/25637
|
||||||
|
async: 3600
|
||||||
|
poll: 0
|
||||||
|
register: async_results
|
||||||
|
|
||||||
|
- name: Wait for script set to finish
|
||||||
|
async_status:
|
||||||
|
jid: '{{ item.ansible_job_id }}'
|
||||||
|
register: jobs
|
||||||
|
until: jobs.finished
|
||||||
|
delay: 5
|
||||||
|
retries: 360
|
||||||
|
loop: "{{ async_results.results }}"
|
||||||
|
|
||||||
|
always:
|
||||||
|
- name: Print script set output
|
||||||
|
shell: |
|
||||||
|
# NOTE(aostapenko) safely retrieving items for the unlikely case if jobs timed out in async_status
|
||||||
|
echo 'STDOUT:\n{{ item.get("stdout") | regex_replace("\'", "") }}\nSTDERR:\n{{ item.get("stderr") | regex_replace("\'", "") }}'
|
||||||
|
loop: "{{ jobs.results }}"
|
||||||
|
...
|
@ -0,0 +1,27 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
ceph_osd_data_device: "/dev/loop0"
|
||||||
|
kubeadm:
|
||||||
|
pod_network_cidr: "10.244.0.0/24"
|
||||||
|
osh_params:
|
||||||
|
container_distro_name: ubuntu
|
||||||
|
container_distro_version: focal
|
||||||
|
# feature_gates:
|
||||||
|
site: airskiff
|
||||||
|
HELM_ARTIFACT_URL: https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz
|
||||||
|
HTK_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
||||||
|
OSH_INFRA_COMMIT: cfff60ec10a6c386f38db79bb9f59a552c2b032f
|
||||||
|
OSH_COMMIT: 2d9457e34ca4200ed631466bd87569b0214c92e7
|
||||||
|
COREDNS_VERSION: v1.11.1
|
||||||
|
...
|
@ -0,0 +1,40 @@
|
|||||||
|
# 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.
|
||||||
|
|
||||||
|
---
|
||||||
|
- name: "Run script {{ workload[0] }}"
|
||||||
|
shell: |
|
||||||
|
set -xe;
|
||||||
|
{{ gate_script_path }}
|
||||||
|
vars:
|
||||||
|
gate_script_path: "{{ workload[0] }}"
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul.project.src_dir }}/{{ gate_scripts_relative_path }}"
|
||||||
|
environment:
|
||||||
|
CEPH_OSD_DATA_DEVICE: "{{ ceph_osd_data_device }}"
|
||||||
|
POD_NETWORK_CIDR: "{{ kubeadm.pod_network_cidr }}"
|
||||||
|
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
|
||||||
|
OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
|
||||||
|
OSH_PATH: "{{ zuul_osh_relative_path | default('../openstack-helm/') }}"
|
||||||
|
OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('../openstack-helm-infra/') }}"
|
||||||
|
OPENSTACK_RELEASE: "{{ osh_params.openstack_release | default('') }}"
|
||||||
|
CONTAINER_DISTRO_NAME: "{{ osh_params.container_distro_name | default('') }}"
|
||||||
|
CONTAINER_DISTRO_VERSION: "{{ osh_params.container_distro_version | default('') }}"
|
||||||
|
FEATURE_GATES: "{{ osh_params.feature_gates | default('') }}"
|
||||||
|
RUN_HELM_TESTS: "{{ run_helm_tests | default('yes') }}"
|
||||||
|
PL_SITE: "{{ site | default('airskiff') }}"
|
||||||
|
HELM_ARTIFACT_URL: "{{ HELM_ARTIFACT_URL | default('https://get.helm.sh/helm-v3.13.2-linux-amd64.tar.gz') }}"
|
||||||
|
HTK_COMMIT: "{{ HTK_COMMIT | default('cfff60ec10a6c386f38db79bb9f59a552c2b032f') }}"
|
||||||
|
OSH_INFRA_COMMIT: "{{ OSH_INFRA_COMMIT | default('cfff60ec10a6c386f38db79bb9f59a552c2b032f') }}"
|
||||||
|
OSH_COMMIT: "{{ OSH_COMMIT | default('2d9457e34ca4200ed631466bd87569b0214c92e7') }}"
|
||||||
|
COREDNS_VERSION: "{{ coredns_version | default('v1.11.1') }}"
|
||||||
|
...
|
@ -19,14 +19,14 @@
|
|||||||
masked: yes
|
masked: yes
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
name: systemd-resolved
|
name: systemd-resolved
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Remove local stub dns from resolv.conf, if it exists
|
- name: Remove local stub dns from resolv.conf, if it exists
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/resolv.conf
|
path: /etc/resolv.conf
|
||||||
state: absent
|
state: absent
|
||||||
regexp: '^nameserver.*127.0.0.1'
|
regexp: '^nameserver.*127.0.0.1'
|
||||||
become: yes
|
become: true
|
||||||
|
|
||||||
- name: Add upstream nameservers in resolv.conf
|
- name: Add upstream nameservers in resolv.conf
|
||||||
blockinfile:
|
blockinfile:
|
||||||
@ -34,4 +34,4 @@
|
|||||||
block: |
|
block: |
|
||||||
nameserver 8.8.8.8
|
nameserver 8.8.8.8
|
||||||
nameserver 8.8.4.4
|
nameserver 8.8.4.4
|
||||||
become: yes
|
become: true
|
||||||
|
@ -20,4 +20,4 @@
|
|||||||
./tools/gate/lint-site.sh "{{ site }}"
|
./tools/gate/lint-site.sh "{{ site }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ zuul.project.src_dir }}"
|
chdir: "{{ zuul.project.src_dir }}"
|
||||||
become: yes
|
become: true
|
||||||
|
Loading…
Reference in New Issue
Block a user