Commit Graph

41 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov c2c71cac9f Use curl to download u-c
In functional tests we don't ensure that wget exists. Also for Ubuntu
we ensure that curl is present only. So let's replace wget command with
curl and be consistent across repos.

Change-Id: If9106bd0a481079b9e676c5547e244a11a35fb73
2022-12-28 14:50:57 +01:00
Jonathan Rosser 5a80c5f145 Pin tox version to less than 4
Change-Id: Ie8d18b0d1a588e8a5619394be6c9c758e87b30cd
2022-12-12 08:34:44 +00:00
Dmitriy Rabotyagov 046ecd4abc Switch CentOS 8 Stream to 9 Stream
Change-Id: If030c646e9c79b55b206fdca51d0b5555286c31b
2022-12-01 09:20:54 +00:00
Jonathan Rosser ecec4ecca7 Fix python installation for centos 8 stream
This must be python3.8 as we use this version in the integrated repo
and require it for ansible 2.12

Change-Id: Ia326d92c24b9cdfcf46011e0661a9b5081e11573
2022-05-31 16:58:53 +01:00
Neil Hanlon b4c12a25c7 Update tests for Rocky Linux
Change-Id: Ia2d5e704d3d4918f8d55f2102a3c4bef59dab303
Signed-off-by: Neil Hanlon <neil@shrug.pw>
2022-03-28 14:48:15 +00:00
Jonathan Rosser 4eac7fd2c1 Clean up code from unsupported operating systems
Remove SUSE, Gentoo, and references to yum package manager.

Change-Id: If591661b4145219f7837960f93bc9647b60d2a70
2021-03-11 23:08:21 +00:00
Jonathan Rosser 7fb5312be3 Unpin virtualenv version
This is required to allow the latest cryptography wheel to be
installed from pypi

Change-Id: I351b3f2ae458abc14a899768a04999ca10c86ea4
2021-02-09 14:03:38 +00:00
Dmitriy Rabotyagov b4426f7312 Bump virtualenv to version prior to 20.2.2
Recently released virtualenv breaks linter jobs. In order to prevent this
we temporary fix it's version before this release

Make centos-8 job non-voting as fixing centos 8.3 creates a circular
dependancy on this patch.

Change-Id: I1dc269944445a1493c0008d9f318db56d9f0274f
2020-12-08 12:05:13 +00:00
Jonathan Rosser bb630f047f Use pip and virtualenv from host packages rather than get-pip.py
For focal, using pip to install python tools to the host results
in a incompatiblity and subsequent job failure when openstack_hosts
later installs the distro package for virtualenv.

The python_venv_build role then fails to be able to create a virtualenv.

This patch changes the host setup in the tests repo to be the same as that
in the integrated repo.

Change-Id: Ief99ea7e969f67130be68ac437b4b16be80cb088
2020-10-06 16:44:37 +00:00
Jonathan Rosser 6403dd594e Remove Centos-7 support
Ussuri is the last release that openstack-ansible supports Centos-7.
Remove support for Centos-7 for Victoria.

Depends-On: https://review.opendev.org/742166
Change-Id: I3e3cda925b9bf8361f2c3a8d6b2a226e50974001
2020-09-22 12:26:52 +00:00
Dmitriy Rabotyagov f7285bd256 Do not set alternatives before package is present
Change-Id: I29869ee24fe7148c6dce7ed8e149c3960b2f82ec
2020-06-11 15:06:25 +00:00
Zuul 87e5eb86e9 Merge "Deploy modern ara for CentOS 8 deployments" 2020-05-22 06:53:56 +00:00
Marc Gariepy 0b59539f55 Deploy modern ara for CentOS 8 deployments
As CentOS 8 is not compatible with old ara, we installing new one isnted
Also providing py3 as default python for CentOS 8

Change-Id: I264e6f8bfa507668dada7b629af52a8a13001a45
2020-05-22 00:25:15 +03:00
Jonathan Rosser 54e1b78f80 Remove workaround for missing debian stretch security repo
Debian stretch is no longer tested on OSA master branch and this
workaround should no longer be needed on stable branches

Change-Id: I4aa9ca3b95cbfb6afa9a0137fceeb3fc4971e284
2020-05-13 11:56:28 +01:00
Jonathan Rosser 9337337d1d Ensure that curl is present for functional tests
The debian buster cloud image does not have the curl package
installed to ensure that it is present to for running local tests.

Change-Id: Ica95754ca4b3af73cbcad3227d2bffb905d72817
2020-05-13 11:47:35 +01:00
Andreas Jaeger 74797e4291 Use "pip -m install"
Currently, we are overriding 'install_command' to use 'pip'. This is
considered poor behavior and 'python -m pip' should be used instead:

https://snarky.ca/why-you-should-use-python-m-pip/

It turns out that this is the the default value provided by tox:

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

So we can remove the line and simply use the default value - after
adding constraints to deps as is best practice as well.

Mosts tests itself use "pip install" in the shell scripts which sets
also the constraints. Change that to "python -m pip install" like done
for tox.

Change-Id: I27f80d8aa4ac3688ee56e8a9234e34f4e09afe34
2020-04-26 14:48:25 +02:00
Jonathan Rosser b4355c9360 Install python3 tools and libraries instead of python2
Change-Id: Ibe3b9fe5f3ec46524c7ac039789163d77dacb710
2020-03-10 14:44:33 +02:00
Jonathan Rosser 220b4ecac2 Pin version of tox used for Centos-7 tests
Tox has virtalenv as a dependancy and will install it using pip during
tox installation if a suitable version is not present.

This patch pins the version of tox to one which is compatible with the
version of virtualenv in the centos-7 python-virtualenv distro package.

Without this patch, tests which include the openstack_hosts role
will install the python-virtualenv distro package on top of the pip
intalled virtualenv from the tox install, and this results in a broken
package and the test fails.

Change-Id: I0c07bc46f5b9a519232620f2d79d6a894f317921
2020-03-03 18:15:57 +00:00
Jonathan Rosser 26a329d79f Temporary overwrite of the infra mirror for debian security repo
Change-Id: I7c41f560251e16256a5d109fddedee189eb12664
2019-10-08 09:14:09 +00:00
Dmitriy Rabotjagov 1084ff6d5a Fix non-interactive mode for apt
Since sudo was laucnhed after setting DEBIAN_FRONTEND variable,
noninteractive wasn't working correctly during bindep installation.

Also patch includes temporary fix which is generally adressed in [1]
This is implemented to resolve cross-dependency and will be rolled
back once general fix will land.

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

Change-Id: I44c6aa7a0266285ca67edca70cdc4450c64671d9
2019-06-14 20:17:50 +03:00
Matthew Thode 63dbdfe819
add Gentoo jobs as non-voting
Depends-On: https://review.openstack.org/608325
Depends-On: https://review.openstack.org/608393
Depends-On: https://review.openstack.org/633092
Depends-On: https://review.openstack.org/633093
Depends-On: https://review.openstack.org/633152
Depends-On: https://review.openstack.org/633289
Depends-On: https://review.openstack.org/633394
Depends-On: https://review.openstack.org/633385
Depends-On: https://review.openstack.org/633423
Depends-On: https://review.openstack.org/633424
Change-Id: I8ca881dc47ae26de0caee75385e302396c99bf42
2019-02-22 13:49:51 -06:00
Jesse Pretorius 3e807d9186 Clean up unused upgrade test tooling
It has been discussed and decided at the last two PTG's
that upgrade testing in roles is broken in the current
state and that we need to make use of the integrated
repo for upgrade tests. As such these old tools are no
longer required.

Change-Id: I46756bc0db6baa9487dffccce3e64cd5d035fd3c
2018-10-25 14:53:02 +01:00
Dave Wilde 178506f624 Update get-pip to version 3.3
Version 3.2 has a bug with it on some systems that can result in the
following stacktrace: [ http://paste.openstack.org/show/726064 ]. To
correct this issue the version of the get-pip script has been set to 3.3
which does not suffer from the same issue.

Change-Id: Ib551c8627351ba23d3c1a67a9631f58fdd2157a7
2018-07-17 11:09:24 -05:00
Jesse Pretorius aa0a76ce9c Pin get-pip.py to 3.2
As get-pip.py evolves based on pip 10, while we're still using
pip 9, changes in the way it can be used are causing problems.

For example, the ability to use --download is no longer there.

As such, let's pin to a known good version and leave it at that
until we no longer need to use this script. Version 3.2 maps to
pip 7.1.2 which fulfills our needs.

Change-Id: I6aa297ee6e1ca3a76f016a6a0c3d4a735433a9b2
Closes-Bug: 1779534
2018-07-04 08:23:41 +00:00
Mohammed Naser 2edd1d1c6e Remove dependency on EPEL
The EPEL repositories currently conflict with the RDO packages,
this commit drops it from openstack_hosts so new installs do not
get it.

Change-Id: I25d585c25d2b7a3e8bbf3d96060050f3426ed4a7
2018-06-07 13:59:05 -04:00
Matthew Thode 0f30bd0d7c
Add support for testing on Gentoo.
This patch adds support for running run_tests.sh on Gentoo by
extending the package install functionality.  It also switches git to
only be installed if not already available.

Further, there were some escaping issues that needed to be fixed and are
now fixed.

Change-Id: I89c2fe488ead4721f8b55b285ce932c26e05401b
2018-04-24 11:35:56 -05:00
Jesse Pretorius 2a9a493236 Re-use run_tests.sh variables in run_tests_common.sh
To be slightly more efficient, we re-use the package
manager determination and the distribution information
already collected in run_tests.sh

Change-Id: I0aff2a5c3a33cbaf5f155aaaefd680c4d53644b5
2018-03-27 10:12:31 +00:00
Jesse Pretorius 0a4ac2a1c7 Have run_tests clone the test repo
Current run_tests.sh executes another script (tests-repo-clone.sh)
to clone the tests repo. That script therefore has to be replicated
out to all the other repositories too.

In order to try to reduce the footprint of things that need to be
replicated out to the repositories, we fold the tests repo clone
into run_tests.sh and move the clone of the previous tests repo
into the common test script. We also remove the conditional for
the previous test repo clone as it does no harm to always have it.

To reduce the maintenance when creating new branches, we key the
branch to be cloned by run_tests.sh to the content in the .gitreview
file. This way as soon as a branch is created and that file is
updated, the right branch is cloned and the system becomes self
maintaining.

Some extra comments are added to explain the purpose of variables/
commands and the install_pkg_deps function is changed to just be
in line script as the function is no re-used anywhere else.

We change the set vars in the common script to add x and remove v
to reduce the output verbosity and only output the useful stuff.

Finally, the linters job definition is changed so that it uses
run_tests.sh to execute the lint tests. This simplifies the job
definition and also ensures that zuul runs tests in the same way
that humans do.

Change-Id: I9f26f4f438715ce6361cc9960f58f2d256c5a839
2018-03-26 18:18:05 +01:00
Markos Chandras c28727540d run_tests_common.sh: Add more openSUSE packages
We need to explicitly pull the python-xml and ca-certificates-mozilla
packages which may not exist on really small openSUSE images. These
packages are needed for a functional SSL setup and also for being
able to run pip.

Change-Id: Ib518cff03dbfdbfa7c31729521c265e7a3e7e9cf
2017-11-27 16:13:03 +00:00
Jesse Pretorius d1ce33a4f0 Revert opensuse workaround and make opensuse non-voting
This reverts commit f69d088d1d
as it was meant as a workaround while the infra mirrors are
sorted out.

As we're getting failures for opensuse jobs due to timeouts
with the upstream mirrors we're forced to switch all opensuse
tests to non-voting until the infra mirrors are fixed.

Change-Id: I50b50f3d098a83010d6411f8ea09fbce9ae7f638
2017-11-20 15:50:51 +00:00
Kevin Carter f69d088d1d Force SUSE repo refresh and switch default mirror.
This change forces a repo refresh whenever running tests on SUSE. This
is needed to ensure all of the repos are up-to-date and we're pulling
package from the correct sources. This also sets the default mirror
to download.opensuse.org since the OpenStack mirrors are outdated due
to rsync.opensuse.org being broken. See https://progress.opensuse.org/issues/27699

Change-Id: I9f2a1f98981cdb444c2162b09c02f6e530f5d1c2
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Signed-off-by: Markos Chandras <mchandras@suse.de>
2017-11-17 12:59:55 +00:00
Major Hayden 9c55b07d8a
Hide yum-config-manager output
Change-Id: I2a773d1b3316e7ca2e12cd4e93898a1d0312263e
2017-10-26 08:02:10 -05:00
Major Hayden af86dc9482 Add Fedora support to bindep install step
This patch ensures that the bindep install step includes a
section for Fedora. I'm not sure why this wasn't present
already.

Change-Id: I82d6c46f62aaf4341f02fab7e3270650c40d65ee
2017-10-17 17:26:46 +00:00
Major Hayden bf64155b3f
Add fedora to run_tests_common.sh
Change-Id: I0411082d23a81a8412e93d19bcb9a8675ccadb7f
2017-08-25 12:40:17 -05:00
Major Hayden 94358836b3 Don't install redhat-lsb-core twice
This patch puts both of the yum install tasks together and avoids
a request for installing redhat-lsb-core twice.

Change-Id: Ib26f5890cdb17a1b10a689c66c377051faefc939
2017-08-04 14:09:28 +00:00
Major Hayden 9519c5bcfd
Install yum-utils on Fedora
This patch ensures that redhat-lsb-core and yum-utils are installed
on Fedora systems. This is needed for bindep and yum-config-manager
to work.

This bug is blocking the ansible-hardening gate.

Closes-Bug: 1708479
Change-Id: I706b6f5f16ad7e6b86226830e2bceab2cda28227
2017-08-03 10:47:56 -05:00
Major Hayden 354eb1ac81
Add dnf support
This patch adds dnf support for CentOS.

Implements: blueprint centos-and-dnf
Change-Id: I0609d79e98d773af8e431bd520b04a2c893211bc
2017-08-02 15:02:02 -05:00
Markos Chandras 7350581333 run_tests_common.sh: Ensure EPEL is enabled
In OpenStack CI, the EPEL repository is installed but disabled. As
such we need to make sure that we enable it before we run our tests
since it's required by some packages.

Link: https://review.openstack.org/#/c/478095/
Change-Id: I87bc98a76470119edccf4169e5cb78d05c2cdb49
2017-07-06 09:07:57 +01:00
Major Hayden 8be9210098
Ensure common tests run on RHEL/AMZN
This patch ensures that Amazon Linux, CentOS, and Red Hat Enterprise
Linux systems can utilize the run_tests_common.sh script. The
ansible-hardening role uses this script now.

Change-Id: I7e7a6d715e2f4c3a8ee8086fe696be61c9888834
2017-06-29 10:33:30 -05:00
Markos Chandras cb3897122d run_test_commons.sh: Only install ndg-httpsclient from pip on Leap 42.1
Newest openSUSE Leap releases have python-ndg-httpsclient in
the repositories so there is no need to get it from pip anymore.

Depends-On: I1a53eb835ed07614e1d2a27d7cb8d7c652f8b691
Change-Id: I9365f9a161db65401f964de1982b7950c0a16e92
2017-04-26 09:27:49 +01:00
Markos Chandras 2569e363f4 run_tests.sh: Add run_tests.sh script for OSA repositories
Rename the 'main' run_tests.sh script to run_tests_common.sh and add
the run_tests.sh script which should be copied across all the OSA
repositories. This script prepares the host for executing the tox
tests and then calls the main 'run_tests_common.sh' script from the
openstack-ansible-tests repository.

Change-Id: I1a53eb835ed07614e1d2a27d7cb8d7c652f8b691
2017-04-26 09:26:34 +01:00