Commit Graph

52 Commits

Author SHA1 Message Date
Jeremy Stanley 971387d3ae Change get-pip url
The path for get-pip.py script in version 3.5 has been changed
with this commit [1].

[1] https://github.com/pypa/get-pip/commit/2360f02

Co-Authored-By: daniel.pawlik <dpawlik@redhat.com>
Change-Id: Id127620ac5c3d7be8bb85bf2dc37bc77248d400c
2021-03-08 14:20:13 +00:00
Jeremy Stanley b29f4ab14d Pin get-pip.py to last Python 3.5 version
We only support Puppet versions available for platforms up through
Ubuntu Xenial, which provides Python 3.5 as its python3 interpreter.
Recently pip, and by extension get-pip.py, ceased supporting Python
<3.6 but added stable URLs for the last releases to support earlier
interpreters. Switch to the URL for a get-pip.py which will still
work for Xenial servers.

Also fix a couple of new linter failures.

Change-Id: I042bfc330e4d562313cf0dbf2be7d0e2d5779f40
2021-02-11 01:55:37 +00:00
OpenDev Sysadmins 9305349f60 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:26:08 +00:00
Zuul 0065e85c52 Merge "Replace openstack.org git:// URLs with https://" 2019-03-25 17:00:37 +00:00
Zuul 0271a919e3 Merge "Fix openstack_pip provider for pip 18" 2019-03-25 14:40:24 +00:00
Ian Wienand 6cc2feb7a8 Replace openstack.org git:// URLs with https://
This is a mechanically generated change to replace openstack.org
git:// URLs with https:// equivalents.

This is in aid of a planned future move of the git hosting
infrastructure to a self-hosted instance of gitea (https://gitea.io),
which does not support the git wire protocol at this stage.

This update should result in no functional change.

For more information see the thread at

 http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003825.html

Change-Id: I8917a0c51d170602d9306cd4abb068d5bb3ad88d
2019-03-24 20:35:44 +00:00
Colleen Murphy 86e2b11b49 Fix openstack_pip provider for pip 18
The output of `pip list --outdated` is different for pip 18. This patch
adjusts the openstack_pip provider to handle old and new versions of
pip.

Depends-On: https://review.openstack.org/646023

Change-Id: I185116a2701688860fa5ca9f8ef34d6dbecd0174
2019-03-24 17:35:33 +01:00
Colleen Murphy 0d7e18d9d7 Block pypi.org for pip mirror tests
The beaker tests for this module use iptables to block access to pypi to
ensure the mirror functionality of the custom pip provider is working.
Pip now uses pypi.org instead of pypi.python.org and pypi.python.org is
a CNAME to pypi.org so it makes more sense to block pypi.org directly.
Also add iptables output for debugging purposes.

Change-Id: I370a403aef30dc42f3d614c5882138dac4f41ec8
2019-03-24 15:53:05 +01:00
Zuul 6c72d6e883 Merge "Update Gemfile for Zuulv3" 2018-08-01 22:55:08 +00:00
Colleen Murphy 8e1d497bc5 Fix tests for pip 10
On CentOS, the python-ipaddress comes with the python2-pip package which
comes installed on the test nodes. Uninstall it (and consequently the
distro pip package) so that the new pip can do the right thing.

Change-Id: I15fabb2bc2e1645c9045603575dfa52957398a2d
2018-07-14 16:53:17 +02:00
Colleen Murphy 429f763064 Update Gemfile for Zuulv3
The logic in the Gemfile was relying on Zuulv2 variables to find out
whether the spec helper gem was already available on disk, and since
Zuulv3 has changed things it was failing to find it and downloading the
master version instead. This patch ensures the Gemfile looks for the gem
in the right place when running in CI.

Change-Id: I8415e5759f05ad9b03196f2d8ca0f09635006efa
2018-07-12 09:57:45 +02:00
Zuul bdfb4e7591 Merge "Depend on helper gem for spec_helper_acceptance" 2018-03-26 21:59:46 +00:00
Paul Belanger bde44d13fc
Support /usr/local/bin/pip3 as pip3 provider
It would be possible to only install pip3 from get-pip.py script and
not has system packages for pip3.

Change-Id: I7b9dabd73d9caef37db1564c4a8358f01f995c2f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-11 12:23:08 -04:00
Jenkins 3c54ae46b1 Merge "Ensure curl is installed" 2017-08-25 01:12:18 +00:00
Clark Boylan 1c6e7f380e Trim the test package list to just shade
We were installing ~24 packages before. Problem with this is it takes
quite a bit of time and is subject to many external failures. Installing
just shade should still be a valid test of significant coverage as it is
a non trivial python package and we use it in quite a few places.

Change-Id: I9cefc83ff280ca00cb434dbe6a1a2357163bc8a6
2017-08-24 15:23:48 -07:00
Paul Belanger bd054ab0c0 Ensure curl is installed
Depends-On: I8b346cbfb908c5d2094c5e46ff008ef735b0e903
Depends-On: Icd0c652ff2f522ce2ea9086965f53e1a03f0d4fd
Depends-On: I17c119e81a035916550de44356b9f4badd505c81
Change-Id: Ia8e6bf0a0dd686933cd04a5e678d1f88ebdd8245
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-08-24 20:51:45 +00:00
Colleen Murphy d94f36a519 Depend on helper gem for spec_helper_acceptance
Instead of keeping a local copy of spec_helper_acceptance.rb and
requiring updates to all modules for any change, we can move it into the
common helper gem and require it from there. This will make it easier to
create and review changes that affect all puppet modules. Also change
the Gemfile to look for the gem in the local workspace if running in a
zuul environment.

Change-Id: I5c18fc44e41e14868c4dcc38bbd7ad09a960b5e8
2017-08-18 10:41:44 +02:00
Colleen Murphy 44090680a9 Fix beaker on xenial
Add a xenial nodeset and update the spec helper to install puppet 3 from
the Ubuntu repos instead of from puppetlabs.

Change-Id: I2ba699d58fe29854d078199c95dd3ea061086793
2017-06-11 17:39:02 +02:00
Paul Belanger 47ec7c8e0c Switch incorrect symlink order
All this did was symlnk pip2 to pip, which became installed by python3
on our previous run.

We need to properly revert this on our production systems now.

Change-Id: Ie27c4476ecea9d0a29f40400bbc3bdbe704905a6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-06-01 15:07:29 +02:00
Paul Belanger 35a83454f2
Add pip3 support
We are wanting to start running python3 applications in production, as
a results we need to ensure that pip3 is created.

Because get-pip.py will override existing pip executables, it will be
possible for an existing server to have is version change to python3.
As a result, symlink specifically to pip2 to ensure we have defaulted
properly to python3.

Drop Babel from acceptance testing, this appears to be a failure that
needs to be looked at in the future.

Change-Id: I8f78dfc62cd3745e900eec573e80236137ac5c78
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-31 14:39:00 -04:00
Dirk Mueller 4b3f7168ae Add support for Suse family
Change-Id: I92ac35151364c2390eddf2a8c71985049d3814c3
2017-02-24 14:04:28 +01:00
Alexander Evseev adf639e859 Fix openstack_pip provider to support old pip
Do not split string by hyphen and change regex to match both
formats - new (with hyphen), and old one like
  'pep8 (Current: 1.5.7 Latest: 1.7.0)'

Change-Id: I1eeda1b35ff35dfe8b8b0c6e948616a55f33df25
2016-06-28 17:30:30 +00:00
Alexander Evseev 89ea98ffb7 Fix search of latest package version
In case, when there is more than one obsoleted package, incorrect package
version is chosen.

For example:
/usr/local/bin/pip --version
pip 8.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)

/usr/local/bin/pip list --obsolete
alabaster (0.7.6) - Latest: 0.7.8 [wheel]
Babel (1.3) - Latest: 2.3.4 [wheel]
...
tox (1.6.0) - Latest: 2.3.1 [wheel]
...

Puppet output:
Debug: Executing '/usr/local/bin/pip list --outdated'
Debug: /Stage[main]/Jenkins::Slave/Package[tox]/ensure: tox "1.6.0" is installed, latest is "0.7.8"
Debug: Executing '/usr/local/bin/pip install -q --upgrade tox'
Notice: /Stage[main]/Jenkins::Slave/Package[tox]/ensure: ensure changed '1.6.0' to '0.7.8'

Change-Id: Ia46c10ef4220be47e34c08cfd2be69e8c349f73d
2016-06-22 16:01:10 +03:00
Spencer Krum 0c66a45f2e Use new infra_spec_helper for gem dependencies
Change-Id: I49b48e8282aed3c3c8c3596d7f8b7c8ff2ce7f41
2016-06-21 18:39:41 -07:00
Spencer Krum a099343d80 Declare features in openstack_pip provider
Puppet providers can express what features they can provide using the
has_features variable. The declaration of features isn't inherited, so
we need to declare the features that we inherited from the core pip
provider.

Change-Id: I2f4c6254bb7f45649658d6a6b296ea1270ce6364
2016-06-16 08:55:46 -07:00
Spencer Krum a4187111d0 Pin google-api-client; sanitize Gemfile
Change-Id: If829487c8c4d93235a1ade1afeed1b1ba2fe345d
2016-04-14 15:22:30 -07:00
Colleen Murphy 7f3957fa9a Add new pip provider to use pypi mirrors
The upstream pip provider hard-codes pypi.python.org as the index to
search when determining the latest available release of a package. This
means puppet won't use our mirrors on the second run of a pip package
resource using ensure => latest. This patch adds a new provider that
inherits from the upstream one and overrides the latest() method to
just use `pip list --outdated` to see what the latest version is. This could
potentially be proposed upstream in the future depending on what
versions of pip support 'list --outdated' and what systems require
support.

To use this, package resources currently using the 'pip' provider will
have to switch to the 'openstack_pip' provider.

Change-Id: I6c24c8f99fb3f879a30d21f38d1ad883f96f7937
2016-04-08 09:12:39 -07:00
Colleen Murphy d5655ff4d1 Fix pip executable path for RH
get-pip.py installs pip to /bin/pip on centos 7. Without this fix, the
download-pip exec will keep trying to install pip whether or not it is
already installed on our base images or by puppet.

Change-Id: Ic5bcce59148aacedc61315e616317fc73c2c161c
2016-04-06 13:26:46 -07:00
Andrey Nikitin 63ef1497e2 Order of the class parameters is refactored
Order and intendation of those parameters are changed
to follow Puppet Style Guide recommendation [0].
Moreover, it will allow to an user to find much faster
a variable in a list of variables.

[0]. https://docs.puppetlabs.com/guides/style_guide.html

Change-Id: I1c319006878007d9d93a201a40c70843fa1bcf21
2016-03-21 18:08:19 +03:00
Jenkins 7959d3d4ca Merge "Allow to send optional values to configuration" 2015-10-09 13:39:16 +00:00
Jenkins ce2e739614 Merge "Fix the puppet-pip module to install pip" 2015-09-24 19:58:31 +00:00
Ricardo Carrillo Cruz b34777a383 Fix the puppet-pip module to install pip
The class pip does not install pip, as one
would expect.
This fixes it.

Change-Id: I926cbfc1f65805c29a72597eede8c47228bdee30
2015-09-02 09:03:42 +00:00
Spencer Krum 066123cae9 Fix target path for regular git clone during tests
Use same target directory for zuul-cloner and
the regular git command.

Change-Id: Ic0079d1de6549c8b21974fc18cc6e8858e22aa44
Co-Authored-By: Fabien Boucher <fabien.boucher@enovance.com>
2015-08-19 16:40:58 -07:00
Jenkins 7dc1c7697b Merge "Fix warning on puppet-pip about trusted-hosts" 2015-08-10 15:13:21 +00:00
Paul Belanger a0d714c7cf Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things
that can be helpfully predicted by puppet lint plugins.

Change-Id: I498052d2db57e571f0f91cd2c2e43e39c693331f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-08-06 14:11:06 -04:00
Yolanda Robla 4906bf3178 Allow to send optional values to configuration
Under certain situations, is useful to send some
extra configuration to pip.conf, such as the retries,
timeout, etc...
This change allows to pass extra values as optional
settings to the template.

Change-Id: Ibcf431a17717fb7f8b8f501603f035fd9456def4
2015-08-03 17:29:58 +02:00
Yolanda Robla 652b6efb40 Fix warning on puppet-pip about trusted-hosts
Change-Id: Ieef9d04d9f94746b76aaca0d218a4e220f79fbbf
2015-08-03 13:43:34 +02:00
Spencer Krum d461920848 Boilerplate beaker-rspec files
Change-Id: Ibf0ab54f5240968e82b22626a2fb4a444a87da31
2015-07-28 02:05:28 -07:00
Jeremy Stanley 4271705bd6 Replace ci.o.o links with docs.o.o/infra
The http://ci.openstack.org/ documentation site has been deprecated,
replaced by redirects to corresponding paths within
http://docs.openstack.org/infra/ where other Project Infrastructure
documentation already resides.

Change-Id: I8c2af9695ee29c04e3193c5b1e903fe435b3dea4
2015-05-14 21:38:18 +00:00
Ramy Asselin 03a0829728 Rename openstackci to openstackinfra
Change-Id: If3f3bb46b358e0302ca8d1a0806893794640d3d5
2015-04-20 13:46:08 -07:00
Yolanda Robla 754d3c1539 Add the ability to set pip.conf and configure it
Create an initial pip.conf file and allow passing
several settings such as index url and trusted
hosts.

Change-Id: I78962555c9a9ec1a96ce19810a463a5d619b04f9
2015-04-10 08:18:22 +02:00
Ramy Asselin 88c1e708d4 Add puppet module files for pip
Change-Id: I2d282f5fa26b150853f480bf3531af8e75bc2b51
2015-01-29 15:18:19 -08:00
Monty Taylor cb3ce4d802 Install pip using get-pip in launch node
packaged pip vs. upstream pip gets the systems very broken. Make launch-node
use get-pip to install pip as per:

http://www.pip-installer.org/en/latest/installing.html

Change-Id: Ice28b47d766c04b42462a7297911dc1a1abe5a77
2013-12-18 20:03:39 +00:00
Jeremy Stanley 004b738c35 No longer link pip to pip-python on Red Hat
* modules/pip/manifests/init.pp: Remove the symlink workaround for
older python-pip EPEL packages since current versions now provide
/usr/bin/pip directly instead of /usr/bin/pip-python. The latter has
been switched to a symlink itself, so without this change in Puppet
we get circular symlinks and no executable.

Change-Id: If09a9c2a511dcc9ae845833543e304f1459fdeb2
2013-08-06 23:45:46 +00:00
Jeremy Stanley 5e7c0d558d Make pip3_cmd a class method.
* modules/pip/lib/puppet/provider/package/pip3.rb(pip3_cmd): The
instances class method was attempting to call the pip3_cmd instance
method, which does not work. Instead define a self.pip3_cmd method
it can call and then delegate the pip3_cmd instance method to that.
Also corrects an error message typo in passing.

Change-Id: I8a7b7ce353ac4293c2d7b82999402fa47dde6051
Reviewed-on: https://review.openstack.org/35708
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-07-12 22:46:21 +00:00
Jeremy Stanley 7eaa598916 Don't symlink pip on Fedora.
* modules/pip/manifests/init.pp: Fedora installs /usr/bin/pip and
thus doesn't need a symlink there like CentOS and RHEL do.

Change-Id: I2da3d5ed11db94da3ee2c3c7cae96c76e124dbd5
Reviewed-on: https://review.openstack.org/34081
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-06-25 21:40:18 +00:00
Dan Prince f73260ecd8 Add pip::python3 module and pip3 provider.
Adds python3 support to our pip package. Also adds a custom version
of the pip package provider which can be used when installing
things w/ python3-pip is explicitly required. For example:

  package { 'tox',
    provider => pip3,
    require  => Class[pip::python3],
  }

Change-Id: I1b563c8f7e647dad3a134ef1f0ec5b45b63f8b71
Reviewed-on: https://review.openstack.org/32451
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
2013-06-24 21:54:56 +00:00
Jeremy Stanley c63516f503 The facter osfamily of Ubuntu is Debian.
Clean up facter osfamily matches to just use Debian, not Ubuntu.
This is manually tested and confirmed to at least be the case on
Oneiric, Precise and Quantal.

Change-Id: I27b184ac419910f9c3271c3b4e57886333282a5f
Reviewed-on: https://review.openstack.org/27399
Reviewed-by: Spencer Krum <krum.spencer@gmail.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-04-25 21:37:00 +00:00
Jeremy Stanley 94496f8434 Jenkins slave puppetry for CentOS.
The install scripts now look for CentOS in release files. Also some
instances of facter's operatingsystem are switched to osfamily and
capitalization of RedHat is normalized to match what facter uses.

Change-Id: I3bbca5481d0d5e6de9e62bfd6e2b0a85264ed6ed
Reviewed-on: https://review.openstack.org/27398
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
2013-04-25 21:36:58 +00:00
Dan Prince 2a7c4b3d83 Update pip module to support Red Hat distros.
Adds a new pip::params module where we set parameters based on
the operating system.

Updates the pip::init module so that it makes use of distro specific
parameters.

Also, includes a change to pip::init so that a soft link is
created for /usr/bin/pip (pointing to /usr/bin/pip-python). This
is required in order for the Puppet pip provider to work on Red Hat
distributions. Seems like we should push a fix into Puppet for this
as well but having this live here for now seems reasonable.

Change-Id: Ifee6bc42fabcf65ee1241ffac38f3bead7335be1
Reviewed-on: https://review.openstack.org/18904
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
2013-01-17 18:24:16 +00:00