The galera cluster rely on WSREP for cluster consistency. While the default MySQL monitor will allow us to know when the database node is minimally functional it does not provide the ability to query the node state allowing loadbalancers, operators, and deployers to know a node is healthy prior to being allowed to accept connections. This change implements the checkcluster script as provided by the fine folks at Percona. The implementation of this check follows the guild-lines noted here [0]. With this in-place, we'll be able to convert our haproxy check for the galera cluster nodes to use an HTTP check on port 9200 instead of the default MySQL login which will provide for a more robust and fault tolerant cluster. [0] https://www.percona.com/doc/percona-xtradb-cluster/LATEST/howtos/virt_sandbox.html Closes-Bug: #1665667 Change-Id: Ie1b3b9724dd33de1d90634166e585ecceb1f4c96 Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
119 lines
4.2 KiB
YAML
119 lines
4.2 KiB
YAML
---
|
|
# Copyright 2016, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
## APT Cache Options
|
|
cache_timeout: 600
|
|
|
|
# Galera GPG Keys
|
|
_galera_gpg_keys:
|
|
- key_name: 'mariadb'
|
|
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
|
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
|
hash_id: '0xF1656F24C74CD1D8'
|
|
- key_name: 'percona-xtrabackup'
|
|
keyserver: 'hkp://keyserver.ubuntu.com:80'
|
|
fallback_keyserver: 'hkp://p80.pool.sks-keyservers.net:80'
|
|
hash_id: '0x9334a25f8507efa5'
|
|
|
|
galera_server_required_distro_packages:
|
|
- apt-transport-https
|
|
- debconf-utils
|
|
- libaio1
|
|
- libc6
|
|
- libdbd-mysql-perl
|
|
- libgcc1
|
|
- libgcrypt20
|
|
- libstdc++6
|
|
- python-software-properties
|
|
- software-properties-common
|
|
- xinetd
|
|
|
|
galera_etc_conf_file: "/etc/mysql/my.cnf"
|
|
galera_etc_include_dir: "/etc/mysql/conf.d"
|
|
galera_var_run_socket: "/var/run/mysqld/mysqld.sock"
|
|
|
|
# The package name for mariaDB is set as a variable
|
|
# so that it can be used in debconf later in the
|
|
# "galera_common" role.
|
|
_galera_mariadb_server_package: "mariadb-server-{{ galera_major_version }}"
|
|
|
|
# NB This is specifically galera_server_mariadb_distro_packages as these
|
|
# packages only get installed during the galera play - this is because of
|
|
# the preseed task and the service startup control used when installing
|
|
# mariadb-galera-server and galera.
|
|
galera_server_mariadb_distro_packages:
|
|
- libmariadbclient-dev
|
|
- mariadb-client
|
|
- "{{ galera_mariadb_server_package }}"
|
|
- galera-3
|
|
- rsync
|
|
- socat
|
|
|
|
# The packages to uninstall during an upgrade from a previous version
|
|
galera_server_upgrade_packages_remove:
|
|
- mariadb-server
|
|
- mysql-common
|
|
|
|
galera_mariadb_service_name: "mariadb"
|
|
|
|
galera_debconf_items:
|
|
- question: "mysql-server/root_password"
|
|
name: "{{ galera_mariadb_server_package }}"
|
|
value: "{{ galera_root_password }}"
|
|
vtype: "string"
|
|
- question: "mysql-server/root_password_again"
|
|
name: "{{ galera_mariadb_server_package }}"
|
|
value: "{{ galera_root_password }}"
|
|
vtype: "string"
|
|
|
|
galera_server_percona_distro_packages:
|
|
- qpress
|
|
- percona-xtrabackup
|
|
|
|
percona_arch_url:
|
|
x86_64: "https://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-2.4.5/binary/debian/xenial/x86_64/percona-xtrabackup-24_2.4.5-1.xenial_amd64.deb"
|
|
ppc64le: "http://public.dhe.ibm.com/systems/virtualization/Novalink/misc/percona-xtrabackup/percona-xtrabackup-24_2.4.5-1_ppc64el.deb"
|
|
percona_arch_fallback_url:
|
|
x86_64: "http://mirrors.reflected.net/percona/apt/pool/main/p/percona-xtrabackup-24/percona-xtrabackup-24_2.4.5-1.xenial_amd64.deb"
|
|
percona_arch_sha256:
|
|
x86_64: "6a71704e625194689d2a6b325765608040ff5da82ac4bc8ce6ac3756f9a9130f"
|
|
ppc64le: "3d4e4112f4c8020c9190a91d962dabed1dfaad307160a939e121208887eaee2a"
|
|
|
|
qpress_arch_url:
|
|
x86_64: "https://repo.percona.com/apt/pool/main/q/qpress/qpress_11-1.xenial_amd64.deb"
|
|
ppc64le: "http://public.dhe.ibm.com/systems/virtualization/Novalink/misc/qpress/qpress_11-1_ppc64el.deb"
|
|
qpress_arch_fallback_url:
|
|
x86_64: "http://mirrors.reflected.net/percona/apt/pool/testing/q/qpress/qpress_11-1.xenial_amd64.deb"
|
|
qpress_arch_sha256:
|
|
x86_64: "c615ec08eb38a9cb59541ae1d7ed42db35e92513735834b48d30d4c485e01534"
|
|
ppc64le: "a31d3e00dbcec9b3f98eae82b261d054d0b80a57f4a38967d0e953811cb082f3"
|
|
|
|
# Repositories
|
|
_galera_percona_xtrabackup_repo_url: "http://repo.percona.com/apt"
|
|
_galera_percona_xtrabackup_repo:
|
|
repo: "deb {{ galera_percona_xtrabackup_repo_url }} {{ ansible_distribution_release }} main"
|
|
state: "present"
|
|
filename: "Percona"
|
|
|
|
_galera_repo_url: "http://mirror.rackspace.com/mariadb/repo/{{ galera_major_version }}/ubuntu"
|
|
_galera_repo:
|
|
repo: "deb {{ galera_repo_url }} {{ ansible_distribution_release }} main"
|
|
state: "present"
|
|
filename: "MariaDB"
|
|
|
|
galera_wsrep_provider: "/usr/lib/galera/libgalera_smm.so"
|
|
|
|
_use_percona_upstream: no
|