Commit Graph

46 Commits

Author SHA1 Message Date
Marc Gariepy 95d02e709a Cleanup ansible_python_interpreter
ansible_pyhton_interpreter is set to auto, it's not needed anywhere now.

Change-Id: I8cb2503a66e4b419ffbe2337d3e86ba68a2f574f
2020-06-17 11:14:17 -04:00
Dmitriy Rabotyagov d114af09d0 Cleanup after repo_build and pip_install retirement
Change-Id: Id71feb3c492343708cb21d3f25987af705cb388c
2020-05-12 21:55:04 +03:00
Dmitriy Rabotyagov b7a76fb341 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: Iec03bd79279e694678336880460bcb83f68d9780
2019-09-04 17:36:30 +03:00
Dmitriy Rabotyagov 57b88ebc65 Migrate gnocchi to use uWSGI
This patch moves gnocchi-api from usage of apache with mod_wsgi
to uWSGI, which means unification across another roles and
reduced maintenance costs

During migration period tasks that ensures apache won't listen
on gnocchi_service_port are present, but they are supposed to be removed
after train release.

Depends-On: https://review.opendev.org/671988
Change-Id: I06bbcb2f15108fc517742208ac5291719627ffe2
2019-07-25 22:47:29 +03:00
melissaml 73551555f8 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I25adc54c93e699e369ca36eef2d83467ca08221d
2019-07-10 21:26:45 +08:00
Dmitriy Rabotjagov 38340cf4bd coordination_url should be placed in DEFAULT section
According to gnocchi docs, coordination_url should be placed in DEFAULT section now
Otherwise deprecation warning is shown.
https://gnocchi.xyz/install.html#gnocchi-configuration-sample

Fixed test-install-gnocchi.yml syntax

Change-Id: Ief9073cf2f9c876c4c1a91568aab6a79d22ab626
2018-11-08 21:20:26 +02:00
Jimmy McCrory a50476d6de 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: I1ae15cabb5df513c7660825404327b8628b9ba2e
2018-10-20 15:28:29 -07:00
ZhijunWei 1ccaa81bc7 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: I9d70ec2b84cfb1ccd465e52c96addfadf248f3d1
2018-09-08 14:33:16 +00:00
Jesse Pretorius a8a34fe719 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: I4131312eea8c743e7803ccc622b7642c6082a4c8
2018-07-06 13:48:11 +00:00
Jesse Pretorius c6a34a379b 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: Id63cfb16906b7eeeafc32a6539e988926c39d208
2018-03-28 10:13:58 +01:00
Zuul 78034a0ba1 Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-25 17:04:24 +00:00
Jesse Pretorius c7b26b1288 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: I443fb8abbdc75828d51fea36ca05a12d6eee51b7
2018-03-25 16:19:45 +01:00
Jesse Pretorius e54a70cc9f 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: I4ced3207771b4e9b89d876e570a6d6bac16bc99c
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:19:50 +00:00
Jesse Pretorius d77eedfd19 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: I651ea676b12f99466325a0ae4032920df7e90655
2018-03-13 16:50:13 +00:00
OpenStack Proposal Bot 4833249dd2 Updated from OpenStack Ansible Tests
Change-Id: I0f96a7a482d587d544c9c7179b5e2085108b35d3
2018-02-14 20:05:39 +00:00
Jimmy McCrory d5060e8bac Add librados2-dev to distro package list
librados2-dev is need to build 'cradox', from gnocchi's ceph
requirements.

The package lists have also been alphabetized.

A linting error in tests was corrected to unblock the gates.

Change-Id: I91b579ff478c02f40fb1573b433735a6a3794e2b
2017-12-14 14:04:55 -08:00
Jesse Pretorius beaf7cdff0 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: Ifdcbee946cdc838b4b24304dacb1c98c8d78d500
2017-10-17 18:11:13 +01:00
OpenStack Proposal Bot ed61813e66 Updated from OpenStack Ansible Tests
Change-Id: Ic38875812fd589072346cdcdc7aebcd9d10d6750
2017-10-12 20:44:22 +00:00
OpenStack Proposal Bot a1a183bd28 Updated from OpenStack Ansible Tests
Change-Id: I12f931c5fc3ae92d4e53a75cbc62a7058a5eaf32
2017-06-30 17:10:20 +00:00
Andy McCrae 1f286a89e1 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: Id7c6c3a3256712073fb108a2f458098a853a63a9
2017-05-26 11:09:04 +01:00
Jesse Pretorius 1b71d3499a 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: I6ecdf214fc22916c82c219d02451c32aed9235dd
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:51:31 +01:00
Jimmy McCrory cd8b38a4b0 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.

Change-Id: Iff5a80b21d781b73e64a52e7becce08aeaefb92c
2017-04-19 17:26:15 -07:00
Andy McCrae 78e6f5ab0c Add api.auth_mode setting, and update api-paste.ini
Gnocchi moved their api-paste file out of /etc/, but in order to benefit
from template overrides, whilst keeping the default gnocchi
api-paste.ini, we can use it as a source, but use config overrides.

Additionally, we need to specify auth_mode in the gnocchi.conf file,
which should default to "basic" if keystone is not used, although can be
set to "noauth" if needed. "basic" is the new upstream default.

The gnocchi_keystone_auth var is deprecated and scheduled for removal
in the Queen release.

Change-Id: I4e1a28a96f3b6870d9c9e100308aba1bbf294aa0
2017-01-23 11:19:18 +00:00
Andy McCrae d87198a2e3 Adjust the Gnocchi test to check for a 403
When unauthorized this should return a 403 and not a 401.
The upstream Gnocchi test for unauth checks a 403:

https://github.com/openstack/gnocchi/blob/master/gnocchi/tests/test_rest.py#L895

Change-Id: I42958d851e88d83f1f18b9311122f9f94dac36f4
2017-01-12 14:20:10 +00:00
Marc Gariepy 1904d317d7 Standardize test environment.
Change-Id: Id31fb15b352a160c8f5139ae70966055d93f7ce6
2016-12-07 08:40:32 -05:00
Travis Truman 46a58b7851 Disable gnocchi-api service when mod_wsgi is used
The *_services dict pattern present in other roles
has been adopted and systemd/upstart service enablement
of the gnocchi-api service is now directly tied to the
state of `gnocchi_use_mod_wsgi`.

Change-Id: Ibc15c37bbd5a1a70b0774a1184b5759e558a0efb
Closes-Bug: #1633205
2016-11-09 15:05:25 -05:00
Deepak e131d6e468 Update test-vars.yml for repositories
Renamed in os_gnocchi role repo
Changed test-vars.yml to os_gnocchi-overrides.yml
Removed the test-vars.yml

Change-Id: I62ee2338f6bfeee06511a3077e11ed1e84baa66c
Partial-Bug: #1629284
2016-10-05 22:03:09 +05:30
Jesse Pretorius 0ff50b9914 Fix git source in ansible-role-requirements
For any openstack git sources, git.openstack.org must be used.

Change-Id: I07477aabc0335224d7401b8010fbc928ae336014
2016-09-30 14:41:14 +01:00
Jesse Pretorius 4767424831 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: Ieb2fda744a452e1244213cffe293d348a3771c63
2016-09-27 18:50:01 +01:00
Jenkins 5a4f781c70 Merge "Functional testing for the role gate" 2016-09-23 14:21:37 +00:00
Travis Truman 30bb3111cd Functional testing for the role gate
Simple REST API based functional testing for
gnocchi will now be run during the gate.

Change-Id: Ied96bca01cd3e6f47f2d75505d516b1eafbc7429
Closes-Bug: #1624521
2016-09-22 15:38:40 -04:00
Jesse Pretorius 095451208f 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: I43c2e417e5e7fde1419a8bc225581c2fb516508a
Related-Bug: https://github.com/ansible/ansible/issues/17687
2016-09-22 13:40:51 +01:00
Travis Truman d704118857 Rely upon test repo vars
This should make the role test more maintainable.

Change-Id: I4bda0128bc65e3d210c00b2205108e90d5fed25a
2016-09-20 11:11:28 -04:00
Travis Truman f4a9c58d68 Ansible 2.1.1 role testing
Change-Id: I0107c3a96bdae14baaedfb5634b4079c58e11f2a
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-09-19 13:30:23 -04:00
Jesse Pretorius ab9d1537cb Allow gnocchi to make use of keystone authentication
The upstream default implementation of gnocchi is not
to use keystone authentication, but a preferred deployment
configuration in enterprise environments is to ensure that
keystone authentication is configured.

This patch creates a simple toggle to enable it.

Closes-Bug: 1622251
Change-Id: Ic41cf161af1d59e5b0f4b71c0d698cd7348c962c
2016-09-13 17:31:41 +00:00
Jesse Pretorius 6d63addcfb 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: Ib4e9ea67433a897ce7102a453ae5560a64c55c60
2016-08-30 17:07:07 +01:00
Jesse Pretorius 9116aa05c0 Add ability to change apt/yum package state
The current method of installing the distribution packages required is
set in the tasks and cannot be changed by a deployer.

Currently the apt task always installs the latest package. This results
in unexpected binary changes when a deployer may simply be trying to
execute a configuration change.

This patch adds the ability for a deployer to change the desired state
so that the results are predictable.

This patch also remove duplicated apt install tasks and the is_metal
variable which is not used anywhere.

Change-Id: I0368cb090b37bf92b0ffce3cee8d7f4c4f61135b
2016-08-02 13:57:42 +01:00
Steve Lewis da8e0b7bc1 Normalize galera password and clean up role
The role has historically used a different password variable.
Because the role is being maintained by the community now it makes
more sense to normalize the password for ease of maintenance.

The no-longer needed operations to create the DB and grant access
are removed from the role as these are in the integrated project's
playbook now. These tasks are added as pre_tasks for testing.

Similarly, the contents of the /ext directory are eliminated as
these are no longer needed since all of the contents have been
applied to the integrated gate.

Finally a run_tests.sh file is added for consistency and to fix the
bashate lint job which fails when there are not matching shell
scripts.

Change-Id: I7b9046dfe7ba258218b4d14ec8d4f270e917ca34
2016-07-27 21:54:43 -07:00
Jimmy McCrory e1b2e49a8e 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: I0a3e5b7a5d3a0d660e786681c5369eaeffcfad3c
2016-07-20 18:47:01 -07:00
Jimmy McCrory 78350d1518 Only install to virtual environment
Remove all tasks and variables related to toggling between installation
of gnocchi 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: I7a75e87d4451d62ee4587654cf5dbfb3789991c8
Implements: blueprint only-install-venvs
2016-07-08 02:54:25 -07:00
Steve Lewis aa328e6da4 Use pbr WSGI script to build gnocchi-api
Removes host and port from api section of config file template.
Also cleans up Ansible Lint warnings

Related-To: I2298f9cb94a684747f4b4dbc262cdcab7de49175
Change-Id: I56954df3d13b86cfcb4eb68e419ce13dfac2c051
2016-07-08 00:26:59 -07:00
Jesse Pretorius 59223dc2c5 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: I4dd7f3b36ffbf523c14eecf21edcd7d558483ba6
2016-06-17 18:35:07 +01:00
Jimmy McCrory 99843f9e35 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: I352af7887cecd5c54d8cf8e1dec57048b8fdc465
2016-06-09 11:29:59 -07:00
Steve Lewis 17b954d8e5 Implement Ubuntu 16.04 support with SystemD
This change updates the Gnocchi role to support Ubuntu 14.04 with
upstart init and 16.04 with a systemd init.

A change for the functional tests disables them. They will be
fixed properly in a following patch.

Change-Id: I6170a3bcc6ad61474a0a70c786b2607915868e17
Related: blueprint support-ubuntu-1604
2016-06-07 09:04:28 -07:00
Steve Lewis a7c38ce7a1 Initial convergence testing
An initial convergence testing for the role is provided but it is
not installing or configuring ceilometer yet. That work is held back
until we have the role passing basic testing. This stage of testing
also attempts to avoid installing rabbit as an unnecessary
complexity.

A separate container is used for gnocchi so that gnocchi can be
deployed under mod_wsgi without conflicting with Keystone. In turn
some changes to the inventory pattern, and the use of group_vars for
internal and external _lb_vip_address values is introduced here as
there is no load balancer and traffic for each of Keystone and
Gnocchi needs to be addressed appropriately.

Partial-Blueprint: role-gnocchi
Change-Id: I27a76a62b2443787e5347f08e974a9eb3cc33dbe
2016-04-22 00:14:14 +00:00
Steve Lewis 3610b115bb Enable ansible lint and syntax tests
This prepares the role for the next stage of testing, enabling role
convergence testing.

Change-Id: I12a9621ce3604fd7d2d3609b0586c894eeea9e9a
2016-04-12 09:32:17 -07:00