Commit Graph

35 Commits

Author SHA1 Message Date
Kevin Carter f3fe518781 Convert include to include_tasks
Include is deprecated, additionally include_tasks is now faster.

Signed-off-by: Kevin Carter <kevin@cloudnull.com>
Change-Id: I20f92b972b794513cb774983f3aa6044769987d7
2022-09-03 21:14:29 -05:00
Jonathan Rosser 03b55edaae Remove all code for lsync, rsync and ssh
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/842571
Change-Id: I4f32c03179a1d8814548a92fc714a5fd9dd3f433
2022-05-19 16:33:18 +00:00
Marc Gariepy ead7a35ea9 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: I73c3c12fe937cda95455dcd5cd708d03a316b392
2020-06-11 15:59:24 -04:00
Dmitriy Rabotyagov 748d86411b Remove git deamon functionality
Caching git repositories has been deprecated in Queens, so it's high time
we removed this functionality.
This shouldn't influece OSA deployments in any way.

Change-Id: I35829aa35489f06dbb3b65f522f0a08318eccbfa
2020-05-02 16:53:16 +01:00
Dmitriy Rabotyagov 0fad87541a Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.

Change-Id: I0877731deb4816960b47a8c76eee64171dee5b44
2019-11-14 19:23:27 +02:00
tonybrad 9136da9015 Change the tests source to opendev
Change-Id: I2b76a7ed792ee9c17816cce5f46b84eb588aedd6
2019-05-21 08:53:09 +00:00
Jimmy McCrory 8350c74fb8 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: I68e5fd1b893bf716f6cfc08d80a36fbb07f635f7
2018-10-20 15:28:29 -07:00
Jesse Pretorius 6663637374 Remove apt-cacher-ng
The repo container's package cache causes quite a bit of confusion
given that it's a 'hidden' feature which catches deployers off-guard
when they already have their own cache configured. This is really
the kind of service which people should manage outside of OSA. It
also makes no sense if the deployer is using their own local mirror
which is a fairly common practise. Adding to that, it seems that it
is broken in bionic, causing massive delays in package installs.
Finally, it also adds to quite a bit of complexity due to the fact
that it's in a container - so in the playbooks prior to the container's
existence we have to detect whether it's there and add/remove the config
accordingly.

Let's just remove it and let deployers managing their own caching
infrastructure if they want it.

Change-Id: I829b9cfa16fbd1f9f4d33b5943f1e46623e1b157
2018-10-08 14:48:32 +01:00
zhulingjie 7c8e10977d Remove the unnecessary space
Change-Id: I4edb409131d122b2e426d115ee94c4a986bd3606
2018-07-11 23:02:53 -04:00
Jean-Philippe Evrard 6802793bb9 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: Ib73373d8801c9eedd7c6e92b994a2fba0349ed90
2018-07-12 17:01:52 +02:00
Jesse Pretorius 33f9b867d8 Remove tests-repo-clone.sh
Now that run_tests.sh handles the tests repo clone, we can
remove the use of the older tests-repo-clone.sh script.

Change-Id: I433be60aac36892e5a4d6c4fd61755d6b1b4eac4
2018-03-28 10:17:47 +01:00
OpenStack Proposal Bot 059fe9eeda Updated from OpenStack Ansible Tests
Change-Id: I0c912245c371a912e215d94c0b14a25712547b94
2018-02-14 20:08:19 +00:00
Jesse Pretorius 14482a4dfa Resolve ansible-lint test failures
With the merge of https://review.openstack.org/520177 in the
tests repo some ansible-lint failures which previously were
not being picked up are now detected.

This adds the appropriate skip tags to the tasks so that they
are not evaluated by ansible-lint.

Change-Id: I5a45388aa57ac061fab62271ecea28804713cbc9
2017-11-21 07:21:43 +00:00
Jesse Pretorius de82c8009d Initial OSA zuul v3 role jobs
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.

Change-Id: Ifa650996eb87c6519ea3dfc449ebde92a8d7802d
2017-10-17 18:04:21 +01:00
OpenStack Proposal Bot 16755807fe Updated from OpenStack Ansible Tests
Change-Id: I6a0432f3405f70de5d446fcdccc7cf0500ff6e85
2017-10-12 20:45:24 +00:00
Marc Gariepy fea14762cd Standardize test vars
Move to a range that is not lxc dhcp for container ip.

Change-Id: I3d4405220ac0e9c8cd790f895c7f34a353d8151f
2017-07-18 14:44:02 -04:00
Markos Chandras 76ca77d16b Add SUSE support
Add support for SUSE based distributions. We also update the bindep.txt,
run_tests.sh, .gitignore, tests-repo-clone.sh and Vagrantfile files
from the openstack-ansible-tests repository.

Change-Id: I5a2b3cae0ed325abb3920e9a684d25898df6027d
2017-05-17 20:38:30 +01:00
Markos Chandras 08f937a5af Fix role gate tests for Ansible 2.3
'ansible_become' defined as a host_var or in the inventory for a host
has a higher precedence than 'become' defined within a playbook.

In change Id5b76a87809f03951c954fc3d752419a673403f7, 'become' was
defined explicitly for each play running against localhost so
'ansible_become' should be removed from its host_vars.

Change-Id: Ic74099b95342a938c77c08305230aeb711741b76
Cc: Jimmy McCrory <jimmy.mccrory@gmail.com>
2017-05-17 18:49:16 +01:00
Jesse Pretorius 855b90c9ee Use zuul-cloner for tests repo in OpenStack-CI
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.

Change-Id: I0ff409dd48649e999e36775d712e2609715115b0
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:54:37 +01:00
Jimmy McCrory 01840f29d2 Standardize test vars
Move test host vars from the inventory to individual files for each
host. 'ansible_become' has been removed from localhost's vars since it
should be handled on a playbook basis. The containers' management
addresses have also been moved to the br-mgmt bridge.

Change-Id: Ib1c08d7df0d1be855ca9579faa3a2ad85b164e0d
2017-04-25 15:53:02 -07:00
Jesse Pretorius add9fda277 Remove pip_install as meta-dependency
The repo_server role does no pip installations - they're all done
in the repo_build role.

This removes the unnecessary dependency.

Note that the httplib2 pip install task is removed as Ansible 2.x
no longer requires it.

Related-Bug: #1633105
Change-Id: I4a2ff6c6e5cd40d87d4218f63c09e96da82da1aa
2016-12-01 18:26:07 +00:00
Marc Gariepy ab30c01607 Add VfilePatternEx to apt-cacher-ng for centos.
This will enable it on 16.04 and CentOS, version of apt-cacher-ng on 14.04 is a bit too old.

Change-Id: Ie5d3efb6908fd664efb4effc3cbce04183f9c3c0
2016-11-14 12:13:10 -05:00
Jesse Pretorius 9aafde635d Use centralised test scripts
This patch consumes the test scripts implemented by
https://review.openstack.org/375061 to ensure that
the tests and test preparation is consistent and
more maintainable.

Change-Id: I8d80c9d34b018ec73b2517256d7b62dbb2e2609a
2016-09-28 11:57:04 +01:00
Jesse Pretorius 2d240b7ac6 Force Ansible to use dynamic includes
Ansible 2.1.1 introduces a regression in the way conditional
includes are handled which results in every task in the
included file being evaluated even if the condition for the
include is not met. This extends the run time significantly
for a deployment.

This patch forces all conditional includes to be dynamic.

Change-Id: I66de661bf9f68a2d91e3a2fec9c1eee826c17592
Related-Bug: https://github.com/ansible/ansible/issues/17687
2016-09-22 16:34:36 +01:00
Kevin Carter a888f8fd07 Convert role testing to use Ansible 2.1.1
Change-Id: I40cecfc65daeee8e0c45a8cf47f27289097d9e93
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-14 15:53:35 +00:00
Jesse Pretorius aa706929e0 Clean up container cache prep in tasks
This patch cleans up the container cache preparation in the tests
due to the following patches:

- https://review.openstack.org/307856 (new image build process)
- https://review.openstack.org/315114 (new apt config process)
- https://review.openstack.org/322188 (new resolver config process)

Change-Id: I3ce8ce07297d456e7f642c09578d92a07f579162
2016-06-18 04:51:06 +00:00
Jimmy McCrory f59bafd778 Updated role for multi-distro support
Separate files have been created for vars and tasks related to a
specific package manager.

The 'repo_apt_packages' variable has been deprecated and renamed to
the more generalized 'repo_server_packages' to better describe its
purpose and to simplify reuse of existing install tasks between multiple
distros.

git daemon is configured to host git repositories from the repo servers
using the git protocol.

Currently, openstack-ansible uses git over http to access repositories
on servers created by this role.
fcgiwrap and its configuration within nginx should be removed in a
follow-up patch after openstack-ansible has been updated to use the git
protocol.

Change-Id: I62321a7b62dabca469eb072ddbf4e8f250ce0fb3
2016-05-13 10:48:57 +00:00
Jimmy McCrory 954770e1da Reorganize test playbooks
The following changes have been made to reorganize the structure of this
role's test playbooks, bringing them into line with other
OpenStack-Ansible roles:
  - move each playbook to an individual file
  - rename playbooks descriptively
  - define hosts and groups directly in the inventory file
  - include group vars required by containers
  - reduce lxc network dhcp network range to avoid conflicts with static
    container addresses
  - enable verbose logging for functional test output
  - remove unnecessary delegations in functional test playbook

Change-Id: I5b0ab466a7374d3012ff60e2da677b0c30c966b2
2016-05-04 17:06:52 -07:00
Jesse Pretorius fcd8083f12 Remove dependency on python2_lxc git source
The git source for python2_lxc was necessary before the package was
available on pypi, which it now is:
 - https://pypi.python.org/pypi/lxc-python2

This patch removes the py_from_git role from the functional testing
playbook.

Change-Id: I40cc3fc133a196bd9b3247cdf1371768a8a9015a
2016-03-24 12:15:27 +00:00
Jesse Pretorius 99bb83d0d6 Tests: Make containers use the host's apt/pip config
This patch sets the test to check if the test is running in
OpenStack-CI, and if it is - then make the containers use
the host's pip.conf and some of the apt configuration.

All containers should make use of the hosts's apt sources
configuration. The tasks detect and implement this.

The intent is to make use of OpenStack-CI resources better
and consequently reduce the test run time.

Change-Id: I4a4ae2bdb5ffb909e087291d9198f0786e3f128a
2016-03-17 13:38:16 +00:00
Jimmy McCrory eb72dbec3d Remove memcached_server dependency
The repo_server role does not require a memcached server and makes no use
of any related variables. Remove the memcached_server role dependency
and memcached variables.

Change-Id: I1c3b57ac3f25bac0e1640f5735cca7b73b573090
2016-03-07 08:24:36 -08:00
Jesse Pretorius 4ee0d39710 Force initial apt-get update as part of test execution
Some OpenStack-CI providers have invalid apt caches and therefore
need a forced update as an initial task in the test execution, or
the tests will fail.

This patch ensures that the apt cache is updated before any apt
installations happen.

Change-Id: I27236aa91197b20fe943823e28062afde7024f39
2016-03-01 18:07:39 +00:00
Jesse Pretorius be5a90f2e8 Update tox config and add bashate E006, E040 exceptions
This patch updates the tox.ini the same bashate exceptions as are
currently in the OpenStack-Ansible playbook repo.

It also ensures that the linters and all lint targets work
appropriately and normalises the tox.ini configuration to use
uniform formatting.

The use of ansible.cfg is removed as there is no way of being
certain which paths can be used without reverting to an ugly
sed hack in the commands. This is why it is preferred to make
use of environment variables which make use of tox's default
substitutions instead. It's a more reliable way of achieving
the goal for the purpose of gating and testing.

The switch to using a git clone instead of ansible-galaxy to
download the plugins is due to the path spec not being able to
work in Ansible 2.x. [1]

[1] https://github.com/ansible/ansible/issues/13563

Change-Id: I078ad3c5751b7da09ec8553c90f261fc4d2f534f
2016-02-12 11:59:02 +00:00
Kevin Carter 9d423e6144
updated repo pathing for new org
Change-Id: I6ea4732625233c1940c07535314dddbc59f2aaf0
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-10 20:47:45 -06:00
Kevin Carter 725222afee
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-09 09:25:37 -06:00