Commit Graph

46 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 6767e09dbd Cleanup after repo_build and pip_install retirement
Change-Id: I9148ae927befa0512d9b9a30ff3cd290ce4acd4b
2020-05-12 23:04:52 +03:00
Dmitriy Rabotyagov dde6129387 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: Iaca1e2f680d7281b4d8c0fd47907823a515f4240
2019-09-06 10:07:39 +03:00
tonybrad 1982a3ccc9 Update tests git source to opendev
Change-Id: I26408036c67c24631b5afe953283cda5c7cb1750
2019-05-21 08:47:26 +00:00
Guilherme Steinmüller cb1098d25c Update role for new source build process
The variables sahara_developer_mode and sahara_venv_download
no longer carry any meaning. This review changes sahara to do
the equivalent of what developer_mode was all the time,
meaning that it always builds the venv and never requires
the repo server, but it will use a repo server when available.

As part of this, we move the source build out of its own file
because it's now a single task to include the venv build role.
This is just to make it easier to follow the code.

Change-Id: I74f5fa25b70fbb5c514af3a72b5b6654d5c8e24d
2019-03-27 17:00:06 +00:00
Zuul 6e4322f82d Merge "Trivial: Fix the pep8 warning" 2019-03-20 06:33:13 +00:00
Luigi Toscano ed7ccad898 Fix deployment and tests (correct URIs, plugins)
- install also the Sahara plugins. The existing variable sahara_plugin_base
  is now used also for the list of installed plugins, in addition to
  the list of loaded plugins.
  The default set includes now all the available plugins.
- fix the URIs used by role tests. They will eventually go away
  in favor of the integrated tests, but they are needed right now.

Change-Id: I5a4066ad9e2cca7bbfeb82bca5b2e65badef2e22
2019-03-12 22:49:02 +01:00
melissaml 37ee466def Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: Iccf12250671a304d50b13ea4818e1897d2269e3c
2018-11-08 19:52:08 +08:00
Jimmy McCrory 6facffe550 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: I0747d097deea5f6c2556ab660ce9d1f22dd0eeb4
2018-10-20 15:28:29 -07:00
Jesse Pretorius ef77326013 Move Sahara test playbook into role
The Sahara playbook/vars are not used by any other
role, so we move them into the sahara role to allow
changes to be made to it without requiring an extra
repo change.

Depends-On: https://review.openstack.org/583428
Change-Id: Iad7bd929102a20c6a1620a12f217a6b040ba955c
2018-09-13 14:31:09 -06:00
ZhijunWei 55df48c58f 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: Idf00933d271b5e80bda9113ccaa1f3bc71eb60c6
2018-08-19 12:43:59 -04:00
Jesse Pretorius 009acad1a0 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.

Change-Id: Ib4ff0ca76eb7b2ccaa373eeb1812e3d6741193fc
2018-07-12 19:27:08 +01:00
Jesse Pretorius (odyssey4me) bfcba45c7c Revert "Disable keystone_authtoken/service_token_roles_required for now"
This reverts commit e88a3a6f72.

Given that most roles aren't yet instrumented to use service_token_roles
we have removed the setting in the os_nova role, so this override is no
longer necessary.

Change-Id: Ib3e22000fe1d641671b759172c892c1928db6a4d
Depends-On: https://review.openstack.org/581625
2018-07-11 11:01:34 +00:00
Jesse Pretorius e88a3a6f72 Disable keystone_authtoken/service_token_roles_required for now
Sahara currently cannot use this option, so we work around it being
set by default in the os_nova role by disabling it via a config
override.

This allows other roles to still use it by default, but specifically
disables it for os_sahara tests.

Change-Id: I11e342975e6a043fdba455d01c6dcfadbef1984f
2018-07-03 18:35:34 +01:00
Andrew Smith 4f4ea816cf 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 sahara service.

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

Depends-On: If4326a6848d2d32af284fdbb94798eb0b03734d5
Depends-On: I2b09145b60116c029fc85477399c24f94974b61d
Change-Id: Ib4153412b91e7d11cc9acdbe5af8a1a4280b44e8
2018-05-18 18:40:33 -04:00
Jesse Pretorius da46d8892e 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: Icd4e288808108b239d1c968c0fdff12e7ed366cc
2018-03-28 10:16:09 +01:00
Zuul f8ab235140 Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-25 17:39:22 +00:00
Jesse Pretorius 7afa3b9326 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: I3f54a5b66d1783d28173a0bbc1fe2a049b551241
2018-03-25 16:21:16 +01:00
Jesse Pretorius 08d0e93e68 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: I892cb343b0109d592354e4e98a9323c576b5a343
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:21:28 +00:00
Jesse Pretorius 4dfe61a85a 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: Ib20a93e516fe4d4de3f22b2e7c0a1043e7bcb740
2018-03-13 16:51:58 +00:00
OpenStack Proposal Bot dddd51fe50 Updated from OpenStack Ansible Tests
Change-Id: Ifff84f5b979f12c2bd8d8a821076fdef1acd9e29
2018-02-14 20:07:07 +00:00
Jesse Pretorius c369ed1e4a 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: I79d4b08e48207b067ff27925ae3f20df3e8d6127
2017-10-17 18:12:29 +01:00
OpenStack Proposal Bot 30cdfe6b24 Updated from OpenStack Ansible Tests
Change-Id: I8cda0f3bf52b0b56a8980cd540fd342395b999c7
2017-10-13 14:48:28 +00:00
ZhongShengping 7c9471993a Add ceph_client role
The role 'ceph_client' was not found in openstack-ansible-os_tempest,
so add it.

Change-Id: I14a72213324b953a8c7714c84399e9e1b52799cc
Closes-Bug: #1704294
2017-08-07 10:16:23 +08:00
OpenStack Proposal Bot dcafc59352 Updated from OpenStack Ansible Tests
Change-Id: Id3d0a9ed55c653829abd1b7d37ace66b6167b478
2017-06-22 15:19:59 +00:00
Jesse Pretorius 8405fd4369 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: Id74a3c801f369d990516c35473ecf5e6ccc734bf
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:53:08 +01:00
Jimmy McCrory 259711481c 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: I0a771467cfebd10305b2c81fc4858d64111ecdea
2017-04-19 17:37:41 -07:00
Flávio Ramalho 95e4f4877b Role cleanup/update for ocata
- Use dictionary for service group mappings, bringing the
  role into line with the method used in other roles;

- Use systemd module instead of shell on the services
  restart handlers;

- Use ansible package module to install distro packages;

- Added variables for CentOS. The role should now support
  CentOS;

- Removed extras folder.

Change-Id: I5c8430804aacceca01c5821ca2528514033d15f4
2017-02-14 09:35:30 -03:00
Andy McCrae 73d1cd2950 Add nova_api_placement group to tests inventory
Change-Id: If541b4ee915b3e54818af0af0b9e0e7309ab1a9c
2017-02-08 12:02:52 +00:00
Jimmy McCrory afbed4793c Execute tempest using updated method
The old method of executing tempest via run_tempest.sh from
the root of the git clone has been deprecated and will soon
be removed.

Change-Id: I9779b4463d6882e28be305ba03ded703b15f51b0
2016-12-08 09:33:34 -08:00
Jimmy McCrory 1697ed4d11 Test using sahara tempest plugin
Tempest tests for sahara were moved out of the tempest repo into their
own plugin repo. Update the functional test playbook to run tests
provided by the sahara tempest plugin.

Change-Id: Ic12bccd6eac91163e21dfd4de9eabb99498ca599
Closes-Bug: 1638883
2016-11-15 11:15:26 -08:00
Jesse Pretorius f7e63e3796 Temporarily pin Tempest SHA for Sahara testing
As of October 5 with https://review.openstack.org/380082 the
tempest tests for data_processing are no longer included in
tempest.

This patch pins the tempest SHA used to the parent of that
patch to allow functional testing to continue until a revision
of the functional testing in this role can be done.

Change-Id: Ia5dcca5cd36da3af26d4ad608fbf6b311433f942
Related-Bug: 1638883
2016-11-04 09:49:09 +00:00
Travis Truman 76d83ee22e Ansible 2.1.1 role testing
Depends-On: I1c582502c3360fd6c20443faeca84de3900465d1
Change-Id: I5f7aea355e6df97620190c1afde214f191872970
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-10-03 14:12:51 +01:00
Jesse Pretorius a7955a9afe 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: Ide463fde793aa044c5288ae50e87a6be771a8e4d
Related-Bug: https://github.com/ansible/ansible/issues/17687
2016-09-22 15:38:53 +01:00
Jesse Pretorius c3e9c5f47f Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: I1162765d88554e6858bd2aad6af1a390353a4440
2016-08-30 19:59:58 +01:00
Travis Truman 546777298b Support service-specific rabbitmq clusters
All rabbitmq connection vars are now namespaced. Namespace support
was previously inconsistent which limited deployer override options.

Change-Id: Ife9a394be5c21c85353966cf82e69a8ff3a13204
Implements: blueprint multi-rabbitmq-clusters
2016-07-25 14:27:30 +00:00
Jimmy McCrory cbd153c232 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: Id1f2786fb745cda8984b650c961814f8958fc110
2016-07-22 09:03:25 +01:00
Jesse Pretorius a2732b20cc Ensure that OpenStack-CI mirror is used for UCA
The role test implements a test to verify whether it is running in
OpenStack-CI, then discovers the appropriate URL for UCA and
implements it as a fact for the os_nova role to consume.

Depends-On: Iffa32adb971f281e7e274209ee500b1756fbf0a1
Change-Id: I60c5575a5ad02d0fa958912bdbc596f2f44e48b0
2016-07-22 07:26:50 +00:00
Jenkins 3c288ac386 Merge "Only install to virtual environment" 2016-07-11 13:52:41 +00:00
Jesse Pretorius 1ea1530690 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: Ic8b35f61bfcc8af3b37c895e47dc6fbad063d4b4
2016-07-08 15:43:41 +01:00
Anton Khaldin 625304c636 Only install to virtual environment
Remove all tasks and variables related to toggling between installation
of sahara inside or outside of a Python virtual environment.
Installing within a venv is now the only supported deployment.

Additionally, a few changes have been made to make the creation of the
venv more resistant to interruptions during a run of the role.
* unarchiving a pre-built venv will now also occur when the venv
  directory is created, not only after being downloaded
* virtualenv-tools is run against both pre-built and non pre-built venvs
  to account for interruptions during or prior to unarchiving

Change-Id: I1ca77e5125911a6d6ac0745abd2259ee3ece4612
Implements: blueprint only-install-venvs
2016-07-08 05:54:07 -07:00
Jesse Pretorius 746305871a 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: I5ce69a4d9b64d955e3d7a794a078a660dd97b5f5
2016-06-17 19:35:22 +01:00
Jimmy McCrory 144246bf12 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: I537994fc2f4c1132938837a7d5428db4f5dc282a
2016-06-14 10:09:19 -07:00
Jimmy McCrory 0492a82c10 Use master git branches
Update defaults, test vars, and test role dependencies to use the master
branch of git repositories for consistency with other roles.

Change-Id: I905b1fd7e76b45113554e031dcd3488bf618b6f1
2016-06-13 10:31:11 -07:00
Flávio Ramalho 45afc91aaf Test sahara with tempest
This change adds functional tests to the sahara role. It install tempest
and and then runs the data processing scenario tests.

Change-Id: Ie6e606fb2e624fdad57cd06b8ea8a8d8773bf243
Depends-On: I8abc5c567e0d3e5829b9f7da8be5b0d0fc065ea7
2016-06-08 08:32:43 -03:00
Flávio Ramalho 15c7917f30 Added Apache license boilerplate 2016-05-12 12:55:46 -03:00
Flávio Ramalho 23f25f425e Initial import 2016-05-12 10:28:58 -03:00