316 Commits

Author SHA1 Message Date
Radosław Piliszek
b4b206de42 [CI] Drop support for publishing versioned image tags
Follow-up on I3259c0736a296751129aa349e8d378c0123957e6

Change-Id: I6b8935b16390a301602218ce35edfe132b140a4c
2021-09-08 14:54:13 +00:00
Zuul
ea6ceef686 Merge "drop leftovers of RHEL support" 2021-08-04 13:53:41 +00:00
Marcin Juszkiewicz
796a8ec291 test-requirements: remove not needed entries
Locally all tox tests passed without those requirements.

Also removed keystoneclient test. We are building images not clients.

Change-Id: I89578f0d7710cb38db12bf862584f13b49af20ef
2021-07-29 11:53:37 +02:00
Marcin Juszkiewicz
bd90b02708 drop leftovers of RHEL support
As a project we never built RHEL based images so support for them
was not tested.

Change-Id: I27dfe34ade088228d71f6857ec4f3ab28ee63915
2021-07-28 16:04:21 +00:00
Michał Nasiadka
acc8cb9903 CI: Fix epel url override
epel-release now installs epel*.repos with following baseurl:
baseurl=https://download.example/pub/epel/$releasever/Everything/$basearch

Change-Id: I19f57d258021ff660df6b6b95e8205b69f3bea85
2021-07-01 11:10:01 +02:00
Radosław Piliszek
fb8217c16a [CI] Do not set ansible_python_interpreter for Zuul
Zuul 4.6.0 does not allow to set ansible_python_interpreter. [1]
Instead, with the current Zuul and Ansible, this should be
automatically set to the proper python.

This patch is required to restore the jobs which are ignored
otherwise. [2] [3]

Additionally, this change avoids the use of Ansible's pip
module because it tries to use setuptools from the
ansible_python_interpreter first even if another executable is
set.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023291.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023326.html
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-June/023321.html

Change-Id: Ib74eecd46617af51e23a3ccad664767b1bf6e04f
2021-06-28 09:18:51 +00:00
Radosław Piliszek
c6fa5d98de Revert "[CI] Add grafana to allowed-to-fail"
This reverts commit a6884085e1a5336f17c2ed64f67d8f885c454207.

Reason for revert: Repo is fine again.

Change-Id: I60a76f42708f1746bd2c582ce25867ac34c9e865
2021-06-10 16:19:45 +00:00
Radosław Piliszek
a6884085e1 [CI] Add grafana to allowed-to-fail
The grafana repo is broken for Debuntu.

Change-Id: I7f79aeab53540df9bf84add6df3add300c9e9fa4
2021-06-10 10:07:57 +00:00
Marcin Juszkiewicz
1e7d1f3bd3 Revert "CI: add monasca-grafana to allowed-to-fail images"
This reverts commit 931d401887252d8830ebfb4d0b5d352f77094e9a.

Reason for revert: monasca-grafana is no more

Change-Id: I483db6d6eddd84b376251b38509e74d4a5c2a10b
Depends-on: https://review.opendev.org/c/openstack/kolla/+/784902
2021-05-20 15:55:17 +00:00
Zuul
b73d4d11ea Merge "CI: drop bashism from template overrides" 2021-05-08 16:08:00 +00:00
Radosław Piliszek
c364c8be85 [CI] Trust only infra mirrors
Infra mirrors get their indices rebuilt to avoid broken
indices (due to partial update).
Unfortunately, this wipes out the cryptographic signatures.
Our approach so far was disabling apt security features globally.
However, this is not a valid choice for external repos.
It hid an issue we introduced with new RabbitMQ repos missing
proper keys installed in the image.
This caused permanent failures outside of our CI.

Our process should be as close as possible to users' experience.
This patch makes CI trust only the mirrors that have their indices
rebuilt (so infra mirrors).

Change-Id: Ic5abc4b87fd76f87aba383abf43e95ba70629fcb
2021-05-04 19:31:15 +00:00
Marcin Juszkiewicz
f0c3567740 CI: drop bashism from template overrides
[[ is bash only

In many distributions /bin/sh == bash but not in Debian and derived
where it is dash (very simple POSIX shell).

Change-Id: I2b084ea78b236623b174473f411bae04e624a3e9
2021-05-04 11:30:28 +02:00
Marcin Juszkiewicz
e0f8cbc50c move to Debian 'bullseye'
Bullseye is now in hard freeze cycle and goes for release.

https://release.debian.org/bullseye/freeze_policy.html

Co-Authored-By: Michal Nasiadka <mnasiadka@gmail.com>

Change-Id: I543965a2741cebfa759576a4c75669a7bacd4208
2021-04-26 20:01:28 +02:00
Zuul
d50832066d Merge "[CI] Publish images to quay.io on a daily basis" 2021-04-08 13:59:51 +00:00
Radosław Piliszek
10d8f03c4e [CI] Publish images to quay.io on a daily basis
Based on the discussions from the past 3 Kolla meetings [1][2][3],
we established that, to avoid the DockerHub pull limit issues
in our CI, we will try using quay.io.

We still publish weekly to the DockerHub.

[1] http://eavesdrop.openstack.org/meetings/kolla/2021/kolla.2021-03-17-15.00.log.html#l-102
[2] http://eavesdrop.openstack.org/meetings/kolla/2021/kolla.2021-03-24-15.00.log.html#l-137
[3] http://eavesdrop.openstack.org/meetings/kolla/2021/kolla.2021-03-31-15.01.log.html#l-50

Change-Id: I7c1f0c5fc643678b29f963b6769d8f900a03b726
Depends-On: Id113a53c083d105ac9200474ff20faacef6decaf
2021-04-06 11:00:53 +00:00
Mark Goddard
931d401887 CI: add monasca-grafana to allowed-to-fail images
The monasca-grafana image is currently failing to build.

INFO:kolla.common.utils.monasca-grafana:go install -v ./pkg/cmd/grafana-server
INFO:kolla.common.utils.monasca-grafana:[91mgo: cannot find main module, but found vendor/vendor.json in /grafana/src/github.com/grafana/grafana
INFO:kolla.common.utils.monasca-grafana:        to create a module there, run:
INFO:kolla.common.utils.monasca-grafana:        go mod init

Let's unblock the gate and diagnose asynchronously.

Change-Id: Id113a53c083d105ac9200474ff20faacef6decaf
2021-04-06 09:41:32 +01:00
Radosław Piliszek
8e3027c542 Make kolla_set_configs open files in binary mode
This fixes comparisons when files are not Unicode-encoded.

A relevant unit test is included.
It can be used as a base for other _cmp_file method unit tests
if the need arises.

Change-Id: Ic638516eb92d24ad247a7866fd1b5e2ac0400388
Closes-Bug: #1913952
2021-02-10 15:57:58 +01:00
Zuul
8031118c63 Merge "Remove two missed unicode flags" 2021-01-26 11:54:54 +00:00
Radosław Piliszek
335dff7124 Remove two missed unicode flags
Change-Id: I799bf8edfef6ff68382d651dca6de96fa80ed733
2021-01-25 15:58:59 +01:00
Michał Nasiadka
a8c12def85 CI: Use Docker proxy for pulls
Change-Id: I0c4d5e1ea16c6677813a334b38b3a22ad811531d
2021-01-15 19:04:05 +00:00
Mark Goddard
0fc464332c CI: revert to public package mirrors after build
When building images in CI, we use local package mirrors to reduce
external network traffic. These mirrors are not necessarily reliable nor
are they guaranteed to be accessible outside of the CI environment
(although many are).

While it is an antipattern to install packages in containers at runtime,
the Bifrost container does just that. If the mirrors configured in the
image are unavailable, Bifrost deployment can fail.

This change fixes the issue by reverting to public package mirrors as a
final step of the image build process.

Closes-Bug: #1902101

Change-Id: I2592a736206eaec811290e9fbdbf2540c0518ffe
2020-12-17 11:13:20 +00:00
Radosław Piliszek
cdd0eb7914 Fix publishing login
Login to DockerHub was failing because of trailing newlines in
the encrypted credentials.
This patch makes the playbook trim them before usage.

Change-Id: I411f91af927ffa4d04c8021ddb5c3d584d90bdfd
2020-12-15 11:22:36 +01:00
Michał Nasiadka
07dd933043 CI: Ensure docker-py is installed on publish
After a recent change [1] publish jobs are failing on missing docker python
SDK.

[1]: https://review.opendev.org/c/openstack/kolla/+/763146

Change-Id: I63662dd903b914fe06165b45e0a0bb5ca74b21b9
2020-11-26 14:51:53 +00:00
Zuul
3c68a4f912 Merge "CI: add templated Dockerfiles to build logs" 2020-11-24 15:28:39 +00:00
Michał Nasiadka
3ad0c12129 CI: Improve publish playbook
Currently we use a for loop in shell that performs push of images
to Docker Hub - that doesn't really seem to fail properly on push
errors (e.g. related to new Docker Hub limits).

This change introduces usage of Ansible docker_* modules for doing the
same job and improves logging (so it's easier to find out which image
failed to publish).

Change-Id: I083ce70772edd1abb873ad43f6beb73aae01383f
2020-11-19 10:34:20 +00:00
Mark Goddard
09c890b124 CI: add templated Dockerfiles to build logs
Change-Id: I702f8fba37e22a6bb45eae14f1fbb251bcdb4d8a
2020-11-17 11:37:03 +00:00
Radosław Piliszek
dd87bb9f07 [CI] Use local RDO mirror
Fixes a FIXME.

Change-Id: I2e6e07d6f466a7485ce6481e6e43b034fdc27f41
2020-10-28 18:09:02 +01:00
Mark Goddard
6bfe9b8749 [CI] Support building source images with in-review changes
Following this change it is possible to add 'Depends-On' lines to a
kolla commit message that point to reviews in other projects. For
example, this could be used to test building and deploying container
images containing a change to the nova project that is currently in
review.

It also allows to introduce jobs testing against Kolla in other
projects.

The kolla-build-config Ansible role can also be used by other projects,
such as kolla-ansible, to generate the necessary configuration.

This takes us closer to the Kolla Builder - Next Generation concept [1].

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014255.html

Change-Id: Ia2efa6b5d7278b75ab8dec23207f92d6bd7c58f0
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2020-09-16 07:39:41 +00:00
zhoulinhui
33970fcc6b Update imp module to importlib
The imp module is deprecated[1] since version 3.4, use importlib to
instead

1: https://docs.python.org/3/library/imp.html

Change-Id: I79dfd923531dd3e00d23e1682865f56f0cf437d2
2020-08-30 22:11:52 +08:00
Mark Goddard
c5320eb223 Fix kolla_set_configs --check with a directory
There are several issues with kolla_set_configs --check:

1. We calculate the destination path incorrectly when comparing a file
   in a directory, due to passing arguments to os.path.relpath in the
   wrong order
2. For directories that have not changed, we also attempt to compare
   them as files, which fails when they are open()ed.
3. If the config JSON does not have a config_files key, it fails with a
   KeyError.

The first two issues affect the fluentd container, which specifies
directories as the source, without using a glob. The third affects OVN
containers.

This patch fixes these issues.

Closes-Bug: #1890567

Change-Id: I8921befe51da4282121443849177a7ca5ebe8822
2020-08-28 15:01:25 +00:00
Zuul
86d92f19d5 Merge "[CI] Add no-infra-wheels jobs" 2020-08-12 13:48:15 +00:00
Radosław Piliszek
1ef537d65d [CI] Add no-infra-wheels jobs
Since Kolla is run in the wild against PyPI mirrors which do not
include the OpenDev-provided wheels, it might be nice to be able
to test these scenarios in the CI.

These jobs are added to the experimental queue so that they do
not consume resources when not needed.
Any Gerrit user may run them now to verify whether the change
passes them.

Change-Id: I9c33eeaf03be037651f82c831f0e07ab9a27752a
2020-08-12 09:57:37 +00:00
Radosław Piliszek
a3ef68d91c [CI] Fix wheel url for CentOS
CentOS wheels do not differentiate between minor versions atm.

Change-Id: I5365c813bab5e3205fd34eb64dc3337f192d67d4
2020-08-11 08:02:06 +00:00
Marcin Juszkiewicz
c42b882aff CI: use wheels from infra mirror
If they are available then we do not need to build them. Especially
AArch64 jobs will speedup (once wheels are built).

Change-Id: I79af6c37950e156018a9204fbcc7417cd7d41012
2020-06-18 20:53:58 +00:00
Marcin Juszkiewicz
039a6d431a CI: fix line merge in CentOS builds
Looks like I missed one situation with "base/centos: take care of
whitespaces" change.

Change-Id: Id7b5e8ddf23f9ab13806fb02042e76183bcddf05
2020-06-18 16:34:01 +02:00
Marcin Juszkiewicz
09604a7492 base/centos: take care of whitespaces
Let's get rid of this warning:

Change-Id: I121e2ecb30ec6e8d1b6d88d9b921894438c3e094
INFO:kolla.common.utils.base:ESC[91m[WARNING]: Empty continuation line found in:
INFO:kolla.common.utils.base:    RUN dnf -y install centos-release-opstools epel-release dnf-plugins-core     && dnf config-manager --enable PowerTools     && dnf config-manager --disable centos-ceph-nautilus     && dnf config-manager --disable centos-nfs-ganesha28     && dnf config-manager --disable influxdb && rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools && dnf -y distro-sync --security --sec-severity=Important --sec-severity=Critical
INFO:kolla.common.utils.base:[WARNING]: Empty continuation lines will become errors in a future release.
INFO:kolla.common.utils.base:ESC[0m
INFO:kolla.common.utils.base:Step 1/39 : FROM centos:8
2020-05-17 17:38:10 +02:00
Marcin Juszkiewicz
8abfa0cc75 CI: make sure that virtualenv is available
Failed to find required executable virtualenv in paths:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

Change-Id: Ie6094e1c5de5c89e0180c42edf5ef94c1c9964b7
2020-04-30 22:19:06 +02:00
Zuul
2f66efdf5e Merge "Remove support for CentOS 7" 2020-04-15 14:02:57 +00:00
Marcin Juszkiewicz
53443c5c71 Remove support for CentOS 7
With the move to RHEL/CentOS 8 we no longer have Python 2 in our images
so there is no need for checking which Python version (2.x or 3.x) is
used inside of containers.

We also no longer have to support yum as a value for
distro_package_manager.

Partially-Implements: blueprint centos-rhel-8

Change-Id: Ie45cf3465fedddbde7856961527421883ba3d5c9
2020-04-15 09:32:06 +00:00
Marcin Juszkiewicz
584da06751 CI: add Centos 8 and Ubuntu jobs for aarch64
also simplify Debian job definition

Depends-on: https://review.opendev.org/718413
Depends-on: https://review.opendev.org/718363
Depends-on: https://review.opendev.org/718236
Depends-on: https://review.opendev.org/718238

Change-Id: I2c75dbc2ea063dd3507eaaf93a484c50acae5fb5
2020-04-08 21:11:44 +00:00
Zuul
7528397120 Merge "CI: Ansiblify setup of builders" 2020-04-04 16:31:28 +00:00
Zuul
baec0b913a Merge "CI: Avoid tox" 2020-04-04 16:31:27 +00:00
Zuul
ee542d05eb Merge "Update hacking for Python3" 2020-04-03 20:03:12 +00:00
Radosław Piliszek
2cdcf1821d CI: Ansiblify setup of builders
CI is set up using Ansible playbooks now.
This also drops redundant shell scripts.

Co-authored-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

Change-Id: I5264746fd04276448f4668c3bb3a218a40e8660b
2020-04-03 15:59:20 +02:00
Radosław Piliszek
c089eab392 CI: Avoid tox
We don't need tox nor tell our users to use it when doing kolla builds.

Tox is going away from base infra images (it is already gone from
aarch64 ones).

Depends-on: https://review.opendev.org/713134
Co-authored-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

Change-Id: Ib1d97a783951ac42740ebf91bcc6ecaf2bf70853
2020-04-03 15:46:11 +02:00
Zuul
3da0aaa845 Merge "CI: Add https match for mirror.centos.org to template-overrides" 2020-04-03 12:53:31 +00:00
Michal Nasiadka
1a28aefec8 CI: Add https match for mirror.centos.org to template-overrides
Some CentOS repos (currently one - Ceph NFS Ganesha) use
https://mirror.centos.org instead of http:// and we break
their definition by removing mirrorlist= entry and not inserting baseurl
entry due to a missing match.

Change-Id: I7b29f8c6be80820042023d2b85162d5cc9a65f08
2020-04-03 11:23:40 +02:00
Radosław Piliszek
924e7a40f1 Use unittest.mock instead of PyPI mock
Now that py2 is gone, oslotest dropped dependency on mock and will
soon affect Ussuri CI [1], let's use unittest.mock built in py3.

This also fixes py38 jobs and proactively prevents py36 and py37
failing due to [1]. This is because we never included mock in
test-requirements (but in lower-constraints where it does not
really belong at all) and instead relied on oslotest to bring
it in.

[1] https://review.opendev.org/716322

Change-Id: Iceedcc7ad0d087414f6f94dfc0235fda4754be63
2020-04-02 18:22:38 +02:00
Andreas Jaeger
1456d8b6f9 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found by updated hacking version.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, they are not
needed in installations.

Change-Id: I67e5ca24c550163c218fb06692de0b7c528d8318
2020-04-01 21:42:41 +02:00
Marcin Juszkiewicz
c2a3380707 CI: publish AArch64 Debian/source images
We want to test upgrades on aarch64. For this we need to publish images.

AArch64 images will get "-aarch64" added to tag to not collide with
x86-64 ones.

Change-Id: Ibae2578b4bc18c0ab7fcc1840c39bb86659ab920
2020-03-19 15:28:00 +00:00