All references to Gentoo, SUSE, Debian stretch and Centos-7 are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible
Change-Id: I8224deceba331d9fbca64c151b27430530a18528
ansible_python_interpreter is now set to auto in the tests repo.
it doesn't need to be overwritten in the test anymore.
Depends-On: https://review.opendev.org/734676/
Change-Id: I4ace5af5d555da5452b734f83851b48b4e55d915
The private option on include role was never implemented and
will no longer be developed. This change removes the option
so ansible no longer raises a deprecation warning.
Change-Id: I877924f1e8884fcf5ea031f0f8cb48b93f989353
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
The connection plugin no longer falls back on using the
inventory_hostname as the container_name. Set container_name as a host
var for each container in the test inventory.
Change-Id: I5f86e3bfad95e80c8d2d98237f44883643780df9
Add an option to define a default set of python packages to install
within a virtual environment. This can be used to install a package
wihin a virtual environment that may be outside of a normal package
list but for a given service.
Change-Id: Ic2dc024049062ad9be396a1f71435f661576e91b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
Python venvs are not particularly portable. To overcome this
problem we have a bunch of stuff implemented to fix them
after we unpack them. This ranges from relatively simple
things like re-implementing python in the venv and changing
the shebangs for everything in it, to more complex things
like having to package a venv per distro/architecture.
All of this can be eliminated by simplifying the mechanism
into just creating the venv on the target host, and installing
the python packages into it. To help speed up the build, we
can simply build wheels before hand and store them on a web
server somewhere.
This patch implements the changes to:
1. Do away with packaging the venv.
2. Keep it simple. We install into the venv, and that's that.
3. Add a toggle to rebuild the venv if you'd like to.
4. Use import_tasks with tags for each stage so that it's
easy to skip a portion of what executes.
Change-Id: I708b5cf32e5cce6a18624d0b3be0cd4c828ad389
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: If684a4bf85249a4eb5372cb69365fb79423326db
1. Variables have been renamed to make it easier to
understand their purpose.
2. Unnecessary variables have been removed.
3. The role no longer caters to installing pip packages
on the host. This should never be necessary - if it
is, then something should do so beforehand.
4. The expected versions of pip/virtualenv are documented
and a check has been added to ensure that they exist.
5. The handler has been named to make debug logs less
confusing.
6. The default storage path for venvs/wheels is no longer
opinionated. If paths based on distro/architecture are
required then different paths should be provided to
the role.
Change-Id: I9eb96e9db22f918b00456af943d81f66050107ce
When using this role, a playbook can be used to orchestrate
doing all the builds on a single host. There is no need to
orchestrate this inside the role.
In order to gain the efficiencies of building everything on
a single host, a playbook can/should be used with the setting
'venv_reuse_build_only: yes'. Which will not continue to the
install stage.
Change-Id: Ib6e13ca7623942f8b0663b54528599b56b05fb19
In order to speed up the venv build process, especially
when building multiple venvs, we implement the ability
to build the wheels prior to building the venvs. Once
the wheels are built, they are pulled back to the deploy
host so that they can be re-used for the next venv build
on another host.
By default we ensure that the location separates wheels
per distribution and architecture to prevent re-use of
wheels between them which can sometimes cause problems.
Change-Id: I0c99ea8e0b57130511704659a12c904b98ba5bcd
When executing the role in parallel, there is a race condition
due to all targets trying to build simultaneously and then all
trying to copy their packages back to the same folder on the
deployment host.
In this patch we implement the use of a dynamic group based on
the venv_reuse_download_subfolder which, by default, combines
the architecture and distribution data. We then use this group
to ensure that only the first of each group does the build and
the others consume the first host's package.
The conditional in tasks/python_venv_install.yml checking
whether the src venv is present was unnecessary given the same
conditional is present in tasks/main.yml. It interferes with
the new parallel execution capability, so it's been removed.
To validate whether builds happen properly, whether in serial
or parallel, and to also implement a way to implement tests for
future validations, we implement a test system using multiple
containers while allowing localhost to be the deployment host
only.
Change-Id: I29d230c16bee3e2d7e434f98c05af4a6a53ff10a
The lint tests make use of the common linters test
used by the roles, so we need to ensure that the
run_tests.sh script is updated and the configuration
adjusted accordingly.
Change-Id: I1a5f97b770f1931a40af334f3a87766f02e572d7