Commit Graph

21 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov d9df50f4e3 Retire pip_install role
As repo_build role has been succesfully replaced with
python_venv_build role, we have no need in it's futher maintaining and
releasing.

Depends-On: https://review.opendev.org/717715
Change-Id: Ibf9ce1d602c5cfa9ed7431ca37de02df3335b36a
2020-04-06 14:27:00 +00:00
tonybrad eaf4153d9b Update to opendev
Change-Id: Icac06b9262f23b48c7677780c39f2ed10a7b8b3f
2019-05-21 08:58:39 +00:00
Jesse Pretorius 70b8cd5737 Disable the pip version check
In our logs it is frequent that the warning to upgrade the
pip version is present, but this warning is unnecessary as
we are always using a well tested version of pip.

To reduce noise, we set disable the version check. This has
the added benefit of not adding more internet access to every
pip task than is necessary.

In the template we ensure that the var is interpreted as a
boolean (in case of user error), then force it to lower case
as that's what pip prefers in pip.conf.

We also now remove the test for the self check file, as it
will no longer be present with this option implemented.

Change-Id: Ie0427d3435270836302441b92eaff7e7980d7047
2018-04-20 14:31:55 +01:00
Markos Chandras 40373daf7e tests: Do not always fetch the get-pip.py script during tests
Since we are testing the idempotence of this role, we shouldn't
fetch the get-pip.py script on every iteration so we set the variable
to 'false'. Moreover, we bump the PIP version to 9.0.3 since this is
what is currently being deployed on the hosts. Finally, get-pip.py
uses --force-reinstall by default which means that everything is being
reinstalled all the time and this breaks idempotence. We can fix that by
simply checking if a suitable version of PIP is installed and then use
it to do a proper upgrade.

Change-Id: I998182eca9851d2cc745930fc73ca37bfefd0951
2018-04-20 13:50:21 +01:00
Jesse Pretorius 2f3108f06d Remove tests-repo-clone.sh
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.

Change-Id: I0f23bdd498023c6fdd4e9f8fdf17a833162f7452
2018-03-28 10:17:11 +01:00
OpenStack Proposal Bot fdff01bc93 Updated from OpenStack Ansible Tests
Change-Id: Ifbddbe694270d383876b1529e4916c635cdbf967
2018-02-14 20:07:54 +00:00
Jean-Philippe Evrard 83d60368d4 Initial OSA zuul v3 role jobs
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.

Change-Id: I1c1ebe6a86472acc8c19926e8d2790c3e1ba4812
2017-10-17 18:20:24 +00:00
OpenStack Proposal Bot aed9133a66 Updated from OpenStack Ansible Tests
Change-Id: I16dc98899fc7347f93e3f88cf2ba812a8382f624
2017-10-12 20:45:16 +00:00
Jesse Pretorius (odyssey4me) 89374c70bb Revert "Make initial pip install use constraints"
This reverts commit 35809a2fff.

Unfortunately this is trying to force a downgrade for
gating which results in failures. I'll need to re-work
this to do things a little differently.

Change-Id: I8d29d5f17c87cfd88847734ab9d96354b7f1706d
2017-07-20 13:31:06 +00:00
Jesse Pretorius 35809a2fff Make initial pip install use constraints
The get-pip script allows the use of constraints now,
so to provide the maximum protection we should use
it. This also reduces one of the places where we need
to do package pinning.

Change-Id: I4618615b84618401359b5c5c6f51512e6c9a697e
2017-07-14 14:28:45 +01:00
OpenStack Proposal Bot 2b37617c35 Updated from OpenStack Ansible Tests
Change-Id: I276d0967a7ee41641a5242ce5af74e9b42410c75
2017-06-22 15:20:14 +00:00
Jesse Pretorius a8410456ee Use zuul-cloner for tests repo in OpenStack-CI
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.

Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
Change-Id: I182a92b547f0e0bca420460668ff2ec26dab5a28
2017-05-04 11:41:30 +01:00
Jimmy McCrory 289531e46b Enable idempotence test
Tasks involved in the online install of pip have been made idempotent
and the idempotence test has been enabled.

The selfcheck.json file will only be written if it does not already
exist. Blocks have been added to tasks that have a fallback if they
fail. Tasks that run commands to install or download pip packages now
check stdout for success messages to determine if they should be marked
changed.

Change-Id: I0d440efd4d95420f6f43316f5e0242b8884293c8
2017-04-05 12:19:20 -07:00
Jesse Pretorius 92fbfc238d Add ability to set upper constraints file
When this role executes the installation of packages
for SNI support it should also respect upper constraints.

This patch adds the ability to set an upper constraint
file URL/path.

The tox config is also adjusted to ensure that it makes
use of upper constraints when installing requirements.

Change-Id: I2ab6f55096b560a7b443de412df168e26a3eca07
2016-10-18 16:59:58 +01:00
Jesse Pretorius fd120da9ab Use centralised test scripts
This patch consumes the test scripts implemented by
https://review.openstack.org/375061 to ensure that
the tests and test preparation is consistent and
more maintainable.

Change-Id: I48828c386e4db600a099ebe700f823b811cbc88f
2016-09-28 10:51:19 +00:00
Kevin Carter 30d59585e8
Add SNI support via pip
Some Linux distribution releases, such as CentOS 7 and Xenial, have
trouble validating SSL certificates when using get_url with servers
that use Server Name Indication (SNI).

This patch adds packages for those distributions that allow Python
to validate connections with servers using SNI.

Change-Id: Idcf773e16d62d2ad76d9341177dd4d6c3e410af3
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-08-05 18:44:02 -05:00
Matt Thompson 17b5b32bb3 Test version of pip being installed
This commit adds a test to validate that we get the correct version of
a package when we override pip_packages.  This test may break if this
selected version of pip is removed however pypi still seems to have
0.2 which goes back to 2008.

Change-Id: I26afe6303bec560c10483d18472d4e8314a6f297
2016-03-02 07:32:13 +00:00
Jesse Pretorius 2ebd3b4d6b Update tox config and add bashate E006, E040 exceptions
This patch updates the tox.ini the same bashate exceptions as are
currently in the OpenStack-Ansible playbook repo.

It also ensures that the linters and all lint targets work
appropriately and normalises the tox.ini configuration to use
uniform formatting.

The use of ansible.cfg is removed as there is no way of being
certain which paths can be used without reverting to an ugly
sed hack in the commands. This is why it is preferred to make
use of environment variables which make use of tox's default
substitutions instead. It's a more reliable way of achieving
the goal for the purpose of gating and testing.

The switch to using a git clone instead of ansible-galaxy to
download the plugins is due to the path spec not being able to
work in Ansible 2.x. [1]

[1] https://github.com/ansible/ansible/issues/13563

Change-Id: I7b9bb6dd01df4dce0da3bb94525826a47880bf3b
2016-02-12 12:16:16 +00:00
Logan V fe9265b2c1 Fix pip url variable name
pip_get_pip_url changed to pip_upstream_url

Change-Id: I6e7ec4a05ca309e1759bde4adb9f79ad5046d052
2016-01-31 12:47:59 -06:00
Jean-Philippe Evrard 6ee6ede570 Use sudo for role testing
There are 2 ways to realize the privilege escalation
needed for the gate jobs.

1) Editing the playbooks (and hope to not forget to
write the sudo/become lines for every role)
2) Editing the inventory and set the variable there.

I'm taking the second approach with the minimum set
of variables (become_method is sudo by default and
become_user is root by default).

Change-Id: Ic90ec52b849c8e227084071e80cea87140a049d5
2015-11-25 13:01:08 +00:00
Kevin Carter 2dd4df9d3d
IRR for pip_install
The change moves the role out from the main repo pip_install
repository and into its own standalone repository.

Items within this change:
  * The role has been updated to ensure it runs standalone.
  * Tests added to the role within tox.
  * Functional tests added to the role that can either be run
    via the run_tests.sh script or using tox.
  * dev requirements have been updated for testing usecases.
  * Docs added to both the README.rst file as well as the docs
    folder.

Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-11-03 02:34:10 -06:00