Commit Graph

37 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov d3ef8b1256 Deprecate openstack-ansible-galera_client role
Since we moved all functionality of galera-client part to galera-server
role there's no sense in futher keeping and branching of client part.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/765777
Change-Id: I1623dbc80bee4eb7d889ee570d0ce27697b58cea
2020-12-07 12:41:44 +02:00
Jonathan Rosser f0b69f594e Bump galera version to 10.3.18
Depends-On: https://review.opendev.org/687454
Change-Id: If285b1b1b68ad155779c6ba750e5c0566c078e5d
2019-10-09 15:23:57 +00:00
Jesse Pretorius d955eb35e0 Update MariaDB client version to match server
The server and client versions are currently mismatched, resulting
in a failure for the 'metal' jobs where the client is installed
by the utility playbook, before the galera-server playbook.

This patch ensures that the version for the client is set to the
same as that in galera_server.

Related-To: I59a0e225205be43b5bfc76c4bc3381b6e9c54cfd
Change-Id: I53849ad1e97a21d5d99c64b209319607b6e834fd
2019-03-20 14:15:01 +00:00
Jesse Pretorius 6c7aee86f5 Use in-repo GPG keys
We make remote network hits to get the GPG keys which are quite
unreliable, and apt_key does not support using a proxy properly [1]
so let's store them inside the role and use them.

The implementation here is derived from that which was done in the
galera_server role in I9443f10e8c803599cbebfc2a53cb9c432bfa60d1,
but opts to use a mechanism that will be simpler to maintain.

[1] https://github.com/ansible/ansible/issues/31691
Change-Id: I520ccbadf3320b0d07fc83e3dbec9ea2bd16ec83
2018-12-14 19:36:40 +00:00
Markos Chandras 03bac540a8 defaults: Bump mariadb to 10.2 release branch
mariadb 10.2 was first released in April 2016 and OpenStack services
should be ready to use it by now, so lets switch to 10.2.

Change-Id: If1aaea61b89ea38161451872754b79d151da540f
2018-09-12 12:10:46 +01:00
Logan V 9c797df629 Bump MariaDB minor version release
Minor version bump from 10.1.33 to 10.1.34.

Change-Id: I840ccb120aaa774277ed122da95a58b94ff1c0b3
2018-07-21 17:55:44 -05:00
Mohammed Naser 6b705298a5 Use OpenStack infrastructure MariaDB mirrors
We have mirrored provided by the OpenStack infrastructure which
should reduce the amount of network failures with MariaDB.

Also, use nodepool variables so that we use our infrastructure
provided mirrors.

Depends-On: I49a744ee5c41279f4a17bc7d2339d12c3a132026
Change-Id: I81f716f640f6742c787e7aaedfdbf942893142de
2018-06-28 14:20:29 -04:00
Jean-Philippe Evrard 0eef2290c6 Bump minor version of mariadb
This bumps the mariadb version, by adding a new repo.
As the package state is by default to "latest", the
addition of the new repo will trigger an upgrade
of the mariadb version.

Change-Id: I43e6cde7e83f62ec8fe0bb7d487c911382f6033b
2018-06-05 14:13:49 +02:00
Markos Chandras e6f4ae3c06 Drop pointless PIP packages
Nothing in the role requires the MySQL-python package so we can simply
drop it to simplify the role.

Implements: blueprint openstack-distribution-packages
Change-Id: Id9dd2dea146709414ab9ce8d439f1587e6776fd4
2018-04-18 14:24:10 +01:00
Jean-Philippe Evrard 3524b8352f Prevent latest mariadb version
Latest mariadb version has a bug that prevents clustering from
behaving properly in bootstrap.

This setups the repo for the galera_client to the same as
galera_server, to have the same client version.

Change-Id: Ia1d7a2c664c6c11ad698a915162281c11a344067
2018-02-08 19:51:29 +00:00
Markos Chandras bb6feac7ab SUSE: Switch to upstream MariaDB repository
The OBS development repository was proven to be quite fragile since
the mariadb packages were moving far to quickly. Whilst this has helped
to catch bugs when OpenStack services were used against newer MariaDB
versions, it also created a very unstable infrastructure for openSUSE
deployments. As such, we have now switched to using the upstream SLE
packages as provided by MariaDB upstream so all distributions are
aligned to how they deploy the Galera clusters. This further allow us
to report upstream bugs which fix problems across all distributions.

Galera server Role fix: https://review.openstack.org/#/c/536955/
Change-Id: Ib270b0fe23de76620491247efc3352fbc6c1e9b5
2018-01-24 15:22:35 +00:00
Jimmy McCrory 5d2988c938 Fix SSL cert distribution tasks
The 'galera_cluster_members' variable has been added, matching the
default value from the galera_server role and used by the
'galera_ssl_ca_cert' variable to find a galera node within the inventory
to attempt to pull cert files from.

Since the slurp task that checks for an existing CA cert file is set to
never fail, the debug message should check if any content was found. The
changed_when can also be removed since slurp tasks only return 'ok'
when a file is found.

The task copying an existing cert from a server was using a 'src'
argument where it should be 'dest'.

Change-Id: I95cc994df5118fce7ce588fc0bff979bc283a6f3
2017-12-13 15:10:51 -08:00
Kevin Carter e5634d99fd Fix SSL handling for galera clusters
The SSL handler was making an assumption a user provided SSL key will
always be available. This change forces this role to look for the SSL
CA key on a galera server and set it locally IF a user provided SSL ca
certificate is not provided.

To ensure we're not introducing regressions a cross project repo test
has been added to run installations that are with and without ssl.

Depends-on: I5f6465f0d955cc1b911a4a76482505edb16c69a8
Change-Id: Ib89dde5cc88182f81d81336f71d9cde89733aa65
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-11-30 18:50:29 +00:00
Logan V 53c4e101fe Set a var for the MariaDB major version
Setting a custom MariaDB mirror URL is very tedious to maintain
because operators must ensure they update the overridden repo
URL every time the major version changes within the galera role.

This will allow operators to set overrides for their local mirror
like:

galera_client_repo_url: "http://mirror.mydomain.com/mariadb/repo/{{ galera_major_version }}/ubuntu"

Change-Id: Ic6a11da9994c5f4bddeb392cbad7e40400c5c117
2017-09-14 15:26:28 -05:00
Markos Chandras 9774f0c068 SUSE: Add ability to configure external mirror for openSUSE
Allow deployers to choose a specific mirror for the OBS packages
by setting the 'galera_client_opensuse_mirror_obs_url' variable

Change-Id: I51e78cfc3dc2b84141e8a19f31bfc36a81113ab3
2017-09-07 11:32:58 +01:00
Jesse Pretorius a0149ebeaa Remove duplicate package pinning variable
The variable name is duplicated, resulting
in only the last one being used and a warning
from Ansible.

Closes-Bug: #1712315
Change-Id: I7533d5908fd020469a5c8e3672c2adfdadced50e
2017-08-25 08:37:34 +00:00
Jesse Pretorius 1ac1d6482a Correct pin variable name
The name used was for galera_server. This patch corrects it.

Closes-Bug: #1712315
Change-Id: I6cba66f41e9f36158275bf4f9172f83793eb6bc7
2017-08-23 15:37:59 +01:00
Jesse Pretorius 1faa81c5a1 Fix MariaDB apt package pinning
The variables in vars are only loaded when the include_vars
task is run, which is after meta-dependencies are processed.

This patch ensures that the pinning is properly applied when
the meta-dependent role is executed.

Closes-Bug: #1712315
Change-Id: Ib99afee1a3bf9fba8d34c63ffa28e5fa41b73d03
2017-08-23 08:05:47 +01:00
Jesse Pretorius 9305bc7798 Allow MariaDB gpg overrides without extra-vars
It may be required to override the gpg information
without being forced to use extra vars. This patch
allows that to be done.

Change-Id: I7b6d4ebba44ad3ac42ab5df219646525b1bd7b9f
2017-08-09 10:19:47 +00:00
Jesse Pretorius 5bf760a412 Allow MariaDB repo overrides without extra-vars
It may be required to override the repo information
in its entirety, rather than just the URL. This
patch allows that to be done.

Change-Id: Ic7e77f0a442a82a424e75a9d79c9c6116818cfc1
2017-08-08 17:54:48 +01:00
Andrey c093c13e01 Added Galera SSL support
MySQL SSL connections allowed. Self-signed SSL CA cert or user-provided
CA certificate delivered from the deployment host.

Change-Id: Iaa07435357139133e325d85808b419e8c55b5e50
Partial-Bug: #1667789
2017-03-31 08:43:13 +00:00
Jesse Pretorius e106ac12b2 Move repo URL variables to defaults
This patch deprecates the apt/yum specific variables
and moves the common URL variable to defaults to make
it possible to override without using extra-vars.

This technique matches the mechanism used in the
galera_server role.

Change-Id: Iaf9a23d1cbc0601d13bf2e467437d3775da9c812
Related-Bug: #1669897
2017-03-06 14:39:51 +00:00
Jean-Philippe Evrard 8935c29e70 Allow override of the repo filename
Apt cannot have 2 mirrors with the same content in 2 different files.
If a deployer has an apt mirror with mariadb (and others), the deployer
still need to add a repository, but will also need to define the
filename used, in order to avoid clashes.

This commit makes possible to decide the filename for the repo.

Change-Id: Ic83d464512f6f8697e520d79520dcf21370f8beb
Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
2017-01-03 13:38:47 +00:00
Andy McCrae c13983adce Allow galera_client role to skip package installs
This patch adds the galera_client_package_install option which allows
the deployer to skip the installation of the galera_client packages, and
simply set up the /root/.my.cnf configuration file.

This is useful for deploying the client on hosts that already have
galera client configured, but still want the client configuration setup.
For example the galera_server role which can have a conflict when the
client and server repository version don't match.

Change-Id: I00d662a8afc7ddd4778787d31dc394a0ea3b1401
2016-11-28 20:11:13 +00:00
Logan V 10d789e9be Fix linting issues for ansible-lint 3.4.1
Preparing this role for the ansible-lint version bump

Change-Id: I9f4ca928cd19b7e73b1727734551ea61d676e49c
2016-11-02 01:58:54 +00:00
Jesse Pretorius 4b7a4e39e8 Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: I9fd9e3ca1aec2d76cd78c4013bbb85c189e2d5e5
2016-08-26 14:49:36 +00:00
Jesse Pretorius b58ba2ee4f Allow apt cache_timeout to be overridden easily
The cache_timeout variable is moved to the role defaults to allow it
to be overridden more easily and to be exposed in the role docs.

Change-Id: I4dba478a6c0c4fd17abbee40df10a0470af362a4
2016-08-22 15:54:52 +01:00
Jesse Pretorius acdfa0324f Add ability to change apt/yum package state
The current method of installing the distribution packages required is
set in the tasks and cannot be changed by a deployer.

Currently the apt task always installs the latest package. This results
in unexpected binary changes when a deployer may simply be trying to
execute a configuration change.

This patch adds the ability for a deployer to change the desired state
so that the results are predictable.

Change-Id: Id0367754d3538c0e3da808521ba41b9aaa252a5f
2016-07-28 19:15:35 +01:00
Travis Truman 799c55ae28 Decouple role from OSA inventory group model
The role should not be directly dependent upon the inventory groups defined by
OpenStack-Ansible

Depends-On: I0f5813299d577afae19b8e75a40f986a733f5242
Change-Id: Ida3e7ae37803ce203ef9f46a7e41cbada2db48de
2016-07-12 10:33:22 +01:00
Kevin Carter d394277b21
Update Multi-distro support for CentOS7
This commit updates the role to support Ubuntu 14/16.04 and CentOS7

Change-Id: Ieadcdd70e9b8271aee3880896255a5037f56567e
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-05-15 21:59:40 -05:00
Michael Gugino 808ef635fe Implement Xenial Support
Galera client currently only supports Ubuntu 14.04,
trusty.  This patch set is intended to support
Ubuntu 16.04, Xenial.

Change-Id: Iab5485529cf14933fd7f37430d234a5c41185c18
Needed-By: I4baeb2eddf137619ffedba2f9efd61b7bd142f92
2016-05-10 16:41:06 -04:00
Jimmy McCrory 03936b3f11 Use the apt_package_pinning role
Add a dependency on the apt_package_pinning role and use it, instead of a
template within this role, to pin the MariaDB repo.

Change-Id: I26111d7191db793b9cddca29c681399040ab6011
2016-05-05 19:11:15 -07:00
Kevin Carter 0361308dbb Updated role using the Multi-Distro framework
* The default apt packages have been moved into a var file
  that is only loaded when the detected OS is matched.
* The Install task file has had the apt specific tasks moved
  into a named install task file.

Change-Id: Iedc70ee2898c94d326c1a16f2b0064950a7dbd91
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-03-21 21:41:53 -05:00
Jean-Philippe Evrard 58a35de92a Only update apt cache if necessary
Workarounding the upstream ansible apt module bug

documented here:

https://github.com/ansible/ansible-modules-core/pull/1517

For the next versions of ansible we'll be using, we should

check if the apt bug is fixed. When it's fixed, we could

abandon this change and use the standard apt module

with correct cache handling.

Change-Id: I74205322b1e2c7951d69222e22c3f6913b6d73d5
2016-02-15 14:49:43 +01:00
Logan V e19d5d4a51 Remove Xtrabackup from Galera client role
Carrying Xtrabackup as a hard dependency across all hosts acting as a client
of the cluster is unnecessary, as it is only required on the Galera server cluster
members themselves.

Change-Id: I2fa0e862e3a9ad73c6391969564891d913273a79
2016-02-07 14:17:59 -06:00
Kevin Carter 315030e064
updated repo pathing for new org
Change-Id: Ib93a8fa71674ada66fa4241c07a2028934b3d7e9
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-10 20:49:56 -06:00
Kevin Carter ab36aed999
first commit
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-12-09 09:23:13 -06:00