Commit Graph

17 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov f72de305b8 Retire openstack-ansible-repo_build 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: Iaf1d6da8192afbbd18c64e2b58d54fa5804fe43c
2020-04-06 14:30:36 +03:00
Georgina Shippey dcd9469411 Replace usage of netloc filters to urlsplit
Remove the references to netorigin and netloc_no_port as they will
be taken out from openstack-ansible-plugins

Now using ansible 2.4's urlsplit filter as a replacement.

Change-Id: I94302ced3e5d6faa4d8748590f323e89d9b7280c
Related-Bug: #1820830
2019-03-21 15:08:52 +00:00
Jonathan Rosser 8634532731 Fix ansible deprecation warnings
===
[DEPRECATION WARNING]: Using tests as filters is deprecated.
Instead of using `result|search` use `result is search`. This
feature will be removed in version 2.9.
===

Change-Id: If7ca8c8e749209ca3e021fd4604ff809d9e3a5db
2018-12-03 17:18:45 +00:00
Jesse Pretorius ecff328ed6 Ensure pip/setuptools/wheel are up to date in the wheel build venv
To ensure consistency, we make sure that the venv used for the wheel
build has an up to date and the right versions of pip/setuptools/wheel.

Change-Id: Iac3e5054b5ef482bba2954e40c2c4d32a7f863df
2018-11-02 15:01:35 +00:00
Jesse Pretorius b1148411cc Remove venv build process
The packaged venvs are no longer used by any of the roles,
so we remove the whole process.

Change-Id: I086c7f53f90c11969f56391551a573e1bd526c50
2018-09-22 19:29:45 +01:00
Zuul 1b14f522d4 Merge "use include_tasks instead of include" 2018-09-08 21:02:23 +00:00
ZhijunWei ead5ec8589 use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: I5b9e7be4c7212e3c483d2c65746629416cd309f2
2018-08-19 12:17:12 -04:00
zhulingjie 4a6aeadd43 Remove the unnecessary space
Change-Id: Ib65b3644fe375978b84a85938efbd09437862cbe
2018-08-18 00:58:22 +08:00
Jesse Pretorius d7acac1b99 Use a venv to build the python wheels
To limit the python packages installed on the host,
all packages installed by pip are implemented into
a venv.

While many of the repo_pip_packages may be available
via distribution packages, the versions vary wildly.
We therefore opt to use a venv instead to keep things
simple.

This reduces the requirement on the host to *only*
require the virtualenv package which is installed in
the openstack_hosts role.

The 'virtualenv' package is removed from the list as
it is not used.

Change-Id: I0619f51960e23756df7010d476d70f55ceda8441
2018-08-07 22:02:10 +01:00
Jean-Philippe Evrard 026c6eb2fd Fix usage of "|" for tests
With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.

This should fix it.

Change-Id: Idea3c1336b5dd10bd9dfc075587cc130a0a34449
2018-07-12 17:00:41 +02:00
Jesse Pretorius de46da9d14 Allow repo host packages to be upgraded before repo build
To cater for a situation where the repo build packages are changing,
but the repo does not yet have the package built, we need to ensure
that the install task for it can fetch from pypi (or the designated
pypi mirror). To do this we try the local repo first, then fall back
to using the designated default index which defaults to pypi.

Change-Id: Iba7e9939250b24dc64fdd1883f963d0253ddad7e
2018-04-23 14:09:32 +00:00
Jesse Pretorius 81051b0d46 Fix repo_build_venv_rebuild toggle effectiveness
The repo_build_venv_rebuild toggle is supposed to trigger
a rebuild of the venvs, but currently it does nothing.

This patch fixes that, making it possible to rebuild the
venvs without having to rebuild the wheels too.

Change-Id: I61db1f5555cba2c659ff09d8369ce3c31b011b5d
2018-04-17 19:09:51 +01:00
Major Hayden 782a4b248f
Add timestamps for pip wheel build logs
This patch adds timestamps to pip wheel builds logs. This should
allow us to profile the wheel build runs and discover why CentOS
and OpenSUSE are so much slower than Ubuntu when building wheels.

The path also moves the wheel build process into a templated script
in /opt, which makes it easier to redirect output and prepend
timestamps to the log.

Partial-Bug: 1738424
Change-Id: I298dd45ada552b78ef7d6fcb79481035581bd77a
2017-12-15 11:29:38 -06:00
Jean-Philippe Evrard 427be7bb2d Fix typo on conditional
'ansible_local' is not a string, but a variable.

Change-Id: I63817bb3c58a2c44d3e948bdb81005dc2e734c21
Closes-Bug: 1716663
2017-10-04 07:09:36 +00:00
Jesse Pretorius 2d4719fd7d Add protection against no local facts being defined
If there are no local facts, the initialisation of
facts fails due to ansible_local being undefined.

This patch adds a conditional for that situation and
als makes the task set slightly more code-efficient.

Change-Id: I605280fb3ccd0f12b32bb572b064b9b04109934b
2017-06-24 07:24:46 +01:00
Jesse Pretorius c505f88b12 Remove deprecated tasks/variable
Some tasks are no longer necessary in Pike
and the variable removed was deprecated in
Mitaka, so it's time to go.

Change-Id: Ibabe46967582929a441e66848c5267f0460a358b
2017-06-12 19:04:37 +00:00
Jesse Pretorius 8c3933c069 Make wheel build process idempotent
This patch implements the following:

1. The ability to use a boolean variable to always force
   a git clone or the wheel build to happen.
2. The use of local facts to mark whether a wheel build
   or venv build is required. This ensures that if there
   is a failure, the tasks will still be done when the
   repo build is executed again.
3. The git clone or wheel build tasks are only actioned
   if there is a change to the requirements or constraints.
   This ensures that when the repo build is executed
   without any changes, those processes will be skipped.
4. Re-arranges the tasks to ensure idempotency and to
   make the process easier to follow. A smaller set of
   tags are implemented which are intended to provide
   a clear code path for each of them.
5. Log output is added to the venv build process to make
   troubleshooting easier.
6. The stdout output for the wheel and venv build
   processes is made minimal to reduce confusion and
   make it easier to spot which item failed to build.
   The log output in /var/log/repo contains the verbose
   output from pip.

Change-Id: I2008926b43653edf50c284f5068160e27915c90a
2017-06-06 15:16:35 +01:00