Add zuul CI spec
Change-Id: Iacbe7e87410a9f5bdb674be03735d2a869e1ef10
This commit is contained in:
parent
de94cbb648
commit
af18b70ecc
|
@ -12,9 +12,18 @@ Spec Templates
|
|||
|
||||
specs/templates/*
|
||||
|
||||
Rocky Specifications
|
||||
Ussuri Specifications
|
||||
---------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 1
|
||||
|
||||
specs/ussuri/*
|
||||
|
||||
Rocky Specifications
|
||||
--------------------
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:maxdepth: 1
|
||||
|
|
|
@ -0,0 +1,122 @@
|
|||
Zuul CI workflow for OpenStack-Ansible
|
||||
######################################
|
||||
:date: 2020-07-01 20:00
|
||||
:tags: openstack, zuul, ci
|
||||
|
||||
|
||||
Zuul CI provides openstack-ansible with CI/CD functionality.
|
||||
We have pretty difficult workflow and logic of zuul configuration
|
||||
that worth writing a separate spec list.
|
||||
|
||||
We have several scenarios for our jobs at the moment:
|
||||
|
||||
* Deploy
|
||||
* lxc
|
||||
* source
|
||||
* metal
|
||||
* source
|
||||
* distro
|
||||
* Upgrade
|
||||
* metal
|
||||
* source
|
||||
|
||||
|
||||
Problem description
|
||||
===================
|
||||
|
||||
Deploy
|
||||
------
|
||||
|
||||
How things work at the moment for deploy scenarios:
|
||||
|
||||
#. Zuul clone repos out of required-projects list, provided for the template
|
||||
#. During bootstrap-host we symlink cloned by zuul roles into /etc/ansible/roles
|
||||
That way we get all dependencies provided by depends-on statement in commit
|
||||
#. As a result we just use zuul provided jobs in our CI
|
||||
|
||||
|
||||
The problem here, is that openstack-ansible has it's own bumps for both ansible
|
||||
roles and system services, which we don't use that way. So we don't test any
|
||||
releases (tags) in CI, as zuul clones only top of the branches. From the other
|
||||
side we don't get stuck in circular dependencies, since things apply once they
|
||||
merge, so we're not required to bump SHAs after fixing something or don't end
|
||||
up with broken gates with the next automatical bump.
|
||||
Additional broblem is that we also depend on branchless projects, which means
|
||||
that zuul will get us always master, which may be not suitable for stable
|
||||
branches (ie. we want to use some specific SHA or tag).
|
||||
|
||||
Upgrade
|
||||
-------
|
||||
|
||||
How things work at the moment for upgrade scenarios:
|
||||
|
||||
#. Zuul clone repos out of required-projects list, provided for the job
|
||||
#. On pre step, we write down openstack-ansibles SHA and checkout to previous
|
||||
branch.
|
||||
#. During bootstrap-host we symlink cloned by zuul roles into /etc/ansible/roles
|
||||
#. We run bootstrap-ansible which replaces cloned by zuul roles with ones
|
||||
from stable branch bumps.
|
||||
#. We deploy AIO for the first time. We don't run tempest to save up some time.
|
||||
#. Once first deployment is finished, we checkout back to saved SHA, and
|
||||
run AIO again
|
||||
#. We run run-upgrade.sh script which also includes bootstrap-ansible.
|
||||
At this point we get bumped roles for our current SHA.
|
||||
#. Tempest is run at the end of the run-upgrade.sh
|
||||
|
||||
The problem here is that we drop zuul provided roles during deployment
|
||||
of stable branch. So depends-on do not work for upgrade jobs. Additionaly
|
||||
there's a problem in logic complexity and bad readability of the code.
|
||||
|
||||
|
||||
Proposed change
|
||||
===============
|
||||
|
||||
The proposed changes would include:
|
||||
|
||||
Deploy
|
||||
------
|
||||
|
||||
We can make use of zuul.items, which contains the list of projects,
|
||||
that we should depends-on. That way we can symlink only these
|
||||
projects, and use our bumps for others. However, that will make
|
||||
us to use depends-on in case smth is breaking in the middle until
|
||||
the next bump, which may be not so convenient
|
||||
|
||||
|
||||
Upgrade
|
||||
-------
|
||||
|
||||
* Do not symlink cloned by zuul repos during first iteration
|
||||
* Synlink zuul roles to ANSIBLE_ROLES_PATH for the upgrade iteration
|
||||
* Pass variable for bootstrap-ansible, so that it don't clone roles once
|
||||
we have them symlinked.
|
||||
|
||||
To cover that there's a patch https://review.opendev.org/710849/
|
||||
|
||||
|
||||
Alternatives
|
||||
------------
|
||||
|
||||
Alternative solution te resolve deploy issue is to replace link for
|
||||
branchless projects from opendev to github. That way, they won't get
|
||||
symlinked but would be cloned and checkout to the correct SHA.
|
||||
However, that way we won't be able to set depends-on for such repos.
|
||||
|
||||
|
||||
|
||||
Implementation
|
||||
==============
|
||||
|
||||
Assignee(s)
|
||||
-----------
|
||||
|
||||
Primary assignee:
|
||||
Dmitriy Rabotyagov (IRC: noonedeadpunk)
|
||||
|
||||
|
||||
References
|
||||
==========
|
||||
|
||||
Zuul variables Overview
|
||||
|
||||
* https://zuul-ci.org/docs/zuul/reference/jobs.html#var-zuul.items
|
Loading…
Reference in New Issue