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
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
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
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
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
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
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
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>
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
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
Add a xenial nodeset and update the spec helper to install puppet 3 from
the Ubuntu repos instead of from puppetlabs.
Change-Id: I2ba699d58fe29854d078199c95dd3ea061086793
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>
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>
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
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
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
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
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
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
Use same target directory for zuul-cloner and
the regular git command.
Change-Id: Ic0079d1de6549c8b21974fc18cc6e8858e22aa44
Co-Authored-By: Fabien Boucher <fabien.boucher@enovance.com>
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>
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
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
Create an initial pip.conf file and allow passing
several settings such as index url and trusted
hosts.
Change-Id: I78962555c9a9ec1a96ce19810a463a5d619b04f9
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
* 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
* 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
* 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
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
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
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
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