Commit Graph

87 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 7dbec32273 Add quorum queues support for service
This change implements and enables by default quorum support
for rabbitmq as well as providing default variables to globally tune
it's behaviour.

In order to ensure upgrade path and ability to switch back to HA queues
we change vhost names with removing leading `/`, as enabling quorum
requires to remove exchange which is tricky thing to do with running
services.

Change-Id: I81216a7eabe6b99d08ab15a62c046108fcb2bfc5
2023-11-10 17:00:57 +01:00
Andrew Bonney b54478e7e1 oidc: fix recognition of x forwarded headers from v2.4.11
The Apache mod_auth_openidc requires explicit configuration in
order to read the X-Forwarded-Proto from the reverse proxy as
of version v2.4.11 which comes in from Ubuntu Jammy.

Eventually this will need to become the default and the
variable added in this patch can be removed.

Change-Id: Ic9d37a8463d137508d20de20b10af806a223f852
2023-09-29 08:24:16 +00:00
Zuul fffdd962d6 Merge "Install libldap-common for keystone" 2023-08-15 21:52:19 +00:00
Marc Gariepy 459da2f445 Install libldap-common for keystone
Is the package is not installed it's not possible to validate the
tls cert of the ldap-server.

This package went from depends to suggests in jammy release.

Change-Id: Ia9e2e35d3898727af67c4d07115bad6d0582dda4
2023-08-04 11:14:43 -04:00
Dmitriy Rabotyagov eea1a4853f Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/888223
Change-Id: Id92330b3c709201a74612c8353cefa75778eac0c
2023-07-14 20:44:53 +02:00
Damian Dabrowski 6661a9dab7 Rename keystone_ssl to keystone_backend_ssl
To standarize variable name across roles, this change renames
`keystone_ssl` to `keystone_backend_ssl`.
All other roles use `<service>_backend_ssl` format.
It also better describes what it does. With `keystone_ssl` it's unclear
whether it is about frontend or backend.

Backward compatibility will not be implemented because securing haproxy
traffic to its backends with TLS is currently not supported by OSA so
it is hard to leverage `keystone_ssl` variable anyway.

Change-Id: Ibf8607a4cf62ab518a09d64b1054ff7fbc580000
2023-04-08 12:53:10 +00:00
Dmitriy Rabotyagov 0a24c61e3e Improve way of cache backend selection
At the moment we don't provide any option rather then use memcached
backend. With that we also hardocde list of packages that should be
installed inside virtualenv for selected backend.

Adding bmemcached requirement to oslo_cache.memcache_pool [1] gives us
opportunity to refactor this bit of deployment and allow to be more
flexible in backend selection and requirements installation for it.

[1] https://review.opendev.org/c/openstack/oslo.cache/+/854628

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/858981/4
Change-Id: I2810208301fb31eeeabf31e4b38add7f8aa3e00b
2022-09-23 10:49:09 +02:00
Kevin Carter 3928511919 Add the option to deploy keystone without apache
This change gives the keystone role the ability to deploy keystone using
only uWSGI, which eliminates Apache and all of its dependencies from the
environment. While this capability is not as feature rich as the apache
based deployment, which is still the default, it does offer a signficant
reduction in process overhead targeting minimal deployment usec-ases,
for deployments which do not need or want advanced keystone features
this is a huge benefit.

Signed-off-by: Kevin Carter <kevin@cloudnull.com>
Change-Id: I5a8484082f6331d2c5a452af2760c8e79d44fab8
2022-09-08 14:35:49 -05:00
Dmitriy Rabotyagov cb7eaa7ce3 Use uwsgi role for keystone
Instead of having own implementation of uwsgi, use common role.

This allows to reduce maintainable code and ease
providing fixes and features to uwsgi deployment code.

Change-Id: I2dc9c749c37e41959da2403fab7512ab17b859e4
2022-02-09 12:10:18 +02:00
Jonathan Rosser 5b55dd4626 Do not install python development packages
The python_venv_build role is responsible for setting up the build
environment for python wheels so this role should not install
python development packages

Change-Id: I0958bdb0b4a04d3398fc2c42f10d54cc7c30f0f8
2022-01-11 11:35:35 -05:00
Dmitriy Rabotyagov eb9a0c6cea Drop Nginx webserver support
There is no reason to support multiple web servers as a proxy for
keystone. Nginx is missing modules to support federation. With it's
removal we simplify code and reduce maintaining efforts needed.

Change-Id: Ib3f90a72dfc8f78cf304b0f130883befdeb09220
Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/818674
2021-11-22 10:36:35 +00:00
Andrew Bonney 22208370f4 Fix shibboleth compatibility for ubuntu 18.04
Package and module names were accidentally updated to equivalents
used for Debian and Ubuntu Focal+. This patch adds a temporary
vars file for Ubuntu 18.04 to maintain compatibility.

Change-Id: I50c649fda50b9e6a984abccdf61717a2294caaee
2021-07-22 14:07:33 +01:00
Georgina a57255b9fc Improvements to federation packaging
While shibboleth and mod_auth_openidc can theoretically co installed
now, unfortunately the shibboleth enabled configuation will cause
issues when using mod_auth_openidc.
As we only drop the configuration for one of these apache mods at a time
I have decided that it is best we only support one of these packages
being present at any time to avoid conflicts.

Change-Id: Ib0ebf1711db42dd00b3e14c1e5604fed2632437d
2021-07-05 10:57:32 +00:00
Jonathan Rosser aa3b47f40b Correct shibboleth apache module name for ubuntu 20.04
Change-Id: Ifcae29e9693545094dfe09daa1b2c6c6e86e971d
2021-05-06 10:00:37 +01:00
Jonathan Rosser 0f2b8e16c9 Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: I1624730385a7b54cf36a94d313cc298430129736
2021-03-10 12:16:38 +00:00
Jonathan Rosser 489c169874 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I8721b4fa97b41fb0c92f9eb99b61d31634e9aac6
2021-02-23 18:06:10 +00:00
Jonathan Rosser 943041b25e Remove centos-7 conditional packages
We don't support centos-7 for Victoria so remove extra templating
in package variables.

Change-Id: I9c2e503e00b0094e7c15f460c69710c52271896d
2020-12-08 09:18:25 +00:00
Jonathan Rosser bd05d1e86a Move openstack-ansible-uw_apache centos job to centos-8
Change-Id: Ib12ba83c454664abb4d920848a77386e52127e01
2020-12-05 19:59:12 +00:00
Jonathan Rosser 6a5c958dd8 Shibboleth and OIDC apache modules are co-installable on Focal
For ubuntu bionic there was a difference in dependancies between
these two libraries on libcurl3 and libcurl4 which mean they were
not co-installable.

For Focal we should be able to install both as the version of
the shibboleth library is now > 3.0

Closes-Bug: 1900410
Change-Id: Ia135870e45cc32ddfdad61476fe9ce12f61a6df7
2020-10-19 17:52:27 +01:00
Dmitriy Rabotyagov dcc16da7e2 Define condition for the first play host one time
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.

Change-Id: Iac06d3f02b1c9ee5e3bfbd28043fbb70d8b1d328
2020-09-08 18:20:43 +03:00
Dmitriy Rabotyagov be3a7c7e2b Add Centos-8 support
Change-Id: I018d1fc8ad637de8e76a98f22f6cef21e3f0b7c3
2020-06-15 11:01:41 +00:00
Dmitriy Rabotyagov 5e8c2c2eea Cleanup py2
This patch removes isntallation of python2 packages.

Change-Id: Id9d57f30036a19c3c94feddc8bb6c744a93f7541
2020-04-16 19:21:18 +03:00
Zuul 7275ae85d1 Merge "Federated openid support using auth_mod_openidc" 2020-02-01 09:50:42 +00:00
Georgina 47fe909d54 Federated openid support using auth_mod_openidc
This patch adds support for using mod_auth_openidc instead of shibboleth for
supporting users who have a preference to use oidc for federation. A new
variable called apache_mod is added to keystone_sp allowing the auth library
to be selected. If left undefined shibboleth auth module will continue to be
installed by default maintaining backward compatibility.

This patch does not support simultaneous use of shibboleth and mod_auth_openidc
primarily because shib2 depends on libcurl3 but mod_auth_openidc depends on
libcurl4 which cannot coexist on Ubuntu. This can be resolved when there is a
shib3 package available in a future release of Ubuntu.

Change-Id: I80031f7d3f0fcc2029cd6861dcb6687e8a9f0a2e
2020-01-31 11:28:38 +00:00
Dmitriy Rabotyagov e0197db984 Add libssl devel package for CentOS and Suse
libssl-devel package is required to install scrypt for keystone venv,
which is direct keystone requirement [1]

[1] https://opendev.org/openstack/keystone/src/branch/master/requirements.txt#L22

Change-Id: I43df6a6b70195e21e0845565d12aeed5a34d2cda
2020-01-28 19:02:42 +00:00
Zuul cdfd811d72 Merge "Add possibility to overwrite public repo" 2019-11-11 16:33:51 +00:00
Kourosh Vivan 33b165bcc4 Add possibility to overwrite public repo
For Centos, we use by default public repo for nginx and shibboleth. You can
change this behaviour with these role-wide variables:
- keystone_centos_nginx_mirror
- keystone_centos_nginx_key
- keystone_centos_shibboleth_mirror
- keystone_centos_shibboleth_key

Or with these osa-wide variables:
- centos_nginx_mirror
- centos_nginx_key

Change-Id: Icb21c31141d1d78e5a2e23b35378ffb0520c0d1d
2019-11-06 15:22:11 +01:00
Dave Wilde (d34dh0r453) 461245350b Standardize on nginx-extras
The use of nginx-full causes a service restart on package update
which brings down the keystone endpoints.

Change-Id: Ic9cc341edb6f2f0ba76bd301c9782fbcc5951544
Related-Bug: 1847395
2019-11-05 09:51:42 -06:00
Zuul 15971abe85 Merge "Deployment host can provide shibboleth SP key-pair" 2019-10-07 19:22:26 +00:00
Ralf Haferkamp 113d85d23b Fix distro install on openSUSE
With Train (current master) openSUSE is switching the openstack packages
to use Python 3. This means that we need to use the python3 module for
uwsgi.

Change-Id: I0fcb9d6a1df8893f3f4e6593a1614611e6712418
2019-09-18 16:50:35 +02:00
Kourosh Vivan b035c3d0fc Deployment host can provide shibboleth SP key-pair
If you don't want to generate shibboleth SP key-pair on first playbook run
You can provide sp-cert.pem and sp-key.pem in /etc/openstack_deploy/keystone/

Change-Id: I6fb099cee10ef76f2cd6d20a03ffe53f45a1f85d
Signed-off-by: Kourosh Vivan <kourosh.vivan@osones.com>
2019-07-11 12:42:06 +00:00
Dirk Mueller e968c4487e Update distro package names for openSUSE Leap 15.1
Remove unecessary packages and update names where required.

Change-Id: Id76a64dccc3a48bbc1e7b95337cd99acdc0e6cf3
2019-06-28 10:42:29 +02:00
Jimmy McCrory 254a447ffe Fix distro installs on Ubuntu
Beginning in the Stein release, Ubuntu distro packages are now using
Python3. This requires additionally installing and using the uwsgi python3
plugin.

The keystone package includes a dependency for apache2, python3-keystone
should be used instead.

Change-Id: Idbef95bc115755994156ab0fee7538370392e67d
2019-06-03 13:05:41 -07:00
Dmitriy Rabotjagov d6d3bda113 Update uw_apache to run against bionic
uw_apache test was runned against xenial, which is not currrently
supported, due to which job was updated to run on bionic nodeset.

We also need to enable proxy_uwsgi for debian based distros.

Co-Authored-By: Guilherme Steinmuller Pimentel <gsteinmuller@vexxhost.com>
Co-Authored-By: Marc Gariépy <gariepy.marc@gmail.com>
Change-Id: Ibff3aa2a1ac1bbf2493aaf2419ee1e4dd763934c
2019-05-24 15:14:35 +00:00
Mohammed Naser 6057dcbbc3 [redhat] Update variables to be version agnostic
The RedHat-based operating systems such as CentOS have a pretty
stable list of packages, therefore, we don't need to pin it by
version and we can instead move to a much more generic redhat.yml
which will support a bigger range of systems.

Change-Id: Ic80fd9b1f112d02c24ceb2579195fa655cd63b00
2019-05-10 00:02:09 -04:00
Mohammed Naser 76d376e1e3 debian: add support
This patch adds support for this role to be able to deploy on
Debian Stretch.

Change-Id: I97bcfacc55b8afcda6792dd19e7f947cdec38ce4
Needed-By: I9a92b73c419a0dc1cca40dacfef75de61a61db94
2019-04-05 22:46:36 -04:00
Matthew Thode f4bf2620fb
add gentoo support to keystone
need to drop our own nginx.conf, should probably be abstracted somewhere
other than keystone.

Change-Id: If2e8825d6d7a9a76853fd09fcba9148762d73c10
2019-02-26 09:04:07 -06:00
Zuul c351a180ba Merge "Cleanup files and templates using smart sources" 2019-01-12 12:08:29 +00:00
Kevin Carter 62d9f9c10d
Cleanup files and templates using smart sources
The files and templates we carry are almost always in a state of
maintenance. The upstream services are maintaining these files and
there's really no reason we need to carry duplicate copies of them. This
change removes all of the files we expect to get from the upstream
service. while the focus of this change is to remove configuration file
maintenance burdens it also allows the role to execute faster.

  * Source installs have the configuration files within the venv at
    "<<VENV_PATH>>/etc/<<SERVICE_NAME>>". The role will now link the
    default configuration path to this directory. When the service is
    upgraded the link will move to the new venv path.
  * Distro installs package all of the required configuration files.

To maintain our current capabilities to override configuration the
role will fetch files from the disk whenever an override is provided and
then push the fetched file back to the target using `config_template`.

Change-Id: I93cb6463ca1eb93ab7f4e7a3970a7de829efaf66
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2019-01-09 18:30:07 -06:00
Jonathan Rosser 2b78bebb99 Add libpython2.7 as a required package
Keystone requires this package at runtime and currently assumes
that it is present in the environment. This patch ensures that
assumption is correct.

Change-Id: Ifb427af8ec4d18089732b7e77a2703f535631e6e
2018-11-20 17:22:09 +00:00
Jesse Pretorius af8985d884 Remove unnecessary package install duplication
Currently the devel packages are installed everywhere,
but they only need to be where the wheels are built.

Also, there is already a task to install the packages
needed on the target hosts when installing - so we do
not need to give the same list to the venv install role
because they will already have been installed.

Change-Id: I306017d66416f147a17ae9e1f16130af4bfa7774
2018-10-30 19:24:12 +00:00
Zuul b88b34b26f Merge "Add cron as a required package" 2018-10-25 17:19:10 +00:00
Jesse Pretorius (odyssey4me) 0cd0a732c5 Revert "vars: Add missing netcat package"
This reverts commit 781835e752.

The package is actually required on the memcached hosts, not
the keystone hosts. This helped make role tests pass because
in the role tests memcache and keystone are often on the same
containers.

The actual fix will be https://review.openstack.org/613099 which
ensures that netcat is installed on the memcache hosts instead.

Depends-On: https://review.openstack.org/613099
Change-Id: I55158c332a35e150f61541e8c2c1390e397d7d2c
2018-10-25 10:36:15 +00:00
Jonathan Rosser d04556eee9 Add cron as a required package
This was missing from the ubuntu vars but present for the other distros.

Change-Id: Ic708573a8867b914536ff6210f35779f3db513b3
2018-10-24 17:16:13 +01:00
Markos Chandras 781835e752 vars: Add missing netcat package
Commit afc0e5b1ce ("Add memcache flushing handler on db migrations")
added an implicit dependency to the 'nc' package but it did not add it
to the list of required packages so things break like this:

 ["/bin/sh: nc: command not found"]

As such, we need to add the package to the rest of the distro packages.

Fixes: afc0e5b1ce ("Add memcache flushing handler on db migrations")
Change-Id: Ieab35215e84d6971cd9c2068206ebf2103cbc4b4
2018-10-23 12:48:36 +01:00
Kevin Carter 2589ce6db0 Add variable for the ssh service
The ssh service on ubuntu based systems is "ssh" which is established by
the service unit path `/lib/systemd/system/ssh.service`. When running
the service will respond to the name "sshd" however this is just an
alias. This change adds a variable to set the service unit name
based on the distro family which will allow the service to start should
it be masked.

The change will now delegate to all nodes within the keystone cluster
ensuring ssh is enabled and started. If SSH is not running everywhere at
the same time keystone key rotation will not be possible later on in the
role.

Change-Id: I552a6bb09b3ab917bfcad140633fe4662c0c5a82
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-10-01 19:59:13 -05:00
Markos Chandras ab71dd914c SUSE: Add support for openSUSE Leap 15
Depends-On: https://review.openstack.org/603078
Change-Id: I6b57618fa75e23bdd775d94dc3de563e8de8c805
2018-09-18 17:45:55 +01:00
Zuul 82517cb7c4 Merge "Ensure that SSHD is installed, enabled and running" 2018-09-16 16:18:21 +00:00
Jesse Pretorius 1fe56e8129 Ensure that SSHD is installed, enabled and running
The keystone containers rely on SSHD for the key synchronisation,
so in this patch we ensure that it is installed, enabled and
running.

Change-Id: I044c080dba1068f79f4018b54b8ad120192b3932
2018-09-15 20:38:39 -06:00
Jesse Pretorius 55d8783b99 Rename SUSE vars file to cater for any version
To make the transition between versions easier,
we rename the vars file. This also resolves
issues when meta-dependent role inclusions do
not pick up the correct file when using the
include_vars task with multiple search paths.

Change-Id: Ibe1758b4d2187f0bd85368ce91089ea30ca652ac
2018-09-15 19:13:24 -06:00