Commit Graph

63 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov c65816fc06 Cleanup after repo_build and pip_install retirement
Depends-On: https://review.opendev.org/727749
Change-Id: I523f601aee23d26623078491d1ebec444bba814f
2020-05-20 20:31:08 +00:00
Dmitriy Rabotyagov 6c7bf4652a 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

Change-Id: I837aefc043d91212b21ca3cb3d9851e3a33b358e
2019-11-14 16:51:20 +02:00
Dmitriy Rabotyagov 027224854d 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: I354ff3e81f4f4586aa2d52e1dcd8359c16a9e39a
2019-09-05 14:11:14 +03:00
melissaml 9a718247f7 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I0f1c6adc541b3bfccb523f4a48552933fd9ef309
2019-07-10 19:26:51 +08:00
Jimmy McCrory fe179ea9e1 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: I692d538976b7be49e35ef0f2f3d90aedd4355542
2018-10-20 15:28:29 -07:00
Zuul db51a18ef2 Merge "Trivial: Fix the pep8 warning" 2018-08-17 05:47:51 +00:00
caoyuan d39ef34a44 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: Ie58b6b3ba46a1d6ff2d1ed855b7186a251323d2b
2018-08-15 17:12:05 +08:00
Jesse Pretorius 5678153fa9 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/glance/cinder client libraries are 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.

Depends-On: https://review.openstack.org/582359
Depends-On: https://review.openstack.org/582579
Depends-On: https://review.openstack.org/582957
Depends-On: https://review.openstack.org/583430
Change-Id: Id3b9d57981006d3f7abbb94af5f72214db3da6cb
2018-08-08 10:36:16 +00:00
wangqi 6ed8767cd7 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: I55a1dfd56348d42c1a9a9ffc3060efbef16fbd6a
2018-08-06 07:35:59 +00:00
Jesse Pretorius 2bf14e2122 Remove unnecessary MQ vhost/user creation tasks/vars
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 remove the test vars and tasks which were duplicated
as they are no longer required.

Change-Id: Ibc217400d16ce06f9943d69e2305e46762ec2662
2018-07-30 12:02:24 +00:00
Andy Smith e587d74d29 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 aure 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 magnum service.

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

Change-Id: Ib44af3b1d153742975351a321d65c8812a994370
2018-07-20 11:53:00 +00:00
Jesse Pretorius e0e33a5f8d Switch compute/storage to use different inventory_hostname
Our role tests execute as non-root users, and the roles
need to access the environment variables for that non-root
user. Ansible, when targeting localhost, changes to
'connection: local' and thus breaks everything we need
to do against localhost as root unless we use 'become: true',
but we if generally use that against remote hosts we lose
the environment variables for the non-root user.

As such, we switch the inventory to target 'compute1' instead,
which has the address '10.1.1.1' (br-mgmt), so that we do not
have to deal with the implict connection type changes implemented
by Ansible.

Depends-On: https://review.openstack.org/584033
Change-Id: I137b9a59520c35e6342c4883435fd191fbc5dd68
2018-07-19 18:05:03 +00:00
Zuul 213b530828 Merge "Move database creation into role" 2018-07-02 19:16:37 +00:00
Jesse Pretorius 52083133f6 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 'magnum_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 'magnum_galera_address' which
has been used for a long time, but never documented. A bunch of unused
variables have also been removed.

Change-Id: I81263f316503c12f8e7b35e6ba9be12cc72cda1a
2018-06-29 09:04:10 +00:00
Jesse Pretorius 9fc97e43e3 Move test overrides into correct file
The use of a vars file for tests is a very old pattern.
This brings the role into line with the new pattern.

Change-Id: I44000bd8c44ed52f44c12f93bbdf11d84e4b8f27
2018-06-28 17:44:11 +01:00
ZhijunWei 2da93de836 Replace port 35357 with 5000
Now that the v2.0 API has been removed, we don't have a reason to
include deployment instructions for two separate applications on
different ports.

Depends-On: Ife5023bc4752cf3c2d7221f9f8772990c6bc09df
Change-Id: I30b2b269deb7eb68b7d7d7de1a935b4b5b7bf494
2018-06-24 17:21:43 +00:00
Jesse Pretorius 3e4e1477a9 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: I05ea8250283fbf616b8f4de157c9e803b0f05ca6
2018-03-28 10:14:46 +01:00
Zuul 2d946494b2 Merge "ansible-role-requirements: Use systemd_service role from openstack namespace" 2018-03-25 18:09:07 +00:00
Jesse Pretorius b1c3e9990f 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: I7e2d99356a7d6310b1fb2ff1859a6edf893627ee
2018-03-25 16:20:24 +01:00
Jesse Pretorius e01ed7eba5 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: I3e749a942294525be64f7ef47a54ff486d459045
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:20:28 +00:00
Jesse Pretorius c4a6d74817 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: I092e2419f669c71167bf464cfec3ffeef27be003
2018-03-13 16:50:59 +00:00
OpenStack Proposal Bot 55c9cbee5d Updated from OpenStack Ansible Tests
Change-Id: I2c07e17a2e2e1a54916a761e54383df0b29d0889
2018-02-14 20:06:14 +00:00
Mohammed Naser d484d3097e Update the Tempest plugin to point towards the new plugin
The Magnum service has split it's tests for Tempest in a seperate
repo so this patch updates it.

This patch also fixes the lint issue to use the systemd module
reload feature instead of a command.

Co-Authored-By: Jean-Philippe Evrard <jean-philippe@evrard.me>
Closes-Bug: #1747607
Depends-On: I5f1ecb71c6125c29d6487bef6c2be215c1b561c1
Change-Id: Ia4e323eda453ae3e8dacf3dcf14d175e00727b4f
2018-02-06 15:14:04 -05:00
Jesse Pretorius 487c5011b6 ansible-role-requirements: Switch ODL git repo to the github mirror
Cloning from the official ODL git repository fails far too often with
the following error

fatal: unable to access 'https://git.opendaylight.org/gerrit/p/integration/packaging/ansible-opendaylight.git/': gnutls_handshake() failed: Error in the pull function

Lets switch to the github mirror which may be more reliable.

Change-Id: I012c96803b8e107fee8ee5a6bc324e6ec68b435d
2017-11-21 10:40:32 +00:00
Jesse Pretorius 2cf8952d6b 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: Ib5ec32e6f746ae11e8f74453c0232b060516eafe
2017-10-17 20:24:58 +00:00
OpenStack Proposal Bot 5b1bccc1e8 Updated from OpenStack Ansible Tests
Change-Id: I750df17e34158e4142da23dd9d3077c0914047f4
2017-10-12 20:44:38 +00:00
Jean-Philippe Evrard cf0a3c9bac Fix cinder_service_region undefined
Due to the simplification of group vars [1], we've removed the
definition of cinder_service_region for magnum.

We could put cinder_service_region in all group vars instead,
but it looks like the scoping is done wrong.
We should instead rely on save defaults on the role, that can
be overriden.

Here, we introduce the variable magnum_cinder_service_region,
which defaults to magnum_service_region, i.e. "RegionOne".

We can remove the need for an override that way, and properly
scope variables.

[1]: https://review.openstack.org/#/c/504804/18/group_vars/all/cinder.yml

Depends-On: Ia8417bbdac3f515e42d1ed760110a63ae14f8f00

Change-Id: Id25c2d344859adfd09108b759d55f11ae83f97a9
2017-10-05 14:13:42 +00:00
Jesse Pretorius 686ae1f345 Add opendaylight role to tests a-r-r
In order to pass the lint test, all meta-dep
roles for the roles we execute in the test must
be present. As the os_neutron role recently got
the opendaylight role added as a meta-dep it is
now required here too.

Change-Id: I0069d97528382e0ce234a8e83ad4ed5ab52dc56c
2017-08-25 10:38:38 +01:00
Markos Chandras 28e192744d Update Fedora test image sha1sum to latest
Change-Id: Ie2368da65f932927fb0c87a1939117edde393fd6
2017-08-15 14:49:36 +01:00
ZhongShengping fa6142ae16 Add ceph_client role
The role 'ceph_client' was not found in openstack-ansible-os_magnum,
so add it.

Change-Id: I0b584a0af7373c4f4b7825a840231e8e43077190
Closes-Bug: #1704294
2017-07-17 10:33:25 +08:00
OpenStack Proposal Bot ff0d348dbe Updated from OpenStack Ansible Tests
Change-Id: I20ac2bc40636c07ee3e5bf6d6ea7e7179c606e01
2017-06-22 15:19:41 +00:00
Jesse Pretorius fc3732d9b1 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: I6d69ead3807870f9403f509c286e5fe1afb89549
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 16:52:12 +01:00
Jimmy McCrory 830d94cd5f 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.

Duplicate 'ansible_host' definitions have also been removed.

Change-Id: I069d2113832cf0fe49695c5424f56ed5dad8fee6
Depends-On: Iefe86bbebac49efb6a3a98b5e070ff11e7fb07b2
2017-04-24 10:56:30 -07:00
Mike Carden 111cb9bd4b Update Fedora test image sha1sum to latest
Change-Id: Ibc65928ff55b2daadcdff5b90a14ce60f86613bb
2017-04-12 14:34:59 +10:00
Jesse Pretorius 04ed6e50ff Update test image sha1sum to latest
Change-Id: I40b7848a8cb5f0ee5cf33ed91c1984e68cadde0d
2017-02-18 11:54:36 +00:00
Jimmy McCrory 8b91d42c18 Remove ssl_cipher_suite from test vars
This variable can be provided through the haproxy_server role's default
variables.

Change-Id: I61ba43bcc2540bded67072edee6d27800f54f865
Depends-On: Ib6ec9c95e166eb78173c9d3a642494cd2f04f0f8
2017-02-10 12:03:54 +00:00
Andy McCrae 6f8325ada9 Add inventory for nova_placement service
Additionally, fix the SHA for the magnum image.

Change-Id: Ia3161a9c64225752b46e94a0f924f6d6738f2077
2017-02-08 12:12:14 +00:00
Andy McCrae 73ac3f555e Fix test SHA for fedora-latest image
Change-Id: I53613ea42043497e4276a3630b6b3a613609e708
2016-12-15 16:40:55 +00:00
Jimmy McCrory 28f1b7a6ea Use common heat test playbook and vars
Use the common heat playbook and variables included in the centralized
tests repo.

Change-Id: I008e1a7a864151704d4220465fcff8856059de1f
2016-12-09 10:47:32 -08:00
Jenkins 4ef89d7e79 Merge "Expose magnum_cert_manager_type and set default" 2016-12-09 11:45:37 +00:00
Jimmy McCrory 36128c1e89 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: I13a43cf52dc06daf66165191b981c8029bfc26b8
2016-12-08 09:29:39 -08:00
Adrien Cunin d602033495 Expose magnum_cert_manager_type and set default
Default is x509keypair so Barbican is not required.

Change-Id: I9c29f687f77770c16568423ec86fadb96aa3aced
2016-12-08 14:47:22 +01:00
Jimmy McCrory 2e096ecd54 Use upstream openstack image module
Replace the use of OSA's glance library with the upstream Ansible
os_image module. This should be much more reliable for larger images,
such as magnum's. Include the in-role task in testing and remove the
additional testing tasks that were performing the image upload outside
of the role.

Related-Bug: 1538642
Change-Id: I017303e9a731ebc60315ea1784ba184a8294b08e
2016-11-10 15:25:11 -08:00
Jimmy McCrory 22c3ddf9e8 Create magnum flavor using tempest role
Create the m1.magnum flavor by overriding the tempest_flavors variable
of the os_tempest role instead of shelling out to the nova client.

Change-Id: Ia9b28bc98d838e3e1bce49dc72700b1b2a7235b7
2016-11-03 07:30:35 -07:00
Kevin Carter 64825eb4a1 Remove deprecated ansible_ssh_host variable
This changes 'ansible_ssh_host' to 'ansible_host'. The 'ansible_ssh_host'
variable has been deprecated as noted here: [0].

[0] - http://docs.ansible.com/ansible/intro_inventory.html#hosts-and-groups

Change-Id: I06c26bc22ecbbbd7e858027a6b7fef22316efa22
Related-Bug: #1636606
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-11-02 22:36:47 +00:00
Jenkins 4b3eacae45 Merge "Use centralised Ansible test scripts" 2016-11-02 22:11:41 +00:00
Joshua Hesketh cd058937c6 Replace github with git.o.o
Change-Id: Iaacfffccb6129d00e18aa8789cf80f0625b25214
2016-11-02 19:25:30 +00:00
Jesse Pretorius 007a748cbf Use centralised Ansible test scripts
This patch consumes the centralised Ansible test scripts
implemented in https://review.openstack.org/381853

Change-Id: I71328a0d24eec716232a227ce52c63e25102ae46
2016-11-02 19:22:46 +00:00
Jimmy McCrory 673688eb85 Only run cluster tests
To cut down on gate execution times, run only the cluster tests instead
of the entire set of API tests.

Change-Id: Idd58db90dfd818f20a28496e79ecf9d6a4c4c5bb
2016-10-16 13:15:39 +00:00
Jimmy McCrory 6f477978b2 Add basic functional tests to role
This implements the use of the openstack-ansible-tests repo and deploys
magnum, along with dependent services, to exercise basic functional
tests through tempest.

Change-Id: Ib9c986b5abe3f42b663af9981bed43c9aae8036d
2016-10-04 15:18:12 -07:00