Commit Graph

78 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 887a59256e Use systemd_mount native syntax for mounts
Currently we have bunch of limitations related to the format
of ``glance_nfs_client``. While systemd_mount role is flexible enough
to allow mount cephfs or s3fs, variable format has weird assumptions
that we want to change for better flexability.

Since keys of variable are changing, new name for it was picked to
reflect purpose of the variable better.

Change-Id: Ic0d91a3a873b4253255beac79becf01b4a304695
2022-04-12 12:56:38 +02:00
Dmitriy Rabotyagov d8576660db Add pki role to local a-r-r
Change-Id: Ie408aee43116feeaf99ad05cebe764bb855a31c2
2021-07-02 12:19:56 +03:00
Jonathan Rosser 39fe4af6e2 Remove remaining suse reference
Change-Id: Iec900b9a536681ea2f21c559c5d4ae114ab412f3
2021-03-15 17:59:45 +00:00
Jonathan Rosser ae6c72997c Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I03b51e2cf342b8b1434503f2bd0f4b30dcd5258e
2021-02-23 18:05:14 +00:00
Jonathan Rosser 7418eed9b3 Remove support for lxc2 config keys
Change-Id: Ife936a720b4039e53862dde4952bf5c0f76bc7c6
2020-10-06 11:41:11 +01:00
Dmitriy Rabotyagov ed736fd783 Cleanup glance-registry service
Glance-registry service has been removed in V cycle with [1]

We do all necessary cleanup to fully remove service deployment.

[1] https://review.opendev.org/738671/

Change-Id: I0b2e2e39040fd0daef04724f94a39f2d11e4d105
2020-07-07 07:30:17 +03:00
Dmitriy Rabotyagov eaa83ca658 Cleanup after repo_build and pip_install retirement
Change-Id: I3a87a73e1452c6e7f6866767c0338d5aa2543b1a
2020-05-12 19:33:39 +03:00
Dmitriy Rabotyagov 4b2724b44b 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.

Depends-On: https://review.opendev.org/678025/
Change-Id: I6f129940e55130c289d94138171cee54dbd28fc1
2019-09-04 15:32:08 +03:00
Dmitriy Rabotjagov e01aed0d63 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: Ice94fbb7881061c2ce79dbc15eb3e062a655d45e
2019-05-30 09:38:22 +00:00
Jimmy McCrory 15417480bf 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: I5f7b222d92765dc7aaac8dfc83b4c05e160a3126
2018-10-20 15:28:29 -07:00
ZhijunWei a427089ea8 use import_playbook 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: I87fa723334745680efd87743ac936815df664c4d
Closes-Bug: #1792761
2018-09-27 01:54:41 +00:00
Zuul 7727a95674 Merge "Trivial: Fix the pep8 warning" 2018-09-13 10:39:25 +00:00
Jesse Pretorius 221e1549ff Clean up role tests
Now that we're using the general templates, we can slim down
the role test definitions. We can also remove tests which are
not being watched, or which are fundamentally broken. With
this we can also remove unused scripts/plays.

We do the following:

1. We remove the 'ssl' job, given that the person working on
   that is no longer doing so, and no-one else has picked up
   the work.
2. We remove the 'upgrade' job, given that it's been broken
   all cycle due to the way the job executes and we need to
   regroup to figure out another way to do it.
3. We promote the distro_install jobs, given that they are
   all now working.

Change-Id: I9d33daeb6d591c6919f131aafd62c4a33e4ff68f
2018-09-07 13:30:01 +00:00
wangqi ac1921af23 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: Ied016d208fa19f176c86b0f04f9406ba264e4d22
2018-08-06 07:29:38 +00:00
Zuul 5586769730 Merge "Convert role to use a common systemd mount role" 2018-07-31 15:13:33 +00:00
Kevin Carter 659e3278d0 Convert role to use a common systemd mount role
The systemd unit files are being converted to use common roles to reduce
code sprawl throughout the playbooks. This change allows us to use a
common systemd_mount role as an include which will give us a consistent
experience when deploying services and setting up their resournces on
OS's that uses systemd.

Closes-Bug: #1774037
Change-Id: I11d083788cd388dab0695878193ab18af1b5038b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-07-30 18:39:12 +00:00
Jonathan Rosser 1b4d4212c8 Add lxc3 compatibility to tests
lxc3 deprecates many legacy config keys [1].

[1] https://discuss.linuxcontainers.org/t/lxc-2-1-has-been-released/487

Change-Id: I7b19b483f32ba46cbc87a8586ae092e96f067090
2018-07-30 17:37:23 +01:00
Jonathan Rosser 33b0e35e06 Remove glance v1 api and tests
The glance v1 endpoints were removed in [1].

[1] 3dde3204d5

Change-Id: I90f0b7c6963c433aba6d91e7f4df4401e410439e
2018-07-30 17:37:23 +01:00
zhulingjie 5b44a334fc Remove the unnecessary space
Change-Id: Ic219247ccc57bc174c3e2eae0eb00d234be6b739
2018-07-11 23:19:16 -04:00
Jean-Philippe Evrard fb2802d2e4 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: I6749670146cc64cb39b67efb26a9226208828ae7
2018-07-12 16:44:20 +02:00
Jesse Pretorius fa11f38215 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. 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.

Ansible 2.5 is a hard dependency for this patch due to the dynamic setting
of the ansible_python_interpreter, which in 2.4 is literally interpreted,
but in 2.5 thanks to [1] is now templated. See [2] for more details.

[1] https://github.com/ansible/ansible/pull/33698
[2] https://github.com/ansible/ansible/issues/18665
Depends-On: https://review.openstack.org/501814
Depends-On: https://review.openstack.org/568139
Depends-On: https://review.openstack.org/568141
Depends-On: https://review.openstack.org/568146
Depends-On: https://review.openstack.org/571423
Depends-On: https://review.openstack.org/579233
Depends-On: https://review.openstack.org/579959
Depends-On: https://review.openstack.org/580156
Change-Id: I6a5a85fae5a481900149a343a163fe82e788d1eb
2018-07-06 13:54:34 +00:00
Andrew Smith 87d070f4be Update to use oslo.messaging services 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 glance 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
Change-Id: Ib647d87df040c77ee3906b1bf58764ca5f3d765d
2018-05-30 14:33:02 -04:00
Jesse Pretorius 6064ed0a70 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: I045bd91dd77c911b1b77b152b6feaa318adbe0ce
2018-03-28 10:09:37 +01:00
Jesse Pretorius 975675b659 Use a common python build/install role for source-base deployment
Instead of copying a common set of code between all the roles,
switch to using a common role which checks whether a deploy host
already has the appropriate venv package. If it does not, build
it on the fly and pull it to the deploy host.

Implementing this does away with the requirement to do builds
on the repo container. Once this has been implemented into all
roles then the repo_build role will be retired.

Depends-On: https://review.openstack.org/556840
Change-Id: I57e87406bee5c7d10aa824f18d3142f8f3ac6ab4
2018-03-27 13:37:10 +01:00
Jesse Pretorius 1ef4471ea5 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: I73f103dd0faa9af88a3a7bd6d0daa55643892e74
2018-03-25 16:17:21 +01:00
Jesse Pretorius 13d9b617cb 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: I7f8a3404dde69fdea4d9cad6febc79b62dd9ee7b
2018-03-13 16:50:03 +00:00
Zuul 5e233139dc Merge "Update upgrade script to use queens" 2018-02-19 10:20:33 +00:00
OpenStack Proposal Bot c894349b43 Updated from OpenStack Ansible Tests
Change-Id: Ie52de3de5da2856043c1335c326911d168cf11ba
2018-02-18 12:53:54 +00:00
Major Hayden 835f47d44c Update upgrade script to use queens
Change-Id: If282457b37dee4d5c8c63b69ae6fdf9ed4c1b374
2018-02-16 18:44:31 +00:00
Jimmy McCrory 79d89d2192 Run openrc role ahead of rolling test script
The rolling upgrade test script requires a clouds.yaml file to look up
the required authentication information. Run the openstack_openrc role
to create clouds.yaml.

Change-Id: I5e11973029e009c728c2060fedad114efb9adf68
2018-02-14 11:42:47 -08:00
Jean-Philippe Evrard 594412d43a Use a venv with previous ansible version for upgrades
When doing the role upgrade, we run every playbook with current's
branch ansible. This is normal for the infrastructure bits (which
are running on current branch), but not for the installation of
the previous branch's role, which should use previous branch's
environment.

This patch also renames test-upgrade-pre to test-upgrade, to
be in line with other roles.

Depends-On: I7ebb045885dd645b820de2b7f75b46c755c015f6
Change-Id: I3e7198d368ef1d7373bb036f60a75d1ddfa4b45c
Related-Bug: #1741471
2018-02-01 11:54:45 +00:00
Jean-Philippe Evrard ce44dc6a08 Fix upgrade test
openstacksdk was updated to 0.10.0 which has a different
connection.Connection object, which doesn't take our auth_url.

We should respect the constraints, install the tooling in a venv,
and restrict to a known version of the sdk until more robust code
is written.

Change-Id: I0a8a5ac589b121e3a3ee98979c53340a1467f45c
2018-01-19 17:07:03 +00:00
Markos Chandras f0c7448fa2 tests: test-glance-upgrades.sh: Remove the exit trap
We are already collecting logs as part of the post-run playbook so we
don't need to do that as part of the exit trap. This avoid collecting
and compressing the logs twice.

Change-Id: I3b4de14b2e98941c948bc23747b85a1a6286b272
2017-12-16 13:31:09 +00:00
Kevin Carter 477d44cab9
Update glance NFS for systemd
Systemd has the ability to manage mounts and ensure functionality
/ resource management. Using a systemd mount has the benifit of not
requiring writes to the legacy fstab file which can impact OS
functionality especially when deploying on baremetal. This change
moves the glance NFS mount to a systemd unit file allowing systemd
to manage it independently with no potentially breaking impact to
the underlying operating system.

Changes:
 - This PR corrects a long standing issue when using Glance+NFS where
   initial deployment would work but if the playbooks were run again
   it would fail due to the glance images location being an NFS mount
   point with a potentially different UID/GID. To correct this we stat
   the directory and if it does NOT exist it is created.
 - Following the nova pattern options have been provided to set the UID
   and GID of the glance user.
 - To ensure out NFS backend solution works with the installation of
   glance a test has been added to deploy glance using an NFS backend.
 - An upgrade task has been added to this commit to clean up legacy
   mounts, This task should be removed in R.

Change-Id: I716c9fe35391629532e67e212d45ea27a5422d1b
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-12-12 17:49:55 -06:00
Jesse Pretorius 6534ebe2e0 Implement testing using tempest
Rather than the previous basic functional tests, this
implements the use of tempest to exercise the API's
properly to validate that they're working properly.

Included is the normalisation of the way the upgrade
test is implemented to make it exactly in line with
the way the original API upgrade test was implemented
in the keystone repository. This keeps it consistent.

Change-Id: Id491d018beb30bce748240b50e9d66dcc1a249fa
2017-11-20 12:49:10 +00:00
Jesse Pretorius 4fa9872510 Disable glance-registry and the v1 API by default
When using the glance v2 API the glance-registry service is
optional, and the intention is to remove the glance-registry
service in the S cycle.

The glance v1 API is scheduled to be removed in Queens.
This patch therefore disables the v1 API by default to give
us as much time as possible to identify the impact of that
and to get the issues resolved before it is removed from
the code-base.

The patch also cleans up the glance-registry init files
to handle the transition in an existing environment.

Tests are added to validate that enabling the v1 API still
works, and enabling the v2 registry still works.

Change-Id: I4c27aa0ca5b649e4fa76cfd0f326d80f50074db1
2017-11-20 12:48:55 +00:00
Jesse Pretorius 1416013cd4 Allow deployment without glance-registry
The glance v1 API is deprecated and intended to be removed
from the glance code within the Queens or Rocky cycles.

When using the glance v2 API the glance-registry service is
optional, and the intention is to remove the glance-registry
service in the S cycle. The glance-registry service is required
when using the v1 API though.

Furthermore, when using the glance-registry service it is not
possible to execute a rolling upgrade without losing API
transactions.

Given the above information, this patch enables the deployment
of glance with only the v2 API enabled, and without the
glance-registry service. It adds a per-commit test to validate
that this configuration works.

This patch also corrects a previous misconfiguration which
enabled the v2 registry service, but did not set the data_api
correctly for the API service to inform it that the registry
was operating.

The glance_enable_v1_registry variable is also removed as it
is meaningless. The v1 API *requires* the registry to be
enabled, so we just enable it if glance_enable_v1_api is
enabled.

Change-Id: Ie95daed286798d139f0a35ffdd2a4dd1cdda6ff9
2017-11-20 12:48:02 +00:00
Jean-Philippe Evrard 2cab2c2298 Update upgrade role for Queens from P
This changes the a-r-r with the proper version, and fixes
the repo path for role upgrades:

The role will, during test-upgrade-pre, have its current branch
checked out, and will deploy the current branch infrastructure,
including the generation of the constraints.

Then, the installation of previous branch of the role will use
the constraints for its previous version, but will have no
constraints for it, and fail.

We need to generate the constraints for the previous version too.
This should do it.

On top of that, we needed to update the work for Zuul v3:
This implements the 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: I8710e7b9bb6010ba98279f61a63274ace56f6e8d
Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2017-10-17 18:32:54 +00:00
Jesse Pretorius 2e952eaf80 Update upgrade role for Pike
Change-Id: I74e4d597ac08c747cff3824cb6638c1bf4459243
2017-08-23 13:14:39 +01:00
Logan V 3bbd8d13fe Include ceph_client role if needed
Moves the ceph_client role execution inside the os_glance role
instead of executing it at the playbook level.

Change-Id: I1d24a82f22663150f0db5bbfcb4d957d600db5c2
2017-07-13 13:30:57 -05:00
OpenStack Proposal Bot 3f5e8a7449 Updated from OpenStack Ansible Tests
Change-Id: I578c857c592912ea6e3e211fe8c38810ba69c467
2017-06-22 15:19:28 +00:00
Jimmy McCrory d319fd2bb4 Install openstacksdk for rolling upgrade test
bowling_ball requires the openstacksdk be installed.

Change-Id: I03afeccfd445335cf80c7181066d8df2936a6a6b
2017-06-15 18:01:25 -07:00
Nolan Brubaker 3d3917f9af Run service test during glance upgrade
Run the Glance API tests to create and delete images during an upgrade

Logs will be written to /var/log/glance_rolling.log

The result of the tests is collected in Ansible, but the gate currently
does not pass or fail due to it - it's simply stored in the
'rolling_test_benchmark_results' variable and displayed.

Change-Id: Ie37c15fb3379f8b687e7e47e6aa45deb01802424
2017-05-31 10:31:13 -04:00
Nolan Brubaker fc3c42c928 Correct name of service in test script
Change-Id: I77626fc154463d17286e0b620ac6fe61b6a85218
2017-05-23 11:40:02 -04:00
Jesse Pretorius 7727f7d42f 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: I1eef3d34dd96250df7817e330dd3e654037bd692
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 17:41:34 +00:00
Jimmy McCrory 2a200d7ca5 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: Id869b6c14369b895cf58a0e48d64d0d4cb3fd6f7
2017-04-19 17:12:22 -07:00
Andy McCrae ca39632763 Update test role to use stable/ocata in master
Change-Id: I3cda82f6fcb27646adc4f7d010243edce86ce3d1
2017-02-23 15:25:13 -05:00
Andy McCrae 8a29cb390c Split upgrade testing into it's own shell script
This will separate out the runs so that variables and modules are not
re-used across runs - ensuring the latest modules and versions are used,
and ensuring multiple versions of the tests playbook aren't required on
non-upgrade runs.

Change-Id: Ia79bee91950a841c4ee1fd17fe20d1f7ee994166
2017-02-17 17:14:08 +00:00
Andy McCrae 8f8b239b3c Split upgrade test into its own play
To avoid requiring all the os_previous_glance tasks to be evaluated, we
should split the 2 tests up. This will help make the gate more efficient
and avoids unnecessary issues.

Change-Id: Iae43ff48a6656e9fff0952d6d388e6699461b336
2017-01-20 16:39:07 +00:00
Andy McCrae 6bd22d2528 Glance upgrade testing.
Implement upgrade testing for os_glance role.

This patch adds an upgrade testenv, which configures a previous version
of glance, and the test-vars from the stable/newton branch to be used by
the previous version of glance.

We don't run functional tests after the initial stable/newton deploy
because a working stable/newton branch is already tested, and it's
assumed it worked if the upgrade works too - which is more efficient.

This follows the pattern setup for Keystone in:
https://review.openstack.org/#/c/384269/

Change-Id: I8b2418ffc9197814b0eb85da647916323f9cefd5
Implements: blueprint upgrade-testing
2016-11-22 11:06:30 +00:00