Commit Graph

194 Commits

Author SHA1 Message Date
Ghanshyam Mann fd05df0293 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: I0b5c328f22d893f7d4e73935b31281f0f9826cd4
2024-02-24 11:44:26 -08:00
bshewale c73cb0f636 Added osp18 option for releases in get hash
Change-Id: I2ffe3d220e0876cafd0fe16c4f3b806b7c1b5259
2023-01-10 16:19:09 +05:30
Marios Andreou e6c52d0371 Temp disable verbose logging test and py39-sanity test
As described in related-bug the tripleo-repos gate is blocked
on failing tox-cover and tox-sanity-py39 jobs.

The verbose logging test is a nice to have but not critical and we
already have py39 coverage with openstack-tox-py39. The verbose log
test can be re-enabled once we have a fix but for now we need to
unblock the gate.

Related-Bug: 2002112

Change-Id: Ia7a1e840f878def13e454c44741fb30702d8a975
2023-01-09 13:07:08 +00:00
Marios Andreou 0e680e1f28 Add zed to tripleo-get-hash supported releases
This adds zed to the supported releases for get-hash. See topics
at [1][2] for related reviews.

[1] https://review.opendev.org/q/topic:oooci_zed
[2] https://review.rdoproject.org/r/q/topic:oooci_zed

Change-Id: Ic85253f6af06c2522c27ae0c9abc3814eb90dd02
2022-09-20 17:12:52 +03:00
frenzyfriday 13114fcaa0 Added 17-1 option for releases in get hash
Change-Id: Ic42e62d6f0f757dfefe008f39f9890ced8c4ba92
2022-07-18 17:48:46 +02:00
Chandan Kumar (raukadah) 8321b3fb5c Fixed the repo generation code for ubi9
It fixes:
- Mirror map for ubi9, rhel9
- fallback to centos(8,9) if ubi(8,9) distros are used.
- Look for both ubi8 and ubi9 where ubi8 is previously defined.

Closes-Bug: #1979178

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I530b4671154e975d527cb380eda8304fec0a7f82
2022-06-20 07:07:08 +00:00
Chandan Kumar (raukadah) 4c22ed1aeb Add RHEL/UBI 9 as a supported distros for tripleo-repos
https://review.opendev.org/c/openstack/tripleo-ansible/+/839688
moves the molecule job to use ubi9 image.

The molecule jobs are failing with missing packages as repos
are not properly configured.
Adding support for the same fixes the issue.

Bumping ansible version (which is supported in CI ) under tox.ini,
as latest version of ansible-2.13 broke the sanity job.

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I71572446cc8edb9f0bce3368fb03e4f2d3488801
2022-06-01 15:31:32 +05:30
Chandan Kumar (raukadah) c2e8943839 Use openstack-python3-zed-jobs template
Since Python 2.7 is gone EOL long time ago and C7 train is no
longer maintained, so removing it.

Python-3.6 is no longer works with Zed release so dropping it
and switching it to zed template.

From tox sanity environment, ansible-core-2.13 is getting
installed. In order to override that, we need to strictly
define it under tox sanity environment.

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: Id9b01070b8d187b85b9efade4af548871b2ad369
2022-06-01 15:19:00 +05:30
Marios Andreou cbbdde6cb6 Move zuul job layout to centos9 only for master
This replaces the ubi-8 container build job with the centos9 content
provider. Also replace the overcloud-full with hardened-uefi since
that is now default for master/wallaby.

Depends-On: https://review.opendev.org/c/openstack/tripleo-ci/+/826317
Change-Id: Ib3fbf6a0ed3e196893add875d6901b4dfd925827
2022-02-11 13:51:21 +02:00
Ronelle Landy 87c9879b91 Add temp ceph repo for nautilus
The 8 repos are now gone 404. Until the proper 8-stream repo is
available we can use the rdo temp repo for now to unblock gates.

Related-Bug: 1959656
Change-Id: Ic75b8a6b4bb9172a4e06370380a113df593990fe
2022-02-01 09:57:04 -05:00
Steve Baker c5df4a6aca Don't always validate distro name
When the output path is not /etc/yum.repos.d, the repo files won't be
used to install packages on this host, so there is no need to be
strict about host OS name validation.

This is useful when building CentOS images from a Fedora workstation.
If the host /etc/yum.repos.d is not used, the host distro is not
actually relevant.

Change-Id: I02b7a2a0d5dc6849fa04e298bce18657a9213621
2022-01-26 08:35:18 +13:00
Francesco Pantano 8c40273219
Keep centos 8 for train/victoria/ussuri with Nautilus
When Ceph Nautilus is used (Train/Victoria/Ussuri) Centos 8 repos
should be kept.
This is required because Nautilus has never been migrated to 8-stream.

Closes-Bug: #1958782
Change-Id: I8724c7225441a7717d189c19d63d3169239a91e8
2022-01-24 09:19:52 +01:00
Alex Schultz 4a6c30f891 Fix ceph repos for stream
In CentOS 9 stream the ceph repos are part of a SIGs namespace.
Additionally CentOS 8 is now stream only so we should use the 8-stream
version of the storage repos.

Change-Id: I015145ce615bffbd1ef0c76814688de4514b29a9
2022-01-19 15:12:28 -07:00
Zuul 66eb29abf8 Merge "Add CentOS Stream 9 support for tripleo-repos" 2022-01-18 16:06:22 +00:00
Marios Andreou 9484044f79 Add CentOS Stream 9 support for tripleo-repos
This patch adds support for CentOS Stream 9 in tripleo-repos
operation.

Co-Authored-By: Douglas Viroel <dviroel@redhat.com>
Change-Id: I0aa9c3c4feec9065c1d823e2bb783f4286304ddb
2022-01-13 18:31:28 -03:00
Zuul 1684191df4 Merge "yum-config compose-repos generation improvements" 2022-01-11 22:08:42 +00:00
Sagi Shnaidman c27cd26535 Install priorities of CentOS7 only on CentOS7 host
Change-Id: I29ffd3caa481fc94995ae0ba4c914ebee219aa89
2022-01-04 11:11:06 +02:00
Sagi Shnaidman 5ee86bdd9a Limit stream validation for CentOS 8 only
When preparing repos it doesn't make sense to validate 'stream'
for any distro except centos 8. Centos 9 is stream only and all
before 8 don't have a stream.

Change-Id: If6911737bf423806d1ec84ee4a5d147e74521719
2022-01-03 09:32:39 +02:00
Douglas Viroel 18699c4703 yum-config compose-repos generation improvements
This patch extends the yum-config to try to update a section if it
already exists when generation compose-repos. This allows scripts to
update an existing repo from a compose-url, and also update any option
based on environment variables.
This patch also avoids compose-repos to fail when a file to be disabled
does not exists anymore.

Change-Id: I7365f7918f3ffabdd47339ad38dd97f641fe5e31
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-12-21 08:12:06 -07:00
Zuul 2abb8bd32e Merge "Changed minversion in tox to 3.18.0" 2021-11-17 23:17:53 +00:00
Douglas Viroel 4012795760 Fix module name in load_logging function
After refactoring the log function to tripleo-repos utils[1], the module
name 'tripleo-get-hash' become hardcoded in load_logging function.
Now, this function accepts the module name as parameter.

[1]: https://review.opendev.org/c/openstack/tripleo-repos/+/815991

Change-Id: I6840870cf5b55ee1d47e3634009f1c5ec7045b6f
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-11-16 13:35:38 +00:00
Douglas Viroel 50c7cf01fd yum-config: add support to download repo from url
yum-config now support downloading a repo file from a url and
make updates on its options.
A new parameter 'down-url' was added to the cli and ansible module.

Change-Id: I6dba307be5e66892ecfba04df7766ae8dbbfa71e
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-11-11 08:04:34 -03:00
Douglas Viroel da713cb359 Moving common functions to tripleo_repos.utils
This patch moves common functions like http_get and
logging to tripleo_repos.utils so they can be used by
any module.

Change-Id: I8bdd11c45f30a70e2fe3349f7eecb89f4751931f
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-11-01 14:42:50 -03:00
Marios Andreou 5c34a98def Fix tripleo-get-hash tripleo-yum-config python installation
We are now consuming this as an ansible collection but it seems
we overlooked the setuptools setup.cfg install. For starters we
need the ansible module paths. Added a note to get_hash doc
about using --user for python setup.py install.
The depends-on is needed for the failing ubi-8 build job and is
not related to the change made here.

Depends-On: https://review.opendev.org/c/openstack/tripleo-ci/+/814400

Change-Id: Ie5655bea08e21ce59f259832fd16cd713f90c916
2021-10-18 10:28:38 +00:00
Marios Andreou ad2e89e613 Add centos9/rhel9 support for tripleo-get-hash
Updates the get-hash constants to allow centos9 and rhel9 as valid
choices for the os-version parameter. Adds a new test case that
tests all the valid values.

Change-Id: I93af3f7bd0b536cb3b3131b5a9d03a5c5b9731b6
2021-10-12 13:55:51 +03:00
Zuul de3736a739 Merge "Improvements to yum-config module" 2021-10-04 19:59:31 +00:00
Douglas Viroel 6dc45bb6b3 Enable CentOS-7 molecule jobs
CentOS-7 molecule jobs were recently disabled [1] after start failing
in get_hash tests. The proposed fix is update ca-certificates package
to avoid SSL issues originated from expired CA certificates.

[1] https://review.opendev.org/c/openstack/tripleo-repos/+/812125

Change-Id: I6508eb0795116f0a9aa6aa8c2edc589faa2039a6
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-10-01 15:53:57 -03:00
Marios Andreou ba1e852124 Disable centos7 molecule test for tripleo-repos
As seen at [1] this has started failing again now for get-hash.
If I skip c7 from the get-hash molecule then nothing else will run
they are already skipped. So instead just remove the c7 job for
now. TBD if we can/want to continue supporting python2.

Our CI centos7 jobs are using py3 already.

[1] https://zuul.opendev.org/t/openstack/build/a1d1693e963b42e3ae1e9cb44ea1f190

Change-Id: I4f8121c57c80d68a4233a4bc86fa86dc0f120913
2021-10-01 14:25:53 +03:00
Douglas Viroel 9efbbc2bcb Improvements to yum-config module
This patch adds a couple of improvements to yum-config module:
- change the default behavior for yum-config repo,
  which now tries to update an existent configuration file and,
  if the file does not exists, create a new one.
- Adds more options to repo config operation.
- Check OS version info before enable dnf-manager command.
- Add python2 support to yum-config 'repo' and 'global'.
- Update molecule to run yum-config 'repo' and 'global' tests
  for CentOS-7

Change-Id: I654fb32ad4e987b43baea17641aa60de86a78ff9
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-09-30 16:41:28 -03:00
Douglas Viroel a34103fffd Improve unit test coverage and molecule verifications
This patch adds more unit test to yum-config module and validations
to molecule verify step.

Change-Id: Icf4cd8463bcc5b466a6b0882e072874639ce117a
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-09-28 09:21:08 -03:00
Zuul bbb81ff8d4 Merge "Add module to generate CentOS Compose repos" 2021-09-23 15:10:26 +00:00
wu.shiming 00adabbfde Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I18820238e370fbd0836995a281b607da90871ef6
2021-09-22 13:49:26 +08:00
Marios Andreou ddaf9e7471 Add centos7 molecule instance for train/c7/py2 use-case
We had to make some changes like [1][2] to use get-hash with c7
for train. While we are still running those train/c7 jobs this
should help let us know if we break something for py2 support.

[1] https://review.opendev.org/c/openstack/tripleo-repos/+/808217
[2] https://review.opendev.org/c/openstack/tripleo-repos/+/809159

Change-Id: I7a0ef0fdbac3ad654dc29753929d78cf01e9b05a
2021-09-20 14:02:48 +03:00
Douglas Viroel 9bc5d12529 Add module to generate CentOS Compose repos
This patch extends yum-config funcionality to provide a module that
generates compose repos based on a compose URL.

Co-authored-by: Bhagyashri Shewale <bshewale@redhat.com>
Change-Id: I9f8dbede85e1c60de3a86991abcd53fc86444155
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-09-20 13:38:37 +05:30
Marios Andreou 6d878bb79b Adds python2 compatible http_get for centos7 train jobs
This adjusts the http_get function definition to work with python2.
In python3 we work with urllib.request.urlopen but for py2 we must
use urllib2.urlopen. This aims to fix the issue seen in [1] and is
needed by [2]. Adds the ansible-bad-import to the test ignores to
address issue seen in [3]

[1] https://logserver.rdoproject.org/92/35492/3/check/tripleo-ci-centos-7-content-provider/d906f0e/job-output.txt
[2] https://review.opendev.org/c/openstack/tripleo-quickstart/+/791486
[3] https://47bdf347398a802ddc78-6d4960ba8e43184f8d8ec59d1a3f8e83.ssl.cf2.rackcdn.com/809159/1/check/tox-sanity-py27/f45ffb7/job-output.txt

Change-Id: Ieb178fd9fb61284dbedea897a4841e3459e85300
2021-09-15 15:39:14 +03:00
Marios Andreou bdc952b6ec Remove type annotations for py2 compatibility add tox-sanity-py27
As seen at [1] the get-hash module [2] fails on centos7. Removing the
annotations should fix this.

Adds the tox-sanity-py27 job for sanity checking that we don't break
py27 support moving forward (until we can kill train).

[1]
https://ab16cb0adf1bbde868e8-d97d31900addfa62359a210d03244371.ssl.cf2.rackcdn.com/807269/1/gate/tripleo-ci-centos-7-content-provider/d1be2fe/job-output.txt
[2] https://review.opendev.org/c/openstack/tripleo-quickstart/+/791486

Change-Id: I289fc02a05fd0e550c5cc9ffeb14da0684d15ee9
2021-09-13 14:48:21 +03:00
Marios Andreou 7d591854b9 Fix config issue loaded default config and ignoring overrides
When dlrn_url is overridden it is being ignored and instead the
default is used. This makes it that the passed config is honored.

Adds molecule test case to check vanilla invocation and test
that passed dlrn_url is honored - test cases brought from WIP
patch in [1].

Co-Authored-By: Sorin Sbarnea <ssbarnea@redhat.com>
[1] https://review.opendev.org/c/openstack/tripleo-repos/+/807700

Change-Id: Ie5354421a470e5a528307694b49f4e8d2bc24ddc
2021-09-08 11:15:02 +03:00
Bhagyashri Shewale f1e7092812 Add molecule jobs to test the modules
Change-Id: I0b252e2fc7d34f54f739199bdce450b1bef8d20b
2021-09-03 10:59:34 +01:00
Sorin Sbarnea f482d7a6a6 Make ansible-test sanity voting
- symlink sanity ignore files
- exclude tests/unit from collection as they were causing multiple
  violations on sanity
- remove README.rst from collections as they can only have the README.md
- make sanity job voting to prevent regressions

Change-Id: Ifad87a22bec86734e9db4270f4de368ca91b1f67
2021-09-01 17:33:56 +01:00
Sorin Sbarnea 24c15b6286 Address pyyaml import in ansible module
Make pyyaml import lazy to avoid potential import failure when run
as an ansible module.

Change-Id: I49e08102f542c7be7005404ad5781fe5dc75af05
2021-08-20 15:48:30 +01:00
Marios Andreou 041c6d5a64 Add connection and status code check for tripleo get hash
Adds check that the response from delorean is 200 OK otherwise
error. Added test case to cover the new functionality.

Also removes the unnecessary gzip.decompress introduced by the
parent patch at [1]

[1] https://review.opendev.org/c/openstack/tripleo-repos/+/804221/5#message-86528e2d861606e0516fa3f54cea64e2391f80e2

Change-Id: I6e26310c9b67fe42f65ca6ee3d55f88cf59275f8
2021-08-17 12:34:56 +03:00
Sorin Sbarnea c31394e58c Fix tripleo.repos.get_hash module
- fixes import typo that prevented module_utils from importing
- avoids reading config.yaml as ansiballz does not include data files
- ensure module works (tox -e packaging)
- replace use of requests library inside ansible module

Change-Id: I86495c7da8584d5811f32178bbd985cf5f864323
2021-08-16 15:20:35 +01:00
Douglas Viroel 222e81c5ff Improve ansible module for yum-config
This patch adds small improvements to the yum-config ansible
module:
 - use type 'path' instead of 'str' for file/dir paths
 - use ansible 'requires_if' instead of generic sanity check
 - always convert 'set_options' dict values to str
 - other minor changes

Change-Id: If1ecb05cf5beb765decf6ac7827794c30040fc6b
Signed-off-by: Douglas Viroel <dviroel@redhat.com>
2021-08-05 11:13:36 -03:00
Sorin Sbarnea 854ca64d47 Fix pylint violations (sanity)
Story: TRIPLEOCI-559
Change-Id: I01c4bd54621bd8084d989f71a1c7835de84f432a
2021-08-04 08:08:30 +00:00
Sorin Sbarnea 1525e5e1fa Enable ansible-test sanity checks (nv)
Adds non-voting check jobs for ansible-test sanity and fixing many
problems identified by these. We will sort the other problems in
follow-up(s) and make the job voting. This approach will ease
reviewing and prevent creating conflicts with other pending changes.

Story: https://projects.engineering.redhat.com/browse/TRIPLEOCI-559
Change-Id: I29ce27114e0675fb5d00614df506675bfbe5bf96
2021-07-30 09:13:13 +01:00
Sorin Sbarnea 77dc5794ac Make tripleo-repos be an ansible collection
- assures ansible modules are not included in sdist/wheel
- makes tripleo-repos a collection with tripleo_repos python being
  vendored inside module_utils
- use a symlink from triple_repo to plugins/module_utils/triple_repos
  for convenience. Note that we cannot do the other way around because
  galaxy build does not follow symlinks, but pbr does not
  have any problem following the symlink.
- extend packaging testing to install collection and test Ansible can
  find the new modules
- updates the excludes inside galaxy.yml to avoid accidental inclusion
  of undesired files when building the collection.
- ensure we have consistent and logic names, making easy to use
  fully qualified ansible module names: tripleo.repos.get_hash and
  triple.repos.yum_config.

Change-Id: I743552a149513868de77cad0855a5c0dc0ae0f71
2021-07-22 17:20:57 +01:00
Sorin Sbarnea 0ecc6e0bbb Combine new modules into a single package
- Make newly added get_hash and yum_config modules part of
  triple_repos package.
- add simple packaging testing environment, which should validate
  installation of the command line
- moves tests/docs/examples in official location required by
  ansible-test
- includes required fix for looking up for local config.yaml

Change-Id: I134ef8ac4c31b98dc25d17ab058af1ed34e27f32
2021-07-16 14:59:19 +01:00
Zuul 06f41a630f Merge "Allow config overrides for TripleOHashInfo creation" 2021-07-14 13:02:00 +00:00
Zuul 2f694fbbc4 Merge "Add tripleo-yum-config ansible module" 2021-07-12 14:09:51 +00:00
Zuul 350cba65f5 Merge "Revert "Refactoring tripleo-repos"" 2021-07-09 04:31:53 +00:00