Skip to content

Commit

Permalink
Merge branch 'master' into stf-1679/manage-with-grafanav5
Browse files Browse the repository at this point in the history
  • Loading branch information
leifmadsen authored Jan 15, 2024
2 parents ca5f717 + 665577e commit 931efaf
Show file tree
Hide file tree
Showing 9 changed files with 166 additions and 70 deletions.
128 changes: 109 additions & 19 deletions .zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,83 @@
---
- nodeset:
name: stf-crc_extracted-ocp412
nodes:
- name: controller
label: cloud-centos-9-stream-tripleo-vexxhost
- name: crc
label: coreos-crc-extracted-2-19-0-xxl

- nodeset:
name: stf-crc_extracted-ocp413
nodes:
- name: controller
label: cloud-centos-9-stream-tripleo-vexxhost
- name: crc
label: coreos-crc-extracted-2-28-0-xxl

- nodeset:
name: stf-crc_extracted-ocp414
nodes:
- name: controller
label: cloud-centos-9-stream-tripleo-vexxhost
- name: crc
label: coreos-crc-extracted-2-30-0-xxl

# Based on the 2-node job cookbook at https://github.com/openstack-k8s-operators/ci-framework/blob/main/docs/source/cookbooks/zuul-job-nodeset.md
- job:
name: stf-base-2node
parent: podified-multinode-edpm-deployment-crc
abstract: true
required-projects:
- name: github.com/openstack-k8s-operators/dataplane-operator
override-checkout: main
- name: github.com/openstack-k8s-operators/infra-operator
override-checkout: main
- name: github.com/openstack-k8s-operators/openstack-operator
override-checkout: main
- name: github.com/openstack-k8s-operators/openstack-must-gather
override-checkout: main
pre-run:
- ci/pre-2node.yml
vars:
cifmw_deploy_edpm: false
podified_validation: true
cifmw_run_tests: false
extra-vars:
crc_ci_bootstrap_networking:
networks:
default:
range: 192.168.122.0/24
mtu: 1500
internal-api:
vlan: 20
range: 172.17.0.0/24
storage:
vlan: 21
range: 172.18.0.0/24
tenant:
vlan: 22
range: 172.19.0.0/24
instances:
controller:
networks:
default:
ip: 192.168.122.11
crc:
networks:
default:
ip: 192.168.122.10
internal-api:
ip: 172.17.0.5
storage:
ip: 172.18.0.5
tenant:
ip: 172.19.0.5

- job:
name: stf-base
# defined in: https://review.rdoproject.org/cgit/config/tree/zuul.d/_jobs-crc.yaml
parent: base-simple-crc
parent: stf-base-2node
abstract: true
description: |
Run the stf-run-ci role, and then test stf
Expand All @@ -24,12 +99,8 @@
- ci/test_stf.yml
post-run:
- ci/post-collect_logs.yml
nodeset: centos-9-crc-xxl
# The default (~30 minutes) is not enough to run through all the job stages
timeout: 3600
vars:
# Pass vars to crc cli https://review.rdoproject.org/cgit/config/tree/playbooks/crc/simple-start.yaml#n30
crc_parameters: '--memory 16000 --disk-size 80 --cpus 6' # Increase from 14336

- job:
name: stf-crc-nightly_bundles
Expand Down Expand Up @@ -63,48 +134,63 @@
parent: stf-crc-nightly_bundles
description: |
Deploy STF using the nightly bundles on OCP 4.12
vars:
crc_ocp_bundle: 'https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.12.13/crc_libvirt_4.12.13_amd64.crcbundle'
nodeset: stf-crc_extracted-ocp412

- job:
name: stf-crc-ocp_413-nightly_bundles
parent: stf-crc-nightly_bundles
description: |
Deploy STF using the nightly bundles on OCP 4.13
vars:
crc_ocp_bundle: 'https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.13.14/crc_libvirt_4.13.14_amd64.crcbundle'
nodeset: stf-crc_extracted-ocp413

- job:
name: stf-crc-ocp_414-nightly_bundles
parent: stf-crc-nightly_bundles
description: |
Deploy STF using the nightly bundles on OCP 4.14
nodeset: stf-crc_extracted-ocp414

- job:
name: stf-crc-ocp_412-local_build
parent: stf-crc-local_build
description: |
Build images locally and deploy STF on OCP 4.12
vars:
crc_ocp_bundle: 'https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.12.13/crc_libvirt_4.12.13_amd64.crcbundle'
nodeset: stf-crc_extracted-ocp412

- job:
name: stf-crc-ocp_413-local_build
parent: stf-crc-local_build
description: |
Build images locally and deploy STF on OCP 4.13
vars:
crc_ocp_bundle: 'https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.13.14/crc_libvirt_4.13.14_amd64.crcbundle'
nodeset: stf-crc_extracted-ocp413

- job:
name: stf-crc-ocp_414-local_build
parent: stf-crc-local_build
description: |
Build images locally and deploy STF on OCP 4.14
nodeset: stf-crc_extracted-ocp414

- job:
name: stf-crc-ocp_412-local_build-index_deploy
parent: stf-crc-local_build-index_deploy
description: |
Build STF locally and deploy from index on OCP 4.12
vars:
crc_ocp_bundle: 'https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.12.13/crc_libvirt_4.12.13_amd64.crcbundle'
nodeset: stf-crc_extracted-ocp412

- job:
name: stf-crc-ocp_413-local_build-index_deploy
parent: stf-crc-local_build-index_deploy
description: |
Build STF locally and deploy from index on OCP 4.13
vars:
crc_ocp_bundle: 'https://mirror.openshift.com/pub/openshift-v4/clients/crc/bundles/openshift/4.13.14/crc_libvirt_4.13.14_amd64.crcbundle'
nodeset: stf-crc_extracted-ocp413

- job:
name: stf-crc-ocp_414-local_build-index_deploy
parent: stf-crc-local_build-index_deploy
description: |
Build STF locally and deploy from index on OCP 4.14
nodeset: stf-crc_extracted-ocp414

- project-template:
name: stf-crc-jobs
Expand All @@ -114,12 +200,16 @@
jobs:
- stf-crc-ocp_412-nightly_bundles:
voting: false
- stf-crc-ocp_412-local_build
- stf-crc-ocp_412-local_build-index_deploy
- stf-crc-ocp_413-nightly_bundles:
voting: false
- stf-crc-ocp_414-nightly_bundles:
voting: false
- stf-crc-ocp_412-local_build
- stf-crc-ocp_413-local_build
- stf-crc-ocp_414-local_build
- stf-crc-ocp_412-local_build-index_deploy
- stf-crc-ocp_413-local_build-index_deploy
- stf-crc-ocp_414-local_build-index_deploy

- project:
name: infrawatch/service-telemetry-operator
Expand Down
2 changes: 0 additions & 2 deletions build/stf-run-ci/tasks/create_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

- name: Kill first build since it will always fail (triggered on BuildConfig creation)
ansible.builtin.shell: sleep 10 ; oc delete build {{ artifact.name }}-1 -n "{{ namespace }}"
ignore_errors: true
retries: 3
delay: 10
register: kill_build
Expand All @@ -34,7 +33,6 @@
ansible.builtin.command: oc start-build {{ artifact.name }} -n "{{ namespace }}" --follow --wait --from-dir "{{ artifact.working_build_dir }}"
register: build_results
when: build_lookup.resources | length == 0
ignore_errors: true
retries: 3
delay: 10
until: build_results.rc == 0
Expand Down
2 changes: 2 additions & 0 deletions build/stf-run-ci/tasks/pre-clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@
- openshift-cert-manager-operator
- cert-manager-operator
- cert-manager
retries: 3
delay: 10

- name: Remove Elasticsearch
ignore_errors: true
Expand Down
13 changes: 13 additions & 0 deletions ci/common-tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: "Set the sto_dir if it isn't already set"
ansible.builtin.set_fact:
sto_dir: '{{ ansible_env.HOME }}/{{ zuul.projects["github.com/infrawatch/service-telemetry-operator"].src_dir }}'
when: sto_dir | default('') | length == 0

- name: "Get vars common to all jobs"
ansible.builtin.include_vars:
file: "vars-zuul-common.yml"

- name: "Get scenario-specific vars"
ansible.builtin.include_vars:
file: "vars-{{ scenario }}.yml"
14 changes: 2 additions & 12 deletions ci/deploy_stf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@
- name: "Deploy STF"
hosts: controller
tasks:
- name: "Set the sto_dir if it isn't already set"
ansible.builtin.set_fact:
sto_dir: '{{ ansible_env.HOME }}/{{ zuul.projects["github.com/infrawatch/service-telemetry-operator"].src_dir }}'
when: sto_dir | default('') | length == 0

- name: "Get vars common to all jobs"
ansible.builtin.include_vars:
file: "vars-zuul-common.yml"

- name: "Get scenario-specific vars"
ansible.builtin.include_vars:
file: "vars-{{ scenario }}.yml"
- name: "Setup play vars"
ansible.builtin.include_tasks: "common-tasks.yml"

- name: "Log into the cluster"
ansible.builtin.import_role:
Expand Down
14 changes: 2 additions & 12 deletions ci/post-collect_logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,8 @@
name: Collect logs on the controller
gather_facts: false
tasks:
- name: "Set the sto_dir if it isn't already set"
ansible.builtin.set_fact:
sto_dir: '{{ ansible_env.HOME }}/{{ zuul.projects["github.com/infrawatch/service-telemetry-operator"].src_dir }}'
when: sto_dir | default('') | length == 0

- name: "Get vars common to all jobs"
ansible.builtin.include_vars:
file: "vars-zuul-common.yml"

- name: "Get scenario-specific vars"
ansible.builtin.include_vars:
file: "vars-{{ scenario }}.yml"
- name: "Setup play vars"
ansible.builtin.include_tasks: "common-tasks.yml"

- name: "Create log dir"
ansible.builtin.file:
Expand Down
33 changes: 33 additions & 0 deletions ci/pre-2node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
- name: "Do pre-work to get kubeconfig"
hosts: controller
vars:
ci_framework_dir: "{{ ansible_user_dir }}/{{ zuul.projects['github.com/openstack-k8s-operators/ci-framework'].src_dir }}"
environment:
PATH: "~/.crc/bin:~/.crc/bin/oc:~/bin:{{ ansible_env.PATH }}"
tasks:
- name: "Set the sto_dir if it isn't already set"
ansible.builtin.set_fact:
sto_dir: '{{ ansible_env.HOME }}/{{ zuul.projects["github.com/infrawatch/service-telemetry-operator"].src_dir }}'
when: sto_dir | default('') | length == 0

- name: "Run bootstrap playbook"
ansible.builtin.shell:
cmd: |
ansible-playbook -e@{{ ansible_user_dir }}/ci-framework-data/artifacts/parameters/zuul-params.yml {{ ci_framework_dir }}/playbooks/01-bootstrap.yml
chdir: "{{ ci_framework_dir }}"

- name: Run ci_framework infra playbook
ansible.builtin.shell:
cmd: |
ansible-playbook -e cifmw_use_opn=false -e cifmw_use_devscripts=false -e cifmw_basedir={{ ansible_user_dir }}/ci-framework-data/ -e cifmw_openshift_setup_skip_internal_registry_tls_verify=true playbooks/02-infra.yml
chdir: "{{ ci_framework_dir }}"

- name: Run make targets for setup
community.general.make:
chdir: '{{ ansible_env.HOME }}/{{ zuul.projects["github.com/openstack-k8s-operators/ci-framework"].src_dir }}'
target: "{{ item }}"
with_items:
- setup_tests
- setup_molecule

16 changes: 3 additions & 13 deletions ci/prepare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@
- name: "Prepare the environment for running stf"
hosts: controller
tasks:
- name: "Set the sto_dir if it isn't already set"
ansible.builtin.set_fact:
sto_dir: '{{ ansible_env.HOME }}/{{ zuul.projects["github.com/infrawatch/service-telemetry-operator"].src_dir }}'
when: sto_dir | default('') | length == 0

- name: "Get vars common to all jobs"
ansible.builtin.include_vars:
file: "vars-zuul-common.yml"

- name: "Get scenario-specific vars"
ansible.builtin.include_vars:
file: "vars-{{ scenario }}.yml"
- name: "Setup play vars"
ansible.builtin.include_tasks: "common-tasks.yml"

- name: "Update pip"
ansible.builtin.pip:
Expand All @@ -33,7 +23,7 @@
name: "{{ item }}"
with_items:
- "kubernetes.core:2.3.2"
- "community.general:6.2.0"
- "community.general"

- name: "Log into the cluster"
ansible.builtin.import_role:
Expand Down
14 changes: 2 additions & 12 deletions ci/test_stf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,8 @@
- name: "Run tests to verify that STF runs as expected"
hosts: controller
tasks:
- name: "Set the sto_dir if it isn't already set"
ansible.builtin.set_fact:
sto_dir: '{{ ansible_env.HOME }}/{{ zuul.projects["github.com/infrawatch/service-telemetry-operator"].src_dir }}'
when: sto_dir | default('') | length == 0

- name: "Get vars common to all jobs"
ansible.builtin.include_vars:
file: "vars-zuul-common.yml"

- name: "Get scenario-specific vars"
ansible.builtin.include_vars:
file: "vars-{{ scenario }}.yml"
- name: "Setup play vars"
ansible.builtin.include_tasks: "common-tasks.yml"

- name: "Log into the cluster"
ansible.builtin.import_role:
Expand Down

0 comments on commit 931efaf

Please sign in to comment.