Commit Graph

85 Commits

Author SHA1 Message Date
Andrew Bonney dfa253d72c Adjust default configuration to support TLS v1.3
This adds a new variable to manage TLS v1.3 cipher suites.

The old variable for TLS v1.2 and below ciphers is renamed for
consistency, but is still supported as a default where overridden
by deployments.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/823943
Change-Id: If857ec3e2e3728f6bea9740ff43dcb2df45429d2
2022-01-10 13:49:45 +00:00
Dmitriy Rabotyagov 109d5b83b4 Add pki role to local a-r-r
Change-Id: Ifda99c199c6fa80c93dc6864173b7031bdb9dbff
2021-07-02 12:18:21 +03:00
Dmitriy Rabotyagov 93ab16bc59 Cleanup after repo_build and pip_install retirement
Change-Id: I644635ee0cf4db252eae554185ae84d835b3c63d
2020-05-12 22:09:28 +03:00
Dmitriy Rabotjagov c17062f3b4 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: I6a6660bd3e15908adad9cd1fd76f582506562a97
2019-05-24 17:12:37 +00:00
Jimmy McCrory 0bf3c9251b 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: I5b4a3923fce8bd649ef474ada67e230fd5e2b2d7
2018-10-20 15:28:29 -07:00
Nguyen Van Duc 91edbed231 Replace port 35357 with 5000
Now that the v2.0 API has been removed, with Keystone v3
the admin (35357) and public (5000) ports are the same
and use the same keystone code paths for authentication.

This patch set replace 35357 and only uses port 5000

Change-Id: I1bc6f11892b7ec883210f0d9065a5b7d8f5cc246
2018-09-17 11:04:58 +07:00
ZhijunWei df9ae131a7 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: I283ed3badf57e8ad66de3e49b5ae3d3ab411d54c
Closes-Bug: #1792761
2018-09-15 23:08:20 -04:00
Jesse Pretorius 4238d5a4f4 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.
4. We promote the centos apache/uwsgi functional test, given
   that it is working consistently.

Change-Id: I67e0d8f4ab52449a80adb5c479faefbc83617025
2018-09-08 10:52:32 +00:00
Jesse Pretorius e8508d4376 Remove python-keystoneclient package install
The tests were using our keystone module, and therefore
required the keystone client present. This patch changes
the tests to remove that requirement.

Now that we no longer use our own keystone module, but
instead make use of the ansible runtime venv's shade
library and upstream ansible modules, we can eliminate
this package/library being installed on the host.

Change-Id: I3b5066ef0f3f650beb9e057771d8636991d2bce2
2018-08-01 13:45:19 +01:00
Jesse Pretorius 67bf87f330 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
Depends-On: https://review.openstack.org/580156
Change-Id: I8f193d5f6f1f6020b23a4c4eebf3ad537d61e0b7
2018-07-13 19:01:59 +00:00
Andrew Smith 2b7eb22a89 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 keystone service.

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

Depends-On: If4326a6848d2d32af284fdbb94798eb0b03734d5
Depends-On: I2b09145b60116c029fc85477399c24f94974b61d
Change-Id: I8d5b09dd0cb905e0dee40e260efbfeff1da180ce
2018-05-23 11:57:27 -04:00
fpxie 593efa5561 Trivial: Fix the pep8 warning
The yaml should start with "---"

Change-Id: I702cdf43afb6dffb8b7653e8c173f09dc8227bdc
2018-05-08 17:27:57 +08:00
Zuul e0bb4bcb78 Merge "tests: Update URL for ansible-role-systemd_service" 2018-05-02 11:38:14 +00:00
Markos Chandras 2cb44a7c75 tests: Update URL for ansible-role-systemd_service
This fixes the following problem

failed: [localhost] (item={'name': u'systemd_service', 'src':
u'https://github.com/openstack/ansible-role-systemd_service', 'scm':
u'git', 'version': u'master'}) => {"changed": false, "failed": true,
"item": {"name": "systemd_service", "scm": "git", "src":
"https://github.com/openstack/ansible-role-systemd_service", "version":
"master"}, "msg": "Failed to set a new url
https://github.com/openstack/ansible-role-systemd_service for origin:
fatal: No such remote 'origin'\n"}

This happens because zuul automatically clones dependant projects using
the git.openstack.org URLs but here we used the github.com one and that
led to module failures.

Change-Id: Id9b0f45af9f9393cd63e6f60b37e55cf16d08631
2018-05-02 10:15:14 +01:00
Markos Chandras a3e3368ad1 Do not log passwords
This prevents data to be leaked into the callback plugin.

Change-Id: If3f5c6d25a198dc82fd702ffb82a5ae438e775ba
2018-04-17 12:24:23 +01:00
Zuul ef9dbcd853 Merge "Convert role to use a common systemd service role" 2018-03-28 21:37:23 +00:00
Jesse Pretorius 5d603f249b 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: Icee36c34ecbdf5e3190c5839b00b1fa606763fa7
2018-03-28 10:14:36 +01:00
Kevin Carter fbf7ab1c4a Convert role to use a common systemd service role
This removes the systemd service templates and tasks from this role and
leverages a common systemd service role instead. This change removes a
lot of code duplication across all roles all without sacrificing features
or functionality. The intention of this change is to ensure uniformity and
reduce the maintenance burden on the community when sweeping changes are
needed.

In converting this role to use the common systemd_service role a
keystone_service dictionary was created in the defaults main.yml file.
This change follows the pattern of other services.

Change-Id: I65902f2483ef2f18ac2d229c5ebd9d090b6ae040
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-27 09:13:24 -05:00
Jesse Pretorius 3c767d85fc 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: I69d9d1b8b5ea7c62425e1d38e7f551ebe3cc57c3
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-03-24 23:17:09 +00:00
Jesse Pretorius (odyssey4me) 30612195ab Revert "Convert role to use a common systemd init role"
Until all the roles are ready and have this new role in the
ansible-role-requirements, we should not be merging this. We
should also ensure that the integrated a-r-r includes this
role before merging this.

This reverts commit b42eef0dc4.

Change-Id: I8a944db87948ff783028240d3548016a52ab5af4
2018-03-13 11:54:18 +00:00
Kevin Carter b42eef0dc4 Convert role to use a common systemd init role
This removes the systemd service templates and tasks from this role and
leverages a common systemd service role instead. This change removes a
lot of code duplication across all roles all without sacrificing features
or functionality. The intention of this change is to ensure uniformity and
reduce the maintenance burden on the community when sweeping changes are
needed.

In converting this role to use the common systemd_service role a
keystone_service dictionary was created in the defaults main.yml file.
This change follows the pattern of other services.

Change-Id: I70e1f6007d9f88f05ccdc737b210415274580a46
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-03-12 01:45:07 +00:00
OpenStack Proposal Bot c44d8555ba Updated from OpenStack Ansible Tests
Change-Id: If01f15607eb8cfc01fb01fe35801e2de7410b8d9
2018-02-17 02:29:31 +00:00
Major Hayden 87b205904f Remove jinja delimiters in when
Change-Id: Ib6a544b2d863fe3bc2f8fafa7ca0fbb11a1ab34c
2018-02-15 14:09:49 +00:00
Major Hayden b4333f043f Update upgrade script to use queens
Change-Id: Iab0d72b408ea8b21e09a0a8d169dc40eee6ceac4
2018-02-15 12:39:23 +00:00
Jean-Philippe Evrard f00d412e62 Use the tests ansible-previous venv
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.

The tests repo now has this venv, so we should make use of it.

Depends-On: I7ebb045885dd645b820de2b7f75b46c755c015f6
Change-Id: I579a3f7b641e02f40ed1b21f523aecbb9f16835a
Related-Bug: #1741471
2018-02-01 10:13:43 +00:00
Jean-Philippe Evrard 16dafa4718 Include ARA in the ansible-previous venv
We are now using ARA for all the jobs, including the upgrades.
If ARA isn't installed, any playbook using the ansible-previous
venv would fail, because the callback plugin setup during the
first steps of the job is still in use.

Change-Id: Ibfb444aeacfecd3384314f0e9d92e096279c543a
2018-01-27 08:41:44 +00:00
Jean-Philippe Evrard 91b7524603 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 commit adds:
- A new venv build script, containing the previous version of ansible
- A split between the infrastructure bits (running current ansible),
  the previous role run, and the upgrade of the role.

Change-Id: I91fe4e867750d7cee9ad7d84b005eb0231849df9
Signed-off-by: Jean-Philippe Evrard <jean-philippe@evrard.me>
Closes-Bug: #1741471
2018-01-10 09:34:20 +00:00
Markos Chandras a48a730892 tests: test-keystone-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: Iaf00987dab9cdd108df6095e76321126f45a47b6
2017-12-16 13:29:18 +00:00
Zuul 2f197ba458 Merge "Update upgrade role for Queens from P" 2017-10-19 19:25:19 +00:00
Jesse Pretorius 46931b172c 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: Ic04b7e658e7755c8e66e47a84442a5f3c791fa78
2017-10-18 11:21:52 +00:00
Jesse Pretorius 677633861d 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.

Co-Authored-By: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
Change-Id: I8305fce3ea5b6446692d15c642eccd798164f266
2017-10-13 11:29:44 +00:00
OpenStack Proposal Bot dae459332a Updated from OpenStack Ansible Tests
Change-Id: I51f1591afde7fe8a805fcddf6e42c65d0fb8b55e
2017-10-12 20:44:36 +00:00
Jimmy McCrory ce02e0a480 Use keystone-tempest-plugin repo
The tempest plugin for keystone was split out into its own repo.
In I1805b196b42b6a76c56e129a316e170e767455c1, it was removed from the
keystone repo.

Change-Id: I55a7e459ccb2b21e594c4add12164d8de45bc17c
2017-06-29 08:18:45 -07:00
OpenStack Proposal Bot 1b617711c5 Updated from OpenStack Ansible Tests
Change-Id: I678a3c4c47102cba78731ceac0246d52fc188b99
2017-06-22 15:19:39 +00:00
Jesse Pretorius ed136ef79c Fix rolling upgrade test
The rolling upgrade test is currently not setting
the endpoint correctly due to 'keystone_upgrade'
not being defined.

This patch removes the requirement to define the
var by ensuring that the role always uses haproxy.
This prevents having to remember to set the var
when doing development and makes better sense for
test purposes anyway.

This patch also serialises the upgrade and ensures
that the backend is set into maintenance mode when
the upgrade is actioned.

Change-Id: I8f16495607abb871390d28c0b3e9b2b856dda097
Depends-On: I5cbb3824430dc09b36476f81e0cdfd4f0a15f497
2017-06-17 12:41:45 +01:00
Andy McCrae 4b6eb7c0b1 Revert "Use a custom git checkout in developer mode"
We are adding a more generic approach to setting up developer mode for
testing, in I774343234a25063eb320cac85ba696d908f0a416. This will revert
the initial POC work that was done on the Keystone role, in favour of
the more generic approach.

This reverts commit c8631347e7.

Change-Id: I62d62e24123bae7b59deb6f0508608fdc1472481
2017-05-25 11:07:11 +01:00
Jesse Pretorius 511d607ae0 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: I516017d8d817d98a2b53d970ef93681ca7e969cf
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
2017-05-04 17:40:53 +00:00
Jimmy McCrory 4dc9dc23cf 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: I52645d09e83818416d6cd8a8ae4ec4e58848efd3
2017-04-19 16:22:09 -07:00
Andy McCrae c8631347e7 Use a custom git checkout in developer mode
This patch allows a developer to customise the code for
keystone, then test the changes when executing any of
the tox tests we implement.

The workflow means that by default the git_repo will be cloned from
upstream (this ensures gating continues to work). If the developer
specifies a "keystone_dev_local_directory" then the repo will not be
cloned, and it assumes the developer has already cloned and edited that
repo. A clone can be forced using "keystone_dev_force_clone" to "True".

Change-Id: Ibb666a803e73b50e3ee1918e633a9bbb84b084da
2017-04-06 12:36:38 +01:00
Andy McCrae f5adedd2e4 Split out Keystone upgrade into it's own script
This will separate out the runs so that varaibles 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: Iacaf5919a468cf267418718fdac5c270674a3454
2017-02-23 17:06:56 +00:00
Jenkins b8b4707174 Merge "Allow locust benchmarks to use zeromq" 2017-02-13 14:00:40 +00:00
Dolph Mathews a65e11e184 Allow locust benchmarks to use zeromq
The locust benchmarks currently produce this warning:

    UserWarning: WARNING: Using pure Python socket RPC implementation
    instead of zmq. If running in distributed mode, this could cause a
    performance decrease. We recommend you to install the pyzmq python
    package when running in distributed mode.

http://docs.locust.io/en/latest/installation.html#installing-zeromq

Change-Id: Ib5a0459f9f5fd74cfb2cf053417753edefc9c2b0
2017-02-10 19:54:54 +00:00
Jimmy McCrory 1123a9b22d Add failure condition to upgrade test
Fail the upgrade test if no requests are made or there is a >= 1%
overall failure rate.

Change-Id: I18b94e04250060fb1afa97a9211120a3713d6652
2017-02-10 11:38:33 -08:00
Lance Bragstad d9220c2d0d Use registered variables for locust commands
Since we already have the load balancer vip available, we can use
that instead of hardcoding locust to use localhost.

Change-Id: I916b14bce56aac94d2810bf96ba15436d6bb2cae
2017-02-10 18:22:07 +00:00
Dolph Mathews 9c39427577 Reduce number of locust clients
When measuring availability, multiple clients effectively give you
additional resolution, but that resolution may be of negligible value
here.

More importantly, when measuring for response time consistency
(important for zero-impact upgrades), it's counter-productive to run
clients in parallel, as you're also measuring the effect of parallel
clients instead of just the impact of the upgrade process.

Change-Id: Ic9449a1050651a1285bf80e69c958c965c21cbc4
2017-02-10 17:15:04 +00:00
Jimmy McCrory 52506b8f98 Benchmark requests during upgrade testing
During upgrade testing, move Keystone containers behind an HAProxy
load balancer and run a benchmarking tool to make continuous requests
against the keystone API, providing summary output at the end of the
play. This should help ensure the upgrade process between releases
remains without downtime.

To avoid service interruptions because of files being replaced during
installations:
  - set the 'keystone_venv_tag' var so that it changes between releases
  - perform the 'Create WSGI symlinks' task only after the files being
    linked to exist

Benchmarking scripts were provided by:
https://github.com/lbragstad/keystone-performance-upgrade

Co-Authored-By: Lance Bragstad <lbragstad@gmail.com>

Change-Id: I462e6496f125c7e263bbab188e86c45e1f4f7f1e
2017-02-09 18:36:45 +00:00
Andy McCrae cbeae2277b Split upgrade test into its own play
To avoid requiring all the os_previous_keystone 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: I391bddea8f5af67c73ed5c9fc85eb9a81643c88f
2017-01-20 16:40:04 +00:00
Jenkins 2417c52cd4 Merge "Using updated tempest method for keystone." 2016-11-22 17:24:45 +00:00
Donovan Francesco (drifterza) 1766414799 Using updated tempest method for keystone.
Change-Id: I51c847ea987eef807e5d44a497410249a143b6bd
2016-11-22 10:49:53 +02:00
Jimmy McCrory 04737f5dbd Implement zero downtime upgrades
This patch implements upgrading keystone with zero downtime as the
default installation process. Handlers have been modified to ensure that
the first keystone node is stopped, facilitates the database migrations,
and that it is started and available before restarting any other keystone
nodes. Migrations also now only occur when there is a change within the
installed keystone venv.

This process is documented at
http://docs.openstack.org/developer/keystone/upgrading.html#upgrading-without-downtime

A new test scenario has been added for testing basic upgradability
between releases.

Implements: blueprint upgrade-testing
Change-Id: I0d3cfcb80b64d005d60f4c8445f991855f844796
2016-11-17 08:10:57 -08:00