Commit Graph

99 Commits

Author SHA1 Message Date
Ghanshyam Mann 72ea117f61 Retire Tripleo: remove repo content
TripleO project is retiring
- https://review.opendev.org/c/openstack/governance/+/905145

this commit remove the content of this project repo

Change-Id: Ic549bdcc76a5e12a0104143fbe79fd0db2c866b0
2024-02-24 11:44:35 -08:00
Takashi Kajinami 4a4bd9c06a overcloud: Remove logic for unsupported old releases
This change removes logic for releases older than train, because these
releases are already EOLed. This covers only overcloud-* roles and
playbooks and the other items will be covered by separate changes.

Note that this change also removes the containerized_* variables
because current active releases(>=Train) no longer supports
non-containerized deployment. The containerized_overcloud_upgrade
variable is still left because the variable is still required by
the tripleo-ci-base-multinode-standard job template.

Change-Id: If29ec2c2219a28a1f79db0e552e2c622c0a7bda6
2022-10-25 16:32:53 +09:00
Ronelle Landy d46cbb211a Add missing custom container parameters - overcloud
roles/standalone/tasks/containers.yml has a number of
ceph-related and other custom parameters that were
missing from the overcloud prep parameters.

This review adds those custom parameters to ensure
that the correct containers (from the desired
registries and namespaces) are used.

Change-Id: Id3b1ea025b748dee578e5bfb1cdd41d0bb7f7383
2021-06-23 12:30:28 +00:00
Chandan Kumar (raukadah) d0fb142fde Use native pip for container-check installation
We already install python2-pip on undercloud host and we
donot need extra task to again install pip for the same.

And easy_install module is not longer available with
python2 leading to failure of tasks unnecessary.

Removing it fixes the issues.

Tested here:
https://review.rdoproject.org/r/c/testproject/+/33649

Closes-Bug: #1927736

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: Iee8f19ed9cc7a2e0fbf9f82b4c32fc4f8bd4c525
2021-05-12 16:11:33 +05:30
Amol Kahat 95bb26c152
Fix pip installation failures in overcloud-prep-containers
python2 easy_install command is failing to install pip with
version no. To overcome this issue, first install pip using
easy_install and install pip version with pip.

Closes-Bug: #1927736

Change-Id: Ie07eefb8052e04a40cd93455a8c60b92642ee3c5
Signed-off-by: Amol Kahat <amolkahat@gmail.com>
2021-05-11 13:36:05 +05:30
Marios Andreou c2b0910fe1 Remove all rocky related conditionals and tests after rocky End of Life
Rocky is now EOL since [1][2] so this removes all the rocky related tests
or conditionals.
Related reviews in topic branch tripleo-ci-reduce-rocky [3].

[1] https://review.opendev.org/c/openstack/releases/+/774244
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-March/020912.html
[3] https://review.opendev.org/q/topic:tripleo-ci-reduce-rocky

Change-Id: Icb999fa6c8278bd54c200c73963b5e364c94c23d
2021-03-29 11:54:27 +00:00
Daniel Bengtsson edbcd1a8bf Install pip 20.3.4 for python 2.
The pip 21[1] is not compatible with python 2.

Closes-Bug: #1913279

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/020003.html

Change-Id: I9a7caaf34ef6960303c226334f1ac3108c566768
2021-01-26 20:57:20 +01:00
Chandan Kumar (raukadah) 1aa2135090 Added tasks for building containers on CentOS-7
It will be used with the content provider job.
Set buildcontainers_venv: false to use dlrn installed
packages.

buildcontainers_rpm_setup_config: "" as kolla will
download the required dlrn repos and gating repo.

Added undercloud tag to prepare and use old
container workflow for c7 based env.

Added insecure registry for docker.

Change-Id: Ic5f569a78b5341fcee9cd013eddfffd3eeb66fa0
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
2020-10-17 09:15:47 +05:30
Marios Andreou 8d535ec0f9 Wire up job.registry_ip_address_branch for content provider jobs
Wires up the content provider container registry address into
DockerInsecureRegistryAddress. Makes sure we are using the
_address_branch version in all other references to the
job.registry_ip_address var.

Needed by the upgrade jobs in https://review.opendev.org/753403
Change-Id: If9b516860ad3f102e39cb8755cd8aee6f9aae413
2020-10-15 13:11:35 +03:00
Sagi Shnaidman 602c4d8f96 Fix containers prepare role
Redundant line was breaking the command.

Change-Id: Ie0dd0f0b08185c5120a3ac0ed99b775d842d6ddf
2020-09-30 17:46:12 +03:00
Chandan Kumar (raukadah) a564a865a2 Set container namespace to local registry in consumer job
Current in container-prep-parameters file, namespace is pointing
to docker.io in consumer job but it needs to be pointing
to local registry to pull containers from provider job when
consumer_job is set to true.

Added local_registry_ip_address and port to the default vars to
avoid vars not defined issue.

It fixes the same.

Change-Id: Iaa2b3b0074732287b618fe268a7e8876f14c6348
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
2020-09-25 06:18:38 +00:00
yatinkarel d70ee0de92 Add gating repo to update repos only if it's setup
gating repo is setup only when packages get's build,
so add gating repo to update repos only when gating
repo is setup i.e based on compressed_gating_repo.

Also add new role variable container_prep_additional_repos,
which can be used to add more repos for container updates.

Closes-Bug: #1865459
Change-Id: I9e7b2e04182d156502c1fdb12bcb743d800a6b49
2020-03-12 03:41:31 +00:00
Sorin Sbarnea 16649df878 lint: bumping to latest versions
- run `pre-commit autoupdate` and fixed new issues
- adopted newer pre-commit config for ansible-lint 4.2.0+
- fixed some reported broken rules
- temporary disabled few rules, just to contain the size of of review,
  planning to drop/fix them in follow-ups.

Change-Id: I807ba4e919527be56c85ec72d0f4c7148f04e994
2020-01-05 19:36:36 +00:00
Wes Hayutin bf138f2ec1 update tqe openstack -> opendev
Change-Id: I14443c5d5e8cddde01373ce6408ced47a7dc1403
2019-04-22 13:17:19 -06:00
Wes Hayutin c6eaa9d8cb WIP: attempt cleanup on container build id vars
Change-Id: Ia767988dae7bf3c01b74fd719facf9f20daa6059
2019-03-15 14:07:55 +00:00
Sorin Sbarnea 72141b7fab Adopt yamllint strict linting
Upgrades yamllint to latest version and adots use of its strict
checking.

Fix all known problems reported by yamllint so we don't have to do
that while touching these files.

Change-Id: I4bdc520d9e2aff086c4b463718bc1e053261a4f5
Story: https://tree.taiga.io/project/tripleo-ci-board/task/381
2018-11-26 12:37:21 +00:00
Zuul cf3c08c0b4 Merge "Use dnf and python3 on platforms where these are default" 2018-11-06 17:46:57 +00:00
Zuul bc964e7378 Merge "Add vars for setting images for openshift 3.11" 2018-11-06 03:22:36 +00:00
Zuul 5effb949f7 Merge "Add vars for setting gluster images for openshift" 2018-11-06 03:22:35 +00:00
Sorin Sbarnea 04585eb6f4 Use dnf and python3 on platforms where these are default
Roles do not need to make any assumptions about having some facts
already gathered, thus at start they should assure they gather any
missiong facts that are used inside the role.

Change-Id: I49fd1a0c070d96aecb880164acde490c9e7c95ef
Story: https://tree.taiga.io/project/tripleo-ci-board/task/153
Depends-On: https://review.openstack.org/#/c/615489/
2018-11-05 15:58:33 +00:00
Martin André 0130fed331 Add vars for setting images for openshift 3.11
Add possibility to set the new container images for ocp 3.11 images
during the image prepare step.

The change hooks the variables both to the `openstack overcloud
container image prepare` command and to the generated
containers-prepare-parameter.yaml file for the image prepare workflow.

Depends-on: Ibbd5ff9d3597f5add440b92a27a2f2f669f7bdbe

Change-Id: I3d59dcd2e50f2e96a7a97cb836a791a52dd6dc9a
2018-11-04 18:33:40 +01:00
Quique Llorente 3588ffbb7b Don't install setuptools/pip/virtualenv from RPMs
Openstack infra has them already installed and we are not supose to
install it, for example at fedora the exclude them explitcitly from the
dnf.conf

Change-Id: I3b276e159ff7534777219975995fc20c967d0e42
Store: https://tree.taiga.io/project/tripleo-ci-board/task/248?kanban-status=1447275
2018-10-25 11:54:12 +00:00
Martin André 61357f8e12 Add vars for setting gluster images for openshift
Add possibility to set openshift gluster images during the image
prepare step.

The change hooks the variables both to the `openstack overcloud
container image prepare` command and to the generated
containers-prepare-parameter.yaml file for the image prepare workflow.

Change-Id: I73df96866fcec313d72a4d91a6a63f3c6085e5c2
2018-10-23 11:12:36 +02:00
Steve Baker c4ec5a3b9f Switch to workflow driven image prepare
This tests container-prepare-workflow and concludes the coding/testing
portion of this blueprint.

Since image prepare happens during overcloud deploy, the role
overcloud-prep-containers is skipped completely from rocky onwards.
The file containers-prepare-parameter.yaml is written out during
undercloud-deploy.

Change-Id: I006e48754ed1710ae8cc6e9c1d35e9c2e66b5907
Blueprint: container-prepare-workflow
2018-08-30 11:32:26 +12:00
Zuul 06bb074d8c Merge "Add openshift etcd image to image prepare params" 2018-08-29 08:49:28 +00:00
Wes Hayutin 5d8f67f74a add delorean-current to repolist for updates
The list of containers that are updated are generated
from a list of rpms from the gating repo.  These
containers are updated w/ the gating repo and dlrn-current.

That makes the above set of containers out of sync w/
the rest of the containers.  The list of containers
that are updated needs to include changes required
by dlrn-current AND the gating repo.

The --enablerepo parameter for repoquery seems to support
comma-delimited lists, we'll take advantage of that so that we don't
need edit ansible-role-tripleo-modify-image parameter interface.

Co-Authored-By: Jiri Stransky <jistr@redhat.com>
Closes-Bug: #1786764
Change-Id: Ie12021ace7e9eb1695aa97ac5d97f3b948be9d86
2018-08-21 16:21:56 +01:00
Sofer Athlan-Guyot 07d14c4f68 Don't use the undercloud containers during mixed upgrade.
When doing mixed upgrade we don't want to use the container definition
file generated during undercloud deployment.

The problem is that at that time (undercloud deployment) the build_id
and docker_registry_namespace_used are (rightly) pointing to master.
But then during mixed upgrade overcloud deployment we need the N-1
version docker's images.

Change-Id: Ice13dceba7417e1ef827f4ab44fd08d2d13922fd
Closes-Bug: #1786488
2018-08-10 18:41:50 +02:00
Martin André 4d1bf62c6b Add openshift etcd image to image prepare params
It is not currently possible to re-use the kolla-based image we're
using the for the overcloud. Let's add the params to tune the openshift
etcd image.

Change-Id: I48fcbcfba5e8b41f28e23773e2cc02229f7eee7d
Depends-On: I3697c171243ec2f3001cca83f7a93ece2af9a8bd
2018-07-18 15:42:10 +00:00
Steve Baker f0e02ef203 Run image prepare with --verbose
This will be useful for debugging CI timing issues with logging of
individual image operations.

Change-Id: Id9bbd8ee829870f3fa524c2a5677da1d8ec4c75b
2018-06-30 14:01:20 +00:00
Wes Hayutin 2037e9a415 set container variables when needed
Only run container tasks when required to:
1. prior to undercloud
2. prior to overcloud-prep-containers
3. prior to standalone deployment

Closes-Bug: #1777896
Change-Id: I50054a95500747972454305001d34c4c97b71e7f
2018-06-26 02:03:48 +00:00
Steve Baker c2a3aac33f Use role tripleo-modify-image to update containers
This change uses the yum_update task file in ansible role
tripleo-modify-image to update the undercloud images.

Change-Id: I62a4b03538d26083a0ba4ce0b2e7a5b0c456134d
Blueprint: container-prepare-workflow
2018-06-15 20:24:38 +00:00
Steve Baker b3794ff03a Use the in-built image prepare for undercloud install
This file will write out the heat environment file
containers-prepare-parameter.yaml which will be used to do any
required image preparation during undercloud install.

The role parameter undercloud_container_images_file has been left as
an option for overriding, but is no longer required.

This change also switches the overcloud prepare to consume this file
via the command "openstack tripleo container image prepare"

It is expected that overcloud deploy will use the exact same
containers-prepare-parameter.yaml and the logic will be in place to
skip any unnecessary prepare actions. For this reason, the parameter
undercloud_docker_image_tag has been removed, and docker_image_tag is
used directly.
Since this file (and the variables used to build it) will be common to
undercloud and overcloud, there has been some refactoring to move
variable defaults to extras-common.

Change-Id: I290806b9296773688dfd02bc41f8baea28cf3d6a
Blueprint: container-prepare-workflow
2018-06-15 20:24:20 +00:00
Martin André 00a9ba2f9d Disable update of OpenShift and k8s containers
There is no need to include the latest changes into 3rd party
containers.

Depends-On: I31494ff8524b90343e6e8c67bd08a354837ecc45
Change-Id: I85c4390519ace0149895285225f5a4ece453f1f8
2018-06-08 11:11:02 +02:00
Martin André 7f6262415d Add openshift params to containers prepare cmd
This wires the parameters used to configure the OpenShift container
images for the container image prepare command.

Change-Id: Ib22d76745426ffef43a513521c3e5d69d3bbdf5c
Depends-On: I58a5d2e5dd7354bea99e2639da3b6169dbb54514
2018-06-07 17:03:32 +02:00
Martin André 8f010971bd Use preferred option where possible
The --images-file and --env-file options of `openstack overcloud
container image prepare` command were renamed to --output-images-file
and --output-env-file for clarity. Use them wherever possible (pike and
above).

Change-Id: Ie76f08e7a2ac2021ec0b66afa1292bc2eef00b8c
2018-06-07 13:56:58 +02:00
Steve Baker e680288154 Move BUILD_ID setting logic out of template
This makes the template simpler, and refactors in preperation for
referring to container_build_id from another template.

Change-Id: Ia19f8fdc9705f43ddf0497fab3279c1ee33c696c
Blueprint: container-prepare-workflow
2018-05-28 10:02:01 +12:00
Steve Baker 467e1da805 Revert "Revert "Run "overcloud container image prepare" only once""
This reverts commit a17a676489.

Change-Id: I0247e2d0f555dbba5192142f2b47cf00fc5ee31d
2018-05-28 10:02:01 +12:00
Steve Baker 7ac207ab85 Use a dedicated prepare command for container-check
containers_update.yaml needs to exclude ceph, and later changes in
this series will create a overcloud_containers.yaml file which
container-check can't consume, or later in the series there will be no
overcloud_containers.yaml file generated at all.

To deal with this, run a dedicated prepare call to generate the
required containers_update.yaml.

This change also removes the logic which renames the base os repo
files to disable them. Since change
I764bc9a368e63a9aa82ec5503bcd3a9c7c6f4e25 there is now a
packages_for_update variable populated, which will speed updates and
ensure that only the packages being tested (and their dependencies
which may come from a base repo) will be updated

Change-Id: Id44eda339eb674339a0e6105079449e113de542c
2018-05-28 10:02:01 +12:00
Zuul 308113ef5f Merge "Revert "Run "overcloud container image prepare" only once"" 2018-05-19 05:15:37 +00:00
Alex Schultz a17a676489 Revert "Run "overcloud container image prepare" only once"
This reverts commit 445157148a.

The containers update script does not handle the new format.
So this broke CI when container updates are applied.

Closes-Bug: #1772122
Change-Id: I5256a1bee84f32629990c48c5e6e987384bd498f
2018-05-18 22:17:41 +00:00
Zuul 67e27d27f3 Merge "Run "overcloud container image prepare" only once" 2018-05-18 19:12:55 +00:00
Steve Baker 445157148a Run "overcloud container image prepare" only once
Thanks to the fix for bug #1738663 it is no longer necessary to run
prepare separately to generate the environment file and the images
file. The second run only occurs now for ocata, pike runs.

Change-Id: I54a08d696ba7f67caa114a2beffe5de601eb1a92
Related-Bug: #1738663
2018-05-16 09:18:32 +12:00
Sagi Shnaidman eae02e5dbc Run containers update only for required packages
Run containers update only for packages which were built and their
dependencies. Don't run container update at all if nothing was
built in the patch.

Depends on https://github.com/imain/container-check/pull/2 to pass
Change-Id: I764bc9a368e63a9aa82ec5503bcd3a9c7c6f4e25
2018-05-14 18:03:08 +00:00
Sofer Athlan-Guyot 33cf682ebb Add support to mixed upgrade for overcloud-prep-container role.
During mixed version upgrade, we want to deploy the overcloud with the
N-1 release docker images and then switch to the N release images
file.

That review[1] added the N-1 necessary tags.  That review[2] was an
attempt to use the proper parameters in that role for deployment in the
context of mixed version.  This fails.

The failure comes from the fact that we load the release file using
"-e ". All those variables then have the highest precedence[3]
possible and cannot be overridden.

Furthermore we use `use_overcloud_mixed_upgrade` flag to prevent the
yum upgrade to run inside container during initial overcloud
deployment.  The problem here is that the repo configuration is taken
from the undercloud which is N.  Thus the N-1 images are upgraded to
N.  That means that we can't gate "from" patches.  In a p->q setup, a
change in pike cannot be tested if it relates to the docker image.

Eventually we need a way to run the container role even when the
containerized_overcloud is false.  For Fast Forward Upgrade, the
starting point is Newton which doesn't use container.  So we introduce
`prep_container_upgrade_run` flag that can be set from the featureset
to ensure that the container get deployed during upgrade.

[1] https://review.openstack.org/#/c/537833/
[2] https://review.openstack.org/#/c/539920/1/toci-quickstart/playbooks/multinode-overcloud-prep.yml
[3] https://docs.ansible.com/ansible/latest/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable

Related-Bug: #1745348

This Tech-debt is introduced until the refactor of the release loading
is done.
Related-Bug: #1749978

Change-Id: I4df06c8a0d5d8133ba64c38b90cef34793776422
2018-03-23 12:27:34 +01:00
Jose Luis Franco Arza 6366ff5e38 Parametrize overcloud-prep-containers script name.
Upgrading from P->Q will imply running the
overcloud-prep-containers role twice. As the
name used in the script is fix, the second
time the role will run will overwrite the
previous script file, which could be useful
for debugging purposes.

This patch adds a new parameter
'overcloud_prep_containers_script' which sets
the name of the script used to configure the
docker containers.

Change-Id: I7952872b110b25f67d66de0c5ea4610bfb0f0cb1
2018-03-23 12:18:29 +01:00
John Trowbridge 6d378a6253 Use undercloud registry for ceph in overcloud deployment
We download all of the containers to the undercloud (including ceph),
but then we still pull ceph from docker.io during overcloud deploy.

Instead we should hardcode the namespace for the overcloud deploy
to be the undercloud registry (as we do for all the other containers).

Change-Id: I7cf95bfee7267c7b1a451de20129dbe22d946834
Closes-Bug: #1752874
2018-03-06 18:31:38 +00:00
Wes Hayutin fd6505fc77 Updates for containerized undercloud
This patch contains changes to deploy a containerized undercloud by
using: "openstack undercloud install --use-heat" command.

Details of the changes:

- The experimental containerized undercloud deployments driven via
  `undercloud deploy` CLI is not supported anymore for Pike.
- overcloud-prep-containers: fix an jinja2 syntax issue with "is defined"
- overcloud-prep-images: "--http-boot=/var/lib/ironic/httpboot" is
  added to the "openstack overcloud image upload" command.
- undercloud_rpm_dependencies parameter has been created, default to
  undercloud_tripleo_pkg value.
- Remove "undercloud_tripleo_pkg" so we only use
  "undercloud_rpm_dependencies". Note that "undercloud_tripleo_pkg"
  was only used in this repository.
- Remove "undercloud_update_packages" option which was technical debt.
- Add "undercloud_install_cli_options" option which is used to add extra
  options to "openstack undercloud install" command.
- Add "undercloud_container_images_file" which is the environment file
  with default parameters for containers to use with undercloud install CLI.
- Add "undercloud_custom_env_files" which provides custom t-h-t env files
  for the "undercloud install" `undercloud.conf` interface.
- Generate the undercloud prep containers script. This script will
  reproduce what we expect from our users to run with
  "openstack overcloud container image prepare" command, for the
  undercloud.
- Update undercloud-deploy.sh.j2, remove tech debt and update for new
  bits.
- Install heat libraries and other dependencies for containerized UC
  from python-tripleoclient-heat-installer. This should go away
  once python-tripleoclient installs python-tripleoclient-heat-installer
  automatically.
- Update undercloud-install.sh to use undercloud_install_cli_options
  which is empty by default but will be used in the container-undercloud
  featureset to override with the right parameters.

Partially-Implements: bp containerized-undercloud

Co-Authored-By: Bogdan Dobrelya <bdobreli@redhat.com>
Co-Authored-By: Emilien Macchi <emilien@redhat.com>
Co-Authored-By: Ian Main <imain@redhat.com>
Co-Authored-By: Martin André <m.andre@redhat.com>
Co-Authored-By: Wes Hayutin <weshayutin@gmail.com>

Change-Id: I7d056b208d5ac0639e3277f3f4ae453a9ee639e8
2018-02-12 02:31:17 +00:00
Zuul 374e07a152 Merge "overcloud-prep-containers allow override of deploy args" 2018-02-12 00:43:39 +00:00
Zuul 7c3da40a6c Merge "Increase logging for overcloud container uploads" 2018-02-08 19:20:42 +00:00
Wes Hayutin df63be261a fix issue where containers can not update successfully
This patch enables the centos base repo such that
new dependencies can be installed.

Closes-Bug: #1747986
Change-Id: Ie4778908a6510d07206e93994675f4c886313d6e
2018-02-07 18:04:32 -05:00