Commit Graph

46 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 5de6e8084f Cleanup after repo_build and pip_install retirement
Change-Id: I8ece554f5a2bb91074b9bc4dcc3d84816387f07c
2020-05-12 21:11:16 +03:00
Dmitriy Rabotyagov fdc249db05 Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.
Also we change upper constraints url due to [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Depends-On: https://review.opendev.org/693841/
Change-Id: Ibeef50ce58bf793192477ee939ef136ea3d053e6
2019-11-14 16:21:37 +00:00
Dmitriy Rabotyagov 51c0311478 Start using uWSGI role
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.

Change-Id: I8492d52d8155e1bd75f99deb4fd19d445a831816
2019-09-04 16:39:05 +03:00
melissaml 41f5b60ca4 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ic25064fc9c6e34803bc33531113e89987f43072f
2019-07-10 21:17:43 +08:00
Jimmy McCrory 14aa370958 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: I76da85cef53e4f8775bddb49de4b12349d85e56b
2018-10-20 15:28:29 -07:00
Zuul a7061507e1 Merge "use include_tasks instead of include" 2018-08-17 19:44:07 +00:00
Zuul 985cdcce74 Merge "Trivial: Fix the pep8 warning" 2018-08-17 05:27:56 +00:00
caoyuan ecc8e31c1f 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: Ief69dd0c2fe7397b75e9e4251f0cfb7040bcf95f
2018-08-15 14:44:55 +08:00
wangqi 2c319c8593 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: Ifd6df78a76ed1f90e1523345b775b830b61a003c
2018-08-06 07:16:25 +00:00
Jesse Pretorius 8557ee5bc5 Move MQ vhost/user creation into role
There is no record for why we implement the MQ vhost/user creation
outside of the role in the playbook, when we could do it inside the
role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we implement two new variables:
- barbican_oslomsg_rpc_setup_host
- barbican_oslomsg_notify_setup_host

These are used in the role to allow delegation of the MQ vhost/user
setup for each type to any host, but they default to using the first
member of the applicable oslomsg host group.

We also adjust some of the defaults to automatically inherit existing
vars set in group_vars form the integrated build so that we do not
need to do the wiring in the integrated build's group vars. We still
default them in the role too for independent role usage.

Finally, we remove the test mq setup tasks and clean up any unused
or unnecessary variables configured in tests.

Change-Id: I8e873ad9dc8184ec387fe5e1bd95af1b90bb7233
2018-07-27 12:50:48 +01:00
Andrew Smith 206f411451 Update to use oslo.messaging service for RPC and Notify
This introduces oslo.messaging variables that define the RPC and
Notify transports for the OpenStack services. These parameters replace
the rabbitmq values and are used to generate the messaging
transport_url for the service. The association of the messaging
backend server to the oslo.messaging services will then be transparent
to the barbican service.

This patch:
* Add oslo.messaging variables for RPC and Notify to defaults
* Add transport_url generation to conf
* Add oslo.messaging to tests inventory
* Update tets
* Update examples
* Add release note

Change-Id: I0657c88799e06987c6df90edd55fda859faf6035
2018-07-26 09:37:01 +00:00
Jesse Pretorius 9d01669487 Execute service setup against a delegated host using Ansible built-in modules
In order to reduce the packages required to pip install on to the hosts,
we allow the service setup to be delegated to a specific host, defaulting
to the deploy host. We also switch as many tasks as possible to using the
built-in Ansible modules which make use of the shade library.

The 'virtualenv' package is now installed appropriately by the openstack_hosts
role, so there's no need to install it any more. The 'httplib2' package is a
legacy Ansible requirement for the get_url/get_uri module which is no longer
needed. The keystone client library is not required any more now that we're
using the upstream modules. As there are no required packages left, the task
to install them is also removed.

With the dependent patches, the openstack_openrc role is now executed once
on the designated host, so it is no longer required as a meta-dependency for
the role.

Depends-On: https://review.openstack.org/579233
Depends-On: https://review.openstack.org/579959
Change-Id: I20186fd3bb4a3fade91e14f6360232454de9c989
2018-07-06 13:49:14 +00:00
Jesse Pretorius ee57df2a83 Move test-vars into overrides file
Using an in-role test-vars.yml file is an old pattern, and
this role clearly never got the pattern update. This patch
fixes that.

Change-Id: Iac3afc77db87d245e99c0deb5c1bf3ec02fc881a
2018-06-25 09:37:31 +00:00
Jesse Pretorius 33d5e31717 Move database creation into role
There is no record for why we implement the database creation outside
of the role in the playbook, when we could do it inside the role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we implement a new variable called 'barbican_db_setup_host'
which is used in the role to allow delegation of the database setup
task to any host, but defaults to the first member of the galera_all
host group. We also document the variable barbican_galera_address which
has been used for a long time, but never documented.

Change-Id: I6257a172cf52e61cb8219f3698c17821270c3ffb
2018-06-25 09:36:49 +00:00
Jean-Philippe Evrard 38449aa31e Do not log passwords
This prevents data to be leaked into the callback plugin.

Change-Id: I537d17f4a88b5acac840d632b1941fd15116fd9b
2018-04-11 13:41:19 +02:00
Jesse Pretorius a5b862aa99 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: Id7215ab417e1250987fecff47dc35a499e367775
2018-03-28 10:13:08 +01:00
Zuul 150772889a Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-25 17:23:16 +00:00
Jesse Pretorius 19490e2c0a ansible-role-requirements: Use systemd_service role from openstack namespace
In order to ensure that the updated role is used for tests,
we adjust the a-r-r file to pull from the correct repo.

Change-Id: I819258736cea5d6c0c4e091e911f572baec310eb
2018-03-25 16:18:55 +01:00
Jesse Pretorius 989b995e0c ansible-role-requirements: Add common python_venv_build role
In order to allow tests to work as the use of the common
role is implemented in the various roles, we pre-implement
the addition of the role into the a-r-r file.

Change-Id: I5b7dcac1c5898c79416d829f23b3a4e9f3e45b28
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:19:03 +00:00
Jesse Pretorius 1049aca6b4 ansible-role-requirements: Add common systemd_service role
In order to allow tests to work with https://review.openstack.org/551028
merged, add the role to the a-r-r file.

Change-Id: Ic1d3633fea2652534d0db4267263387bb255b0a6
2018-03-13 16:49:09 +00:00
OpenStack Proposal Bot ffc4675a8e Updated from OpenStack Ansible Tests
Change-Id: Ic2db1653e2d71f0bfa89847ffc20e85fc917fa7e
2018-02-14 20:04:57 +00:00
Jimmy McCrory 1fe60daf28 Use tempest plugin for functional testing
Use barbican's tempest plugin for functional testing instead.

Change-Id: Ic17fd4c7c4d229ea33d1d8859e9b8b453984e7dc
Depends-On: I7987c5a4dbf50e97322a5b348c3cbd817b2672d6
2017-11-21 11:23:08 -06:00
Jesse Pretorius e941396601 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: I7572b7befa2af6af3c2102b79487913d14eb9d20
2017-11-21 11:07:04 +00:00
Jesse Pretorius 4f86a90c67 Allow role defaults to determine the branch tested
Currently there's an override in place to make the tests
use the master branch. This becomes a pain when master
becomes a stable branch because this override is out of
the norm, so it gets forgotten.

The override is not necessary - we can just use the
values from the role defaults instead.

Change-Id: I1f9540951d269545f8466989ef4ff4bfe939d35b
2017-11-03 10:44:57 +00:00
Jesse Pretorius f0cddb7be3 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: I876965e17a2455b9023ddac4bdd6abdf7fca8a12
2017-10-17 20:56:35 +00:00
OpenStack Proposal Bot bc31751469 Updated from OpenStack Ansible Tests
Change-Id: I197b65b91db0e2a132482036238e96ef33da0f8a
2017-10-12 20:44:07 +00:00
OpenStack Proposal Bot 14a682ab64 Updated from OpenStack Ansible Tests
Change-Id: I7a5e3e7886b324cc8da0c1424ada2154fe32124b
2017-06-22 15:19:16 +00:00
Andy McCrae ed8e52b820 Allow the developer constraints to be adjusted
In order to do a developer mode that allows installation of packages
from local file, which take precedence over the developer_mode
constraints, we need to allow the order of the constraints to be
changed.

This patch adds a "pip_install_developer_constraints" var which is used
to set the developer mode constraints. By default this will leave the
same behaviour but will allow additional constraints to be added, or the
developermode constraints file to be overriden altogether.

Change-Id: I43a36ee0d887501c9e91bf27f975e4465dcd5d52
2017-05-26 12:05:33 +01:00
Jesse Pretorius 50d98d814f 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: I45f37bee4902c70299e19184b925375666a3f8f9
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:50:39 +01:00
Jimmy McCrory a7a8ebaab5 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: If05e771eae4b62402aa94eaa5979e44e3597957f
2017-04-20 00:12:53 +00:00
Jimmy McCrory c5f93b19bf Update paste, policy and rootwrap configurations 2016-10-13
Barbican's default API pipeline is noauth, a variable to
toggle between noauth and keystone, 'barbican__keystone_auth' has been
added. keystone_authtoken information has been moved to a better home
in barbican.conf.

python-memcached has also been added to the pip package list since it's
a requirement when using keystone authentication with token caching.

Change-Id: I5e731d63f442edf970845f2b821b98ce57176e48
2016-10-13 19:21:20 -07:00
Jesse Pretorius 81f66e818a Fix git source in ansible-role-requirements
For any openstack git sources, git.openstack.org must be used.

Change-Id: I793666630417052ad82af84e900964831b534141
2016-09-30 14:39:41 +01:00
Jesse Pretorius 1600d20247 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: I83c7b8bf6be68ca2afe80004aa51d564e06a647d
2016-09-27 17:55:47 +01:00
Travis Truman a23b07cdbb Add openstack_hosts to the role requirements
The tests repo uses it, so this role needs to
make sure it is installed during gate testing.

Change-Id: Ie0f708045e2c1a5a3c5a49a60595abb5db9b3a5f
2016-09-21 10:28:06 -04:00
Travis Truman d2a354c3f5 Ansible 2.1.1 role testing
Change-Id: I765f4c4bccaf2c66cafd6fe70f12c8c4e6e702bf
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 13:06:53 -04:00
Jimmy McCrory 6d5cd2ac45 Remove openstack_hosts from test requirements
The openstack_hosts role is not used in any of the test playbooks
or required by dependent roles and can be removed from the test
role requirements.

Change-Id: I8e23e1a7a40a99c34f1617444a663ff93ef1d4b4
2016-07-20 18:47:01 -07:00
Jesse Pretorius 2e83f7e389 Update tox configuration
In order to prepare for implementing requirements management by the
OpenStack requirements management process, and to improve the
reliability and effectiveness of test execution, this patch implements
some changes to the tox configuration:

- The minimum tox version is increased in order to be able to use
  constraints for the python packages.
- The OpenStack upper-constraints are used when preparing the test
  venv for the linters checks.
- Any proxy environment variables set on the test host are passed
  into the venv to enable testing from behind a proxy.
- The environment variables used by Ansible tests are moved into
  a new venv called 'ansible' and this environment is inherited
  by all Ansible-related tests.
- The docs test will clean-up an existing build directory before
  executing the docs build.
- The releasenotes build cannot use upper-constraints at this point,
  so it doesn't.
- The Ansible role download will no longer ignore errors so that any
  problems discovered will result in a failed test.
- The human readable logging callback plugin is implemented for
  functional testing.
- The ansible test requirements are moved into tox.ini to ensure
  compliance for requirements.txt/test-requirements.txt for the
  global-requirements management contract.
- The ~/.ansible directory as a whole is not deleted. Instead only
  the plugins and roles folders are deleted to ensure that zuul's
  Ansible artifacts are left in-place.
- The ansible-lint version is updated to support execution against a
  folder, and the test now executes against the entire role to ensure
  that it captures all applicable files for lint testing.

This is a combined port of the following:
- https://review.openstack.org/323507
- https://review.openstack.org/338193
- https://review.openstack.org/332443
- https://review.openstack.org/338193
- https://review.openstack.org/339493

Change-Id: Ie37a8124f5069908d4ea86a903ca5d97fe3f9998
2016-07-08 15:33:42 +01:00
Jesse Pretorius b794fc83b1 Clean up container cache prep in tests
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: I1cc4dd420c7b49b2e45ead89a92be2d988c6741e
2016-06-17 18:25:48 +01:00
Travis Truman 271d642148 Address Ansible bare variable usage
When executing the role with Ansible 2.1, the following
deprecation warning is issued in the output for some tasks.

[DEPRECATION WARNING]: Using bare variables is deprecated.

This patch addresses the tasks to fix the behaviour appropriately.

Change-Id: Id61f978d9848626a9e3e9ca84228780bb9fc067d
2016-06-15 12:46:36 -04:00
Jimmy McCrory 04a12c6b31 Remove pip_lock_down dependency
The pip_install and pip_lock_down roles have been merged.

Remove pip_lock_down from the role's meta dependencies and test
requirements.

Change-Id: Ic97afda2dd85f8103d6529107d56b8873a64480d
2016-06-07 23:39:16 -05:00
Travis Truman e0121f8833 Verbose option has been deprecated from oslo.log
See http://lists.openstack.org/pipermail/openstack-dev/2016-May/095166.html
for additional details.

Change-Id: Ib72e77525ee9b031b4e11c07ead3bca3c5cd1a9a
2016-05-17 11:07:07 -04:00
Jimmy McCrory e957326fc3 Add functional testing
A test playbook has been created to validate basic functionality of
barbican.

The api-paste template has been updated to use keystone auth_token by
default.

Change-Id: Ib542f5a0112b504e70d8bab6b49e9c6f5367f9e7
2016-05-08 00:02:37 -07:00
Jimmy McCrory b39a432e04 Use master git branches when testing
In the test vars, change the barbican, keystone, and requirements git
install branches to master for consistency with other roles.

Change-Id: Id12f601334a4c696970f77daf50fb46931d71776
2016-05-05 10:32:19 -07:00
Jimmy McCrory 37d90c5dd9 Enable functional convergence testing
This change adds variables and tasks for enabling developer mode to
allow for installing barbican without a repo server, moves the tasks
creating the barbican rabbit virtual host and mysql database from the
role to a playbook, and adds functional convergence test playbooks to
deploy rabbitmq, galera, keystone, and barbican.

The barbican.conf template has been updated to make use of the deployed
rabbit and galera servers and all other templated configuration files
have been updated from the current head of master.

Change-Id: I2716fbe6a5dbad2a3b7ce6e406098e463cf7d943
2016-04-12 11:27:15 -07:00
Jimmy McCrory f26e994bf9 Implement base configuration for OpenStack-CI
This patch includes the following:

 - Base configuration for OpenStack's CI Infrastructure.
 - Base documentation build configuration.
 - A Vagrantfile for local testing.
 - A base test configuration in order to execute the standard tests.
 - An updated README, and added a CONTRIBUTING file.
 - The extras folder and files have been updated to match current
   conventions.

Change-Id: Ibc83d81de14eec533afae5b8c2cf0d07668d3ba0
2016-03-22 12:12:44 -07:00
Ian Cordasco 9126afc796 Initialize galaxy role 2016-02-23 15:30:30 -06:00