Commit Graph

38 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
Amol Kahat e1f0baaf0b
Skip centos.repo setup for C8
Centos.repo[1] already set for c9 in oooci-build-images
vars, in this patch we are doing same.

[1] https://opendev.org/openstack/tripleo-ci/src/branch/master/roles/oooci-build-images/vars/centos-9.yaml#L6

Signed-off-by: Amol Kahat <amolkahat@gmail.com>
Change-Id: I7fd57cf395a98094c1033083bc8c075b040d49a6
2022-12-30 19:04:30 +05:30
Sandeep Yadav 6d25018227 Pass centos.repo from host during image build.
Image build in component jobs is pulling content from
centos.repo instead of quickstart repos, see [0]

This can cause mismatch of rpm when mirrors.centos.org and
local mirrors are not in sync.

The base image which we use to build overcloud images already have
centos.repo and when proxy mirros are not updated this can cause
an issue.

This is a workaround patch to pass centos.repo(which are disabled
on host) so that same repos in the image will be overridden.

One change in behavior is at the end of image build, dib will delete
the centos.repos in the overcloud image as dib cleans up what it adds
ignoring what was already present.

oooci-build-images already have same fix.

[0] https://logserver.rdoproject.org/openstack-component-baremetal/opendev.org/openstack/tripleo-ci/master/periodic-tripleo-ci-centos-9-ovb-3ctlr_1comp-featureset001-baremetal-wallaby/1cd7430/logs/undercloud/home/zuul/build.log.txt.gz
~~~
2022-12-27 00:54:07.471 |  kernel                         x86_64  5.14.0-214.el9            baseos           2.8 M
~~~

[1] b2ce4b4c10

Related-Bug: #2000226
Change-Id: Iecf36eff8ef27fd2734f77b09180d0b4d8654c52
2022-12-27 17:24:36 +05:30
Chandan Kumar (raukadah) c6bf40bc54 Inject gating gating repo during image build
Currently we inject gating.repo on the built image.
In fs02, we first built the image and then inject
the gating repo on the image to pick up latest changes.

On FS02, the gating repo is not getting applied on the
built images.

In order to fix that, we are including the gating.repo
during the image build process and the latest packages
are getting pulled from gating repo.

It also removes install built repo operation as build
images role already takes care of that.

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I58ffeafddac3e14e265fc19f294f4508b8f7f5e9
2022-01-13 09:26:20 +00:00
Steve Baker aaa56fdf7c Refactor inject_images for whole disk images
When whole_disk_images is true, inject_images will contain 3 items
instead of 5. This kind of conditional value cannot be set in a
defaults yaml file. This change moves inject_images to a set_fact in
the build-images tasks.

It is possible to disable image injection by setting variable
inject_images: [].

The variable image_build_extract_list is given the same treatment,
although it looks like build_image_isolated is never true anymore.

tripleo-quickstart has an equivalent change
https://review.opendev.org/c/openstack/tripleo-quickstart/+/801408

Change-Id: I4e85b9f4074bd4c35d5b9b486089adc9a58c31d0
Blueprint: whole-disk-default
2021-09-10 14:00:27 +12:00
Steve Baker 41f07fbe1c Do not hard-code overcloud-full image name
The var overcloud_image defaults to overcloud-full, and will until the
switchover to the whole-disk overcloud.

Change-Id: I64c0d9f97b34e9145be70af7c489bb5b706baf8a
Blueprint: whole-disk-default
2021-09-10 13:52:21 +12:00
Steve Baker b911d3f9be Don't hard-code overcloud-full
This will soon be overcloud-hardened-uefi-full on master, and the
download will be of a qcow2 file, not a tar file.

This change moves whole_disk_images default setting to extras-common,
and also adds default variable overcloud_image, which is used wherever
'overcloud-full' is currently hard-coded.

Change-Id: Iba7833c16eae3d3129b7bab48434c66ec2e1efcf
Blueprint: whole-disk-default
2021-06-30 10:09:43 +12:00
Ronelle Landy be3d8f68dc Include component repo in image builds
When building images in OVB component jobs,
the componet delorean repo is disabled.
Include the component-ci-testing repo in the
image repo build path where it is available.

Change-Id: Ia677d4d84a70c2e4944656d5fd4688384e5a72a1
2021-06-11 12:00:21 +00:00
Chandan Kumar (raukadah) d028ffd370 Inject gating repo in overcloud and IPA images
Use install-built-repo role to enject gating repo in the
overcloud and IPA images once the image is built.

Change-Id: I1b9dc627fa71e80dc3bf79ddd353ace1d15e7673
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
2020-05-13 21:31:45 +05:30
Chandan Kumar (raukadah) d4aaa0a7fe Consume oooci-build-images role in build-image
It contains:
* Remove existing template in favour of oooci-build-images role
* Moved isolated build step code to main playbook
* Added required vars for oooci-build-images role
  in Ansible
* use quickstart-centos and delorean repos for image build
* web-gating.repo is generated when there is a depends-on from
  tripleo projects.

Depends-On: https://review.opendev.org/#/c/721178/

Change-Id: Ifebdc0e1d765646faafaed545a9e01cead51a319
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
2020-05-05 20:16:02 +05:30
Sorin Sbarnea 1c6b947bf2 ansible-lint: removed skip of 206
- Fixes 206 errors and removed the skip.
- Also replaces revision with latest tag (pushed today)

Bug: https://bugs.launchpad.net/tripleo/+bug/1848512
Change-Id: I69d75ba9de8ab0e91eb45fd4f9febfdb28cdcb3a
2019-10-25 17:15:40 +01:00
Arx Cruz 5a8bd7e162 Replace wget with curl
Using wget can lead to problems because it's not default.
We should use curl instead

Change-Id: Idc859c57582ed3b83c6177e91e14ba4828311826
Closes-Bug: #1847344
2019-10-09 10:50:30 +02:00
jacky06 990ae08eb8 Fix some wrong URLs
1. fix some wrong urls
2. Remove unncessary "=="

Change-Id: I97fe837fc9766fd782bca90ed3129303d70308f9
2019-06-03 06:53:29 +00:00
Sagi Shnaidman ab4b015cea Download and define base image if configured
When we build the image we need a base image to be defined.
For CentOS it's done automatically in client, but if we need to
build something else we need to download it and define it
explicitly.
base_image_url - URL of base image
base_image_path - path to save it on host

Change-Id: I10bd9868fcfd3a4d5992fc7d7b6200e908e75e25
2019-05-22 12:17:01 +00:00
Wes Hayutin bf138f2ec1 update tqe openstack -> opendev
Change-Id: I14443c5d5e8cddde01373ce6408ced47a7dc1403
2019-04-22 13:17:19 -06:00
Gabriele Cerami 0ec6046839 image build: temporarily add DIB debug flag
Bug https://bugs.launchpad.net/tripleo/+bug/1818305 can't be easily replicated,
and without additional information it's impossible to understand what's
failing.
This patch enables temporarily the debug flag that is usually excessively
verbose to be kept enabled

Change-Id: Iab18d18187ada40773224d0c9cf283e01cec7130
2019-03-06 15:33:04 +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
Sorin Sbarnea a472345db1
Repair ansible when calls with jinja2
- adopts official syntax for 'when:' commands
- assures we use current linter which spots when errors
- reverts temporary linter rule disablement
- use parsable output (pep8 like) for ansible-lint

Change-Id: I6eb5719841c2f264e1efed4bf38726f71c840e36
Closes-Bug: #1797838
2018-10-15 19:12:46 +01:00
Attila Darazs 689d759e64 Use cachable facts to allow multiple runs
* add "cachable: true" to set_fact calls when the fact would be used by
  other roles in later runs; the other fact names were checked to make
  sure they are not referred to in other roles
* consolidate the formatting of the set_fact calls, using the proper
  yaml structure instead of `set_fact: foo=bar`

Depends-On: I987d51cc252b7ebc3972d60497234fa676864882
Change-Id: I5dd3084ead618e357b1e7d841ea2ee794bd0569a
2017-12-05 16:56:38 +01:00
Alan Pevec 2495930229 build-images: adjust workaround for libguestfs
This is now fixed in libguestfs-1.36.3-6.el7_4.3.x86_64
so workaround is modified to work with both 7.3 and 7.4
to avoid issue
https://bugs.launchpad.net/tripleo/+bug/1716487/comments/14

Change-Id: Ie3372bfc7b829d4109c1466bd4423c3069e04027
2017-09-12 17:42:14 +02:00
Alfredo Moralejo 0b4b09dd9b Add quickstart-* repos to build-images role
https://review.openstack.org/#/c/494056 renamed repo and repofile
names for jobs in triple-ci.  However the list of repositories
configured in the build-image role still points to the old "centos-*"
repofile name [1].

This patch adds repos /etc/yum.repos.d/quickstart-* to the default
list of repos to make build-images role compatible with new repos
configuration.

[1] https://github.com/openstack/tripleo-quickstart-extras/blob/master/roles/build-images/defaults/main.yml#L20

Closes-Bug: #1712029

Change-Id: Ib25b2e9daf6b2ddaffc490552f9cc453c26f1a65
2017-08-21 11:35:28 +02:00
Yolanda Robla 1eac9d8f04 Add documentation on how to build a hardened image
We can build security hardened images just updating the list
of files on the role. So document properly in order to show
how to do it.

Change-Id: Ie3207c07bfdedebd609501bb9d55166e56e6ad98
2017-06-06 14:58:00 +02:00
Sagi Shnaidman eb4ca5d30c Add repositories generated by repo-setup role for tripleoci
We generate bunch of repos depending on AFS mirrors,
we need to include them into built image too.

Change-Id: Iad940ac2f61b21efb789ba63de20ed385e190801
2017-05-09 18:18:51 +03:00
Jenkins 2827ac8462 Merge "Fix unqualified Ansible boolean variables" 2017-04-19 17:19:40 +00:00
Wes Hayutin 7b26ca6136 the build-image is essentially using overcloud_as_overcloud, set it as such
This change allows the overcloud_full to be copied as the
undercloud.qcow2

Change-Id: I9fbdee3bd55a6289d52991e40296a8714afc3f7e
2017-04-06 10:16:41 -04:00
Gael Chamoulaud c377337673 Fix unqualified Ansible boolean variables
When using boolean variables in conditional tests, those variables
should be filtered as '|bool'. Otherwise, they are being evaluated as
a string and return True in any case.

Change-Id: I1e3642cb2d33d839e4808ae79ae991175e32dd0f
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-04-05 16:25:53 +02:00
Sagi Shnaidman 1792332d0c Use web repo with installed packages for image build
When building images we need to supply repo with built packages
to DIB so it will use when installing packages on the image.
Because DIB is in a chrooted environment we have to use repo in
network. This patch runs a webserver on the directory of the
repository to make it accessible over HTTP on port 8766.

Change-Id: I7b21d3ff1ec7cecab322e599cb929259f5a7256e
2017-04-05 14:15:05 +03:00
Jenkins d3abcf674f Merge "Add pipefail to each command that piped with timestamp" 2017-03-27 12:46:36 +00:00
Jenkins 2a1afdd46b Merge "Include gate.repo in image building if exists" 2017-03-27 10:52:38 +00:00
Sagi Shnaidman f791f5b3cd Add pipefail to each command that piped with timestamp
When pipe is added to command, it should still exit with its
result code, so save it by setting pipeline option before each
command.

Close-Bug: #1676156
Change-Id: Ibbe49b4a15a5b7825447a563fe35af85fd48b3ff
2017-03-26 19:49:32 +03:00
Jenkins c9453db00e Merge "Add timestamps to quickstart logs" 2017-03-25 05:47:08 +00:00
Sagi Shnaidman a42bb03914 Include gate.repo in image building if exists
When we build images we need to include gating repo with built
packages into it.

Change-Id: Ib8b60fea7fcc46b042e3f9ee37e2674d37fb4c33
2017-03-22 16:15:07 +00:00
Attila Darazs 6a5db4f9c2 Add timestamps to quickstart logs
Prepend a timestamp with awk to our deployment and test commands. This
allows html linking from the log servers and also better correlation
with the system logs.

We are not using the "ts" command from the moreutils package to avoid
extra dependencies. The drawback is the lack of sub-second timinig.

It is possible to disable the timestamping by setting the
timestamper_cmd to an empty string.

Also add a README file for the extras-common role.

Closes-Bug: #1673046
Change-Id: I8a2a1e4fde2ba805d3361e2e7a2337e873133ef0
2017-03-20 14:52:03 +01:00
Jenkins fdea73637d Merge "Add option not to skip building images" 2017-03-17 15:32:43 +00:00
Sagi Shnaidman 23682e4e8b Add option not to skip building images
By default tripleo client skips building images when they present,
add option not to skip it.

Change-Id: Ic3131366dbd8fa9fe5e48f797a7fba5d02032c43
2017-03-08 13:58:51 +02:00
Gael Chamoulaud 00d8fe4062 [LINTERS] Fix ansible-lint.sh and lint issues
This patch fixes lint issues that ansible-lint.sh did let pass and it enables
the verbose mode to see what happens.

Change-Id: Id912ecb4000a4cfeb8a4b8ab631774fd7ea5a449
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2017-03-08 10:58:17 +01:00
Sagi Shnaidman 123c823dfe Fix build images role for upstream usage
Fix various issues in build images role for using it upstream.

Change-Id: I5c37a7bb2ab6cc2bb1a76446c929aef65a6de47c
2017-03-05 15:07:47 +02:00
John Trowbridge f6e1500631 Add build-images role
Add new role to build overcloud and undercloud images.

This role can either operate directly against a host (direct)
or setup a build environment inside of a libvirt guest using
libguestfs-tools (isolated).

It starts by creating the overcloud images from the provided
yaml files. It then uses the convert-image role from
tripleo-quickstart to turn the overcloud-full.qcow2 image into
an undercloud image. Finally, it injects the previously created
overcloud-full and ironic-python-agent images into this new
undercloud image.

It is important to note that this process changes the type of
undercloud image produced. With the previous method we produced
a whole disk image for the undercloud, however by converting an
overcloud image we get a partition image for the undercloud. This
is because the overcloud image itself is a partition image.
The libvirt role in tripleo-quickstart handles this transparently,
and RDO is already producing the master image this way. However,
if we switch older releases to this method, external consumers of
the undercloud image not using tripleo-quickstart for libvirt
provisioning will be broken.

Change-Id: I7df1083291aa36cfef4aaacf9e345300ab5f4ed3
2017-03-02 20:14:06 +00:00