24 Commits

Author SHA1 Message Date
Jan Gutter
b723bc761b
Publish zuul-operator to quay.io
* non-ci tested scripts need updating - these are intended for
  local development workflows.
* This now publishes the operator to quay.io/zuul-ci
* This is mostly a rework of
  https://review.opendev.org/c/zuul/zuul-operator/+/881245 and
  https://review.opendev.org/c/zuul/zuul-operator/+/924870
  with much appreciation and credits to original authors

Change-Id: I0ffd39fceeaf4947ed329dd4ddb7283cdc98df86
2024-08-18 12:32:57 +01:00
Jan Gutter
c74b147fe7
CI Fixes and dependency updates
These are mostly CI fixes:

* Use podman+cri-o based minikube:
  * This is still considered experimental, but seems to be
    more supported than the 'none' driver.
* Fix an issue where ssh to the emulated static node fails:
  * PAM needed to be disabled for openssh
  * openssh needs more permissions to run - cri-o based minikube
    is more strict
* Rebase test container to Fedora 40
* Update the ingress definition to current API version
* Update zookeeper from 3.5.5 to 3.8.4:
  * required for nodepool 9.0.0+
* Update the percona operator from 1.11 to 1.14:
  * required for kubernetes 1.24+
* Update test node to Ubuntu Jammy from Ubuntu Bionic
* Update minikube to 1.33.1
* Added some more explicit logging to the k8s state, this
  could be split off into a role in future.

Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/924970

Change-Id: I7bf27750073fa807069af6f85f2689173b278abe
2024-08-15 10:25:39 +01:00
Michael Kelly
c6b7308c68
Convert linters from tox to nox
This expands the noxfile to include the linters session and switches
the tox-linters job with the nox-linters job.

Change-Id: If5ff34aded40c66667eaa468baea10fb2658e2b3
2023-02-24 21:00:46 -08:00
Michael Kelly
b653e6e20a
Convert docs from tox to nox
Using https://review.opendev.org/c/zuul/zuul/+/867057/13 and
https://review.opendev.org/c/zuul/zuul/+/868229/1 as rough templates,
introduced a noxfile and switched over the docs jobs to use nox
instead of tox.

Change-Id: I25e653189f37d28d4947ac90a6f5293939377192
2023-02-24 20:50:29 -08:00
Clark Boylan
5873797641 Update the docker images to python 3.10
Do this to take advantage of python 3.10's speed improvements as
illustrated by Zuul proper. But als OpenDev is looking at dropping
python 3.8 image builds to make room for python 3.11.

Change-Id: I0bb4902d32003ab8e8fb35e6cc39e62ceed88aa8
2022-10-14 14:48:00 -07:00
James E. Blair
5bf96c1e30 Fix functional test job
* Pin minikube to 1.22.0

Version 1.23.0 is failing with
  error: unable to recognize "deploy/crds/zuul-ci_v1alpha2_zuul_crd.yaml":
    no matches for kind "CustomResourceDefinition" in version "apiextensions.k8s.io/v1beta1"

Until we learn more, pin to the previously working k8s version.

* Add debug log-level to the podman login test command

This change should improve the test failure debugging where it
currently may just prints "Shutting down, got signal: Terminated".

* Remove "https://" from registry login

f8136e70f9
Added path-based authentication to "podman login" which they argue
is incompatible with including https:// in the registry identifier.
Doing so now produces an error.

Co-Authored-By: Tristan Cacqueray <tdecacqu@redhat.com>
Change-Id: Ic44b56a2eb6ac15cc5f4af5312fa4e3956d6e457
2021-09-09 07:29:00 -07:00
James E. Blair
9f2f4ec145 Flake8 cleanups
Tox can now run the linters test.

The linters gate job is added.

Change-Id: If39545c928991baa47c919ab6b357bf47ca9ca90
2021-07-23 10:27:10 -07:00
James E. Blair
a32c31bc3c Add docs
Change-Id: I2975607a51860df88863454785ae5d189f6f2831
2021-07-23 10:27:04 -07:00
James E. Blair
eff9f360f7 Use kopf operator framework
This switches from the ansible/dhall operator framework to kopf,
an operator framework written in pure Python.  This allows us to:

* Build the operator application as a Python app.
* Build the operator image using the opendev python builder images.
* Run the operator as a Python CLI program "zuul-operator".
* Write procedural Python code to handle operator tasks (such as
  creating new nodepool launchers when providers are added).
* Use Jinja for templating config files and k8s resource files
  (direct pythonic manipulation of resources is an option too).

The new CR nearly matches the existing one, with some minor differences.

Some missing features and documentation are added in the commits
immediately following; they should be reviewed and merged as a unit.

Also, fx waiting for scheduler to settle in functional test since
we changed this log line in Zuul.

Change-Id: Ib37b67e3444b7cd44692d48eee77775ee9049e9f

Change-Id: I70ec31ecd8fe264118215944022b2e7b513dced9
2021-07-20 13:16:07 -07:00
James E. Blair
0366b867bf Upload release images on tag
This uploads release images to dockerhub when we tag the repo.

Change-Id: Ic44a9d29a1e888d8d7874205b0025f286912b5e8
2021-04-10 18:37:28 -07:00
Tristan Cacqueray
3454835c63 Add zuul-operator-upload-image job
It seems like the zuul-operator-promote-image job does not
upload the image. This change adds a new gate job to upload
the image and fix the promote job.

Depends-On: https://review.opendev.org/727868
Change-Id: Ic3b41e3b29182135f71dc1adf8c6ebd9c26d798d
2020-12-04 16:38:32 +00:00
Tristan Cacqueray
20f634230d Add initial withCertManager input toggle
This change adds a new input toggle to enable using a cert-manager service.
The operator currently only setup a selfSigned CA.

Change-Id: Ifc63768a87f9508c66e4414d5286bae2969985e7
2020-04-15 00:04:21 +00:00
Tristan Cacqueray
c6d35be4d6 Add zuul-registry deployment
This change adds an optional registry configuration to the spec:

  registry:
    image: docker.io/zuul/zuul-registry:latest
    count: 0
    storage-size: 20
    public-url: https://registry:9000

The operator expect a {{ cr_name }}-registry-tls secret to be provided
for tls and user configuration. If the secret is missing, the operator
creates self signed certificates and generates the user password.

Depends-On: https://review.opendev.org/710644
Change-Id: I0c054485b0ad01d53ddcff93f7bcbf34d1810325
2020-04-14 11:22:20 +00:00
Tristan Cacqueray
119090208b Increase scheduler wait timeout and improve logs collection
In some case, the test node needs more time to pull the
zuul image. This change increases the wait time to 8 minutes
to prevent false positive failure.

Thsi change also:
* adds a build artifact with the generated kubernetes resources.
* redirects post commands output to logfiles to unclutter the
  job-output console.
* replaces kubectl wait by rollout status.
* wait for operator and nodepool-launcher deployment.

Change-Id: I1c499bd11576f92b98511cd1ff180026b8aa70d8
2020-04-13 21:21:00 +00:00
Zuul
f3e9e7cccf Merge "Add integration test playbook" 2020-03-31 17:52:01 +00:00
Tristan Cacqueray
a6cda880b9 Add integration test playbook
This change adds a new run playbook to perform some integration
tests:
- add a config project with a periodic pipeline
- ensure the executor run a job
- ensure the job results are published in the db
- ensure the console-stream is working

Change-Id: I85187c741b376eaafdef1066452f13e2853caed7
2020-03-31 12:20:43 +00:00
James E. Blair
4bac284763 Use explicit provides/requires for container jobs
Rather than rely on the implicit docker-image provides/requires
list explicit per-image requirements for related jobs to reduce,
unecessarily serialization in change queues.

Change-Id: If31a57ff9c7e242bad4050d88df3c33e0eb2f27f
2020-03-13 10:51:12 -07:00
Tristan Cacqueray
717a43dfaf Add zuul-operator-promote-image job
This change enables the image to be published on the docker hub.

Change-Id: I10e52e580083531dd091bbb804b1af5d8610560a
2020-02-18 09:56:08 -08:00
Tristan Cacqueray
2937272624 Replace existing operator tasks with the new dhall function
This change replaces the existing tasks with a dhall function to
generates all the kubernetes objects. The operator nows converts
the CR spec to a dhall `Input`, then it applies the function
output to the cluster. Follow-up changes demonstrate how
runtime operations can be performed around that function.

This change updates the zuul-ci_v1alpha1_zuul_cr.yaml file with
the actual CR defined in the zuul specification so that it can
be used in the functional tests.

Depends-On: https://review.opendev.org/702753
Change-Id: Iea51bccf90def6e827d2c5846ad6a7e4c86a5bc1
2020-02-04 00:51:30 +00:00
Tristan Cacqueray
70693e51ea Update sdk to v0.13.0 and install dhall-to-json
This change adds a couple of new tools in the operator image.
This change also disables the CI job and the follow-up changes
will re-active it step by step.

Change-Id: I106b34a5e11aec5e88ca2f491c69c82527551952
2020-01-30 17:29:09 +00:00
Jeff Liu
b6a9870e57 Create zookeeper operator
Change-Id: I99d54739b289c80f169f26e0b99d2d0362d37dd2
2019-09-18 02:08:53 +00:00
Jeff Liu
5637d13f1f use opendev image building system for zuul-operator test
Depends-On: https://review.opendev.org/#/c/673351/

Change-Id: I12bde1fbe892273c458f11e568402d1b53073a41
2019-07-31 10:56:55 -04:00
Jeff Liu
aafaeab660 Add Kubernetes Operator Functional Test Job
A job that will run playbooks which start kubernetes, and verify that the
zuul-operator builds properly. This will be added to check and gate and
is the first step to https://review.opendev.org/#/c/659180/

Change-Id: Idf677621cf178b3af9975bbd22fbfe0d30df7ee5
2019-07-12 10:37:42 -04:00
James E. Blair
33b70c9905 Add .gitreview and .zuul.yaml
Change-Id: Ib7d973bf8ebdbd62c5d1a0da5a64842cead18871
2019-06-27 07:41:10 -07:00