owned this note
owned this note
Published
Linked with GitHub
# TripleO CI Zuul Job Reparenting
## Existing parenting Story
* CentOS-8 base jobs are created by duplicating the centos-7 base jobs
* https://opendev.org/openstack/tripleo-ci/src/branch/master/zuul.d/base.yaml#L198
* https://opendev.org/openstack/tripleo-ci/src/branch/master/zuul.d/base.yaml#L227
* By using centos-8 jobs as a parent, we created centos-9 jobs.
* Everything was good, till we were running c8 and c9 jobs on master
* While adding support for running cs9 jobs on wallaby,
* We changed the branches job attribute for cs8 jobs to run only on stable/branches only
* triggered cs9 jobs on stable/wallaby, jobs were not running on stable/wallaby branch
* for fixing it, we added the branch name at pipeline level
* https://opendev.org/openstack/tripleo-ci/commit/bda6e1a61a846890c9cc39d0bc91952e9c6deb8f
* But things were looking messy.
* We also started seeing zuul job freeze graph issues, due to irrelevant files and files matching
* In Downstream, we fork the upstream projects and have different branches and project namespaces
* We override the required jobs with respective branches
* We are duplicating the job definitions in RDO and Downstream
* if we change a var in upstream, then we need 2 patches for downstream and RDO
* https://opendev.org/openstack/tripleo-ci/src/commit/04ce9923d0bfdc800b159a73f380e5843c6c7af3/zuul.d/standalone-jobs.yaml#L829
* https://github.com/rdo-infra/rdo-jobs/blob/master/zuul.d/standalone-jobs.yaml#L398
* In RDO and Downstream, tripleo-ci base jobs are used as a parent in config repo (trusted repo) so hard to test the base job chnages
* We also keep distro specific workarounds either in Release file or with in the code base
* Which are kind of hard to find and track down.
* When a release gets EOL, then it is very hard to remove the jobs definition easily
## Rethinking reparenting
We needed a clear Zuul job inheritance order
- with project names based on upstream, rdo and downstream
- with proper distribution version specification
- Less duplication of zuul jobs vars
With keeping in mind, we come up with following Inheritnace.
- First base with common required projects: https://opendev.org/openstack/tripleo-ci/src/branch/master/zuul.d/base-upstream.yaml
- tripleo-ci-base-standard
- From here, different deployment based base gets created
- for examples:
- tripleo-ci-base-singlenode
- It can be used for undercloud
- tripleo-ci-base-containers-standard https://opendev.org/openstack/tripleo-ci/src/branch/master/zuul.d/base-upstream.yaml#L244
- tripleo-ci-base-images-standard
- For each level, (for example standalone)
- we have required project job
- Upstream: https://opendev.org/openstack/tripleo-ci/src/branch/master/zuul.d/standalone-jobs.yaml#L7
- RDO: https://github.com/rdo-infra/rdo-jobs/blob/master/zuul.d/standalone-jobs.yaml#L12
- Then we have distro version specific jobs
- https://opendev.org/openstack/tripleo-ci/src/branch/master/zuul.d/standalone-jobs.yaml#L18
- https://github.com/rdo-infra/review.rdoproject.org-config/commit/dc1c566b859d78b0b54b72db78e601574856dea3
- Then modify the existing the openstack release based jobs based on distros
- https://opendev.org/openstack/tripleo-ci/src/branch/master/zuul.d/standalone-jobs.yaml#L84
- https://github.com/rdo-infra/rdo-jobs/blob/master/zuul.d/standalone-jobs.yaml#L418
## Current Status:
With CentOS-8 wallaby teardown in progress, we have finished,
- container-multinode, standalone, build-containers, build-images at all levels
Doc review in progress: https://f3e11e61cbb35cb84889-397caf381a73cd99b004eb00bbac7fbc.ssl.cf1.rackcdn.com/835782/8/check/openstack-tox-docs/1f92a42/docs/ci/tripleo_ci_job_parenting.html
Patches in flight for review: https://review.opendev.org/q/hashtag:cs-parenting+(status:open%20OR%20status:merged
## Thank You!
======= Below design brainstorming=======
## Required projects
- tripleo-ci-base-required-projects
- https://review.opendev.org/c/openstack/tripleo-ci/+/830836
## Tripleo CI Base jobs
- tripleo-ci-base jobs
- https://review.opendev.org/c/openstack/tripleo-ci/+/831201
## Tripleo CI Standalone jobs
- standalone jobs
- https://review.opendev.org/c/openstack/tripleo-ci/+/821849
- https://review.opendev.org/c/openstack/tripleo-ci/+/830987
- https://review.rdoproject.org/r/q/topic:cs-parenting-standalone
## Tripleo CI Multinode jobs
- tripleo-ci-base-multinode-standard
- https://review.opendev.org/c/openstack/tripleo-ci/+/831151
- https://review.opendev.org/q/topic:cs-parenting-multinode
## Tripelo CI Parenting Structure
## Common parent
* tripleo-ci-base-common-required-projects
* tripleo-ci-base
In Case of Multinode
## Common parent for Multinode
* tripleo-ci-base
* tripleo-ci-base-multinode-standard
### parent for Upstream Multinode
* tripleo-ci-base-multinode-standard
* **tripleo-ci-base-required-projects-upstream-multinode **
* tripleo-ci-base-multinodee-centos-8
### parent for RDO multinode
* tripleo-ci-base-multinode-standard
* tripleo-ci-base-required-projects-rdo-multinode (holds secrets, dlrn reporting will stay in config)
- May be dlrn reporting or other part in seperate job
* tripleo-ci-base-multinode-rdo-centos-9 (jobs repos)
### parent for Downstream Multinode
* tripleo-ci-base-multinode-standard
* tripleo-ci-base-required-projects-downstream-multinode (holds secrets, dlrn reporting will stay in config)
* tripleo-ci-base-multinode-rhel-9
## Common parent for standalone
tripleo-ci-base
tripleo-ci-base-standalone-standard
### Standalone Upstream Parent
tripleo-ci-base-standalone-standard
tripleo-ci-base-required-projects-upstream-standalone
tripleo-ci-base-standalone-centos-8
### Standalone Downstream Parent
tripleo-ci-base-standalone-standard
tripleo-ci-base-required-projects-downstream-standalone
tripleo-ci-base-standalone-rhel-9
In Case of OVB
## Common parent for OVB
tripleo-ci-base
tripleo-ci-base-ovb-standard
## parent for ovb upstream
tripleo-ci-base-ovb-standard
tripleo-ci-base-ovb-required-projects-upstream
tripleo-ci-base-ovb-centos-8
## parent for ovb Downstream
tripleo-ci-base-ovb-standard
tripleo-ci-base-ovb-required-projects-downstream
tripleo-ci-base-ovb-rhel-9
## Parent for ovb RDO
tripleo-ci-base-ovb-standard
tripleo-ci-base-ovb-required-projects-rdo (It will take the place of tripleo-ci-base-ovb-notebroker-centos-8)
tripleo-ci-base-ovb-periodic-centos-8