Commit Graph

33 Commits

Author SHA1 Message Date
Jonathan Rosser 439619bb28 Do not syncronise DB/MQ/Service setup tasks to other roles
These tasks are now available as roles in the openstack.osa collection.

Change-Id: I6096506967d288d67b47b442bbb13c31f6ccde63
2022-01-13 10:02:47 +00:00
Dmitriy Rabotyagov 2fe09cc698 Allow to provide policy state
It might be desired by deployer to remove already applied policy.
For that policy state should be explicitly passeda as absent
for the module.

Change-Id: I0db1e23ca0edf65aa1b4c8ca20153337044b6c4c
2021-11-30 21:07:47 +02:00
Dmitriy Rabotyagov d38c743552 Run notify setup when setup_host differs
There's a usecase, where all datasets might be the same, except
setup_hosts. For example, when we use isolated rabbitmq cluster for RPC
but shared one for notifications. And we have same set of users
and vhosts there. In current state setup won't be performed, since
vhosts and users are the same.

Change-Id: Ib5c44327d5f1edc25bace79fdd057adabb0b4c14
2021-04-07 18:32:33 +03:00
Dmitriy Rabotyagov 1dac369ea8 Use new openstack collection syntax
Ansible collection for openstack has changed naming convention and
has deprecarted old naming. Due to this
appear lot's of deprecation warnings like [1]

We should use new syntax to avoid such warnings.

[1] http://paste.openstack.org/show/799121/

Change-Id: Ib6ba1b7f8b5c75507de430cb502a126d55429b3a
2020-10-16 17:59:17 +03:00
Dmitriy Rabotyagov feba55ae37 Use collections in common tasks
Since we have switched to ansible 2.10, we should make sure
we're using collections for interaction with rabbitmq and mysql
in our common tasks.

Change-Id: I7a86a62d759981fbdd2761b5de1b4ba57b704bc6
2020-10-01 10:58:57 +03:00
Zuul 6ad9e8dce1 Merge "Add _oslodb_login_host to db_setup tasks." 2020-09-01 15:13:21 +00:00
Dmitriy Rabotyagov 838f69652e Add description to domain during creation
Change-Id: I9cfeaf79dcaf04f27515f7cf0d2bc27f4f2dba57
2020-08-06 19:53:40 +03:00
Jonathan Rosser d4ae89792d Add _oslodb_login_host to db_setup tasks.
The ansible mysql modules defaults to localhost, which means that the
db_setup tasks fail if the mysql processes are bound to the mgmt
interface.

This change adds an extra variable _oslodb_login_host for the db_setup
tasks which is defaulted to _oslodb_setup_host if a specific value is
not defined.

Change-Id: I531109213953f78263be68968f8e9d2dc2fd382a
2020-08-05 21:32:26 +00:00
Zuul db14a6ffd6 Merge "Synchronise move to openstack ansible collection to all roles" 2020-06-08 19:46:24 +00:00
Andreas Jaeger 1248aea678 Update doc requirements
Switch to newer openstackdocstheme and reno versions

Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Change-Id: I0d8852ea8d21f24599e5e8dd5cdac52b75f5f079
2020-06-03 18:47:43 +02:00
Jonathan Rosser ea8ae55fa4 Synchronise move to openstack ansible collection to all roles
Depends-On: https://review.opendev.org/718431
Change-Id: I284e1cf1a826b4d2bead79f1ef6ad2f810196361
2020-06-02 17:51:30 +00:00
Jonathan Rosser 2c53811d09 Update openstackdocstheme to 2.0.0
This has been committed to some OSA repos without using the proposal
bot so will be reverted on future runs of the bot. Update the
synchronised file to ensure that there is consistency across all roles.

Change-Id: I70f8218c8add371d35d97f3337765cf170461128
2020-05-11 11:54:43 +01:00
Jonathan Rosser 791d17c754 Update sync/doc/requirements.yml for python3 transition
Several patches have been merged directly to OSA repos updating the
docs requirements in-repo, when the patch should have been applied
here and proposal-bot used to update all of the other repos.

This patch updates the value in openstack-ansible-tests which will
ensure that the changes commited within other repos are not reverted
on future runs of the proposal bot, and also to update any repos
where the old values remain.

Change-Id: I9e1842855519a39b928423f01bdea008c4af2bba
2020-05-02 18:26:57 +01:00
Andreas Jaeger 3bca43ceae Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update requirements, no need for python_version anymore
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Cleanup tox.ini for Python 3 only

Change-Id: I9d63e63cf142fded002f7212588266d88f41dd06
2020-04-10 12:34:59 +02:00
jacky06 c61d73d902 tox: Keeping going with docs
1. Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

2. Remove the unnecessary blank line for tox.ini

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: Ie837d376bb1a1d93367369d25140dd8a9d5ac14e
2019-11-18 13:26:07 +00:00
Dmitriy Rabotyagov 0f734bc691 PDF Documentation Build target
Add sphinxcontrib-svg2pdfconverter to doc/requirements.txt
to convert our SVGs.
  https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Change-Id: I20af51a1584faa49f64c3adf030258f22a19431a
Story: 2006105
2019-10-18 17:57:11 +03:00
Dmitriy Rabotyagov 10b97a8724 Set no_log for sensitive tasks
Since db creation iterates over variable with sensitive data
no_log should be defined not to output it [1][2] to stdout

[1] https://zuul.opendev.org/t/openstack/build/6a5d668904534613b82633d933be1e9b/log/job-output.txt#9501
[2] https://zuul.opendev.org/t/openstack/build/6a5d668904534613b82633d933be1e9b/log/job-output.txt#10609

Change-Id: I329e418b9b5810a4efa40167b09667cfe1217440
2019-09-03 20:50:02 +03:00
Dmitriy Rabotyagov a92f513b84 sync: add service_setup.yml
Since we're using service_setup.yml in most part of the services,
it's time we started synchronizing this file across repos to
reduce it's maintenance costs.

Depends-On: https://review.opendev.org/676996
Change-Id: I5796025f542e855e9adadf58ba67157aeec6e213
2019-08-16 17:43:02 +00:00
pengyuesheng 07b736f407 Bump the openstackdocstheme extension to 1.20
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release

Change-Id: Iac130cf465b44a730193547bab4da626cce59e5c
2019-07-29 11:17:02 +08:00
Mohammed Naser 4302911523 sync: fix documentation config
doc8 seems to be complaining with the length of the string in the
requirements file.  This patch fixes that and it also updates the
in-repo file so that it gets tested by doc8 as well.

Change-Id: I42613d58ae23db99e3ae7c7d89a9dd865baaba5b
2019-07-19 14:44:14 -04:00
Mohammed Naser 98a42feb4e sync: keep doc/requirements.txt syncd across all repos
Our docs are always maintained the same way, so we should probably
just keep it sync'd here instead.

Change-Id: If073a0c3b36a3f820892bcc042a706202544d0d8
2019-07-18 16:51:28 -04:00
Mohammed Naser 72c994da8e sync: add db_setup.yml
We've setup most of our roles to start using db_setup.yml and
this actually starts synchronizing it using the copy here.

Change-Id: Ib904ed27161996330bea2497bf8adcc086e1243b
2019-07-12 18:42:52 -04:00
Dmitriy Rabotjagov 5879ae1891 Stop deleting-and-creating RabbitMQ account
The `force` option creates and recreates the user which means on
any deploy it kills *all* AMQP traffic on all agents.

This updates it when changed every single run, which shouldn't
kill the connectivity when we run playbooks.

Change-Id: I5c2478b41d49dd3e4392c1800ad6a7e7c1494152
Closes-Bug: 1825329
2019-06-12 15:21:13 +03:00
Jimmy McCrory c8b921c668 Check for undefined _oslomsg_rpc variables
Some services may make use of notifications but do not require rpc
messaging and have the _oslomsg_rpc variables undefined.

Update the when clauses on the tasks configuring RabbitMQ for
notifications to ignore undefined '_oslomsg_rpc_vhost' and
'_oslomsg_rpc_userid' variables.

Change-Id: I96e59b98e069bffb30c0d1851f777aa6b891f14f
2019-06-11 10:48:48 -07:00
Dmitriy Rabotjagov 3bf45d57cb 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: I8a070e0aded59dd7a4751218bd95bc23d153c6d3
2019-05-08 19:49:28 +03:00
Dmitriy Rabotjagov e4dc9aa02c Fix of rabbitmq_policy irrelevant node
For LXC containers there was an issue, that _oslomsg_rpc_setup_host
was not present in hosts file. This resulted in broken roles.
Removing node from task will connect to the default node.

Change-Id: I0ce201dc09327001966e1eecc15507542f0cb507
2019-04-17 17:08:01 +00:00
Dmitriy Rabotjagov 68064c9ee7 Add rabbitmq policy configuration task
This patch adds support of rabbitmq policies configuration for mq_setup
and uses oslomsg_rpc_policies and oslomsg_notify_policies variables for
that. These variables are defined in group vars and provide HA mode.

It also adds ability to provide extra policies during include by
specifying _oslomsg_notify_policies and/or _oslomsg_rpc_policies
variables.

Depends-On: https://review.openstack.org/652186/
Change-Id: Id60b7ac62ff16af938577615ab001dd144f92c26
2019-04-13 22:08:11 +03:00
Mohammed Naser 71e101af50 mq_setup: run notify setup *only* if users are different
The tasks for notification always run as the variables are mostly
defined with the same values as the normal message queue.

This patch skips creating the notification vhost/user if they
are matching the messaging one.

Change-Id: I03c2192b844f99648fe8b9c60e33b359f3997360
2019-04-04 13:37:39 +00:00
Mohammed Naser c482ead999 Stop deleting-and-creating RabbitMQ account on deploy
The `force` option creates and recreates the user which means on
any deploy it kills *all* AMQP traffic on all agents.

This updates it you use `update_password` which instead will just
update the password every single run, which shouldn't kill the
connectivity when we run playbooks.

Change-Id: I1878f702022872190952604caff640bfe6c2ccc1
2019-03-31 21:06:10 -04:00
Andy Smith 02ee7055d9 Fix to setup notify mq service
Change-Id: Iacdf12a4ea32a3a4cef1aa8784b03463a081b08a
2018-08-17 14:16:36 -04:00
Jesse Pretorius 8043863f4e Add qdrouterd user to MQ setup and update file
Now that all roles have been updated, we can add the qrouterd
user setup to the file to be synchronised across roles.

Depends-On: https://review.openstack.org/589480
Change-Id: I866665d2c0c06d692bc37da9fd208bffa9b27940
Co-Authored-By: Andy Smith <ansmith@redhat.com>
2018-08-15 12:00:40 +00:00
Jesse Pretorius e9abc3018e Prevent common MQ task set from synchronizing
As we need to update all the roles for the new mechanism,
we rename the task file to prevent changes in the tests
repo from reverting the changes in the roles.

Needed-By: https://review.openstack.org/588190
Change-Id: Ia1657a181ab00310c5b186a16cd91fccf35661c1
2018-08-02 10:41:12 +01:00
Jean-Philippe Evrard 8f691efaaa Add mq_setup common task file
This patch adds the common task file for the mq setup tasks
which will be replicated by the proposal bot between the roles.

It also updates the script that's useful for manual sync to
accommodate the ability to sync the task file. Some documentation
is also added.

This allows sharing of role files from a single location.
It will be used for sharing common tasks of many roles, like
the mq, the dabatase, or service setup.

Without this patch, roles implementing the same kind of files
would eventually drift and be different. This is a problem as
this increases the maintenance burden.

Relates-To: https://review.openstack.org/580696
Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Change-Id: Ib564450eb1f3d63bb5fdd3763046dd57df519d28
2018-07-06 16:45:08 +01:00