Commit Graph

25 Commits

Author SHA1 Message Date
Jonathan Rosser f2093a18ed Remove references to unsupported operating systems
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
2021-03-16 10:47:53 +00:00
Jonathan Rosser 2a533ed185 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: Iec4a2a8c5251ddccedc4310c26c8fd2ca8bdc913
2021-02-25 12:24:01 +00:00
Jonathan Rosser 919a34298c Remove support for lxc2 config keys
Change-Id: I48b053f98bc89c8dde19b73622cce295095db672
2021-01-06 17:10:19 +00:00
Jonathan Rosser 036795aa9f Fix tests for Centos8 EPEL repo paths
Change-Id: Iec2fd7839605075af1c3b3ab952513b6004c19a6
2020-12-31 18:53:31 +00:00
Marc Gariepy cf3b1dbe7b remove ansible_python_interpreter
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
2020-06-11 15:58:50 -04:00
Zuul f1885afdc8 Merge "Update to opendev" 2019-07-30 20:11:55 +00:00
Zuul c79533a1da Merge "Trivial: Fix the pep8 warning" 2019-04-24 20:32:54 +00:00
Le Hou 593c6b3099 Update to opendev
Change-Id: I10d85fa08af6ac4034a50e1a679cef0c52bf75ce
2019-04-24 01:11:44 +00:00
Kevin Carter b48a02d531 Remove the private option from include_role
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>
2019-02-22 00:50:20 +00:00
melissaml 4ca73c8bce Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: I1484f91d8b0d543a69191bf869d14e8e7b34de87
2018-11-08 22:38:04 +08:00
Jimmy McCrory b7cb5188a1 Set container_name as host_var in test inventory
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
2018-10-20 15:28:29 -07:00
Kevin Carter 5818696cf6 Add option for default pip package install
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>
2018-09-09 18:35:15 +01:00
Jesse Pretorius ac5e5e9283 Simplify builds/installs by eliminating venv packaging
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
2018-09-01 16:38:42 +00:00
Jesse Pretorius 3dab77ff90 Add Bionic testing
Now that bionic testing is added into the tests repos, we can
start testing it in the repo.

Depends-On: https://review.openstack.org/566959
Depends-On: https://review.openstack.org/567032
Depends-On: https://review.openstack.org/567034
Depends-On: https://review.openstack.org/567038
Depends-On: https://review.openstack.org/567045
Change-Id: I8473f203a67b8128712b9aacdf194b1faa7cdc51
2018-07-30 13:10:31 +00:00
Zuul 49ca153ff6 Merge "Add lxc3 compatibility to tests" 2018-07-30 13:04:31 +00:00
Jonathan Rosser e030ab332a Add lxc3 compatibility to tests
lxc3 deprecates many legacy config keys [1].

[1] https://discuss.linuxcontainers.org/t/lxc-2-1-has-been-released/487

Change-Id: I27e343210678d2898163d00b5f45c2c2537a3945
2018-07-30 10:33:23 +01:00
Jean-Philippe Evrard 7f58c50bf3 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: If684a4bf85249a4eb5372cb69365fb79423326db
2018-07-30 08:41:04 +00:00
Jesse Pretorius cc1beeaa8b Add EPEL repo for nginx packages on CentOS tests
In order to have access to nginx, we need to add the EPEL
repository.

Change-Id: If15ce61768b9f0005297546c82aecc75f3af7ff7
2018-07-02 08:04:56 +00:00
Jesse Pretorius d169906c68 Revise the role to properly cater to use-cases
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
2018-05-04 18:03:59 +01:00
Jesse Pretorius 58f0eaa468 Revert the use of wheel synchronizing
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
2018-03-29 16:36:39 +01:00
Jesse Pretorius 24dda60d55 Use wheels when building venvs
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
2018-03-28 17:00:21 +00:00
Jesse Pretorius 4417b2ceef Ensure build/install works in serial/parallel execution
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
2018-03-28 15:08:27 +01:00
Jesse Pretorius 6112ac444e Update run_tests.sh and remove tests-repo-clone.sh
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
2018-03-27 23:08:44 +01:00
Jesse Pretorius 8ffaab139b Add CI/docs/releasenotes scaffolding and basic test
Change-Id: I27c70ff45d5361a80811575d62328f35ef35e0a1
2018-03-24 22:42:06 +00:00
Jesse Pretorius c9139b0b3a Initial commit 2018-03-09 17:50:21 +00:00