netzwirt.galera-cluster
Galera Cluster
Features
- Set up a MariaDB Galera cluster.
- Start a new master and slaves.
- Install Percona XtraDB scripts and services. (See Percona Cluster Check)
Role Variables
Passwords
Passwords should be saved on the local Ansible machine.
Specify where to store them with galera_password_lookup_dir
.
Group Variables
galera_server_package
: mariadb-server-10.1galera_cluster_name
: galeragalera_bind_address
: 0.0.0.0galera_manage_users
: True
Make sure the galera_cluster_name
matches your group variable name, or you will get errors.
Host Variables
Set galera_bootstrap
to True on one node; this will be the original master node.
Assign galera_node_ip
for each host (See example inventory).
Monitor Cluster via HTTP
Refer to Percona Cluster Check.
Set galera_check_scripts
to True if you want to install the Percona cluster check scripts.
Specify the port for the xinetd service with galera_check_scripts_port
.
Check User for HAProxy
Create a check user for HAProxy without a password:
Enable galera_haproxy_user
by setting it to True.
List all allowed hosts in galera_haproxy_hosts
.
Install Percona Nagios Plugins
Run the playbook with the following command:
--tags=nagios-plugins --extra-vars="{galera_nagios_plugins_version: '1.1.6'}"
Plugins will be installed in /usr/lib/nagios/percona-plugins/
.
Dependencies
None
Example
Inventory
[galera]
aav.gluster01 galera_node_ip=10.100.2.91
aav.gluster02 galera_node_ip=10.100.2.92 galera_bootstrap=1
aav.gluster03 galera_node_ip=10.100.2.93
Playbook
- hosts: galera
become: true
roles:
- netzwirt.galera-cluster
License
BSD
Author Information
Install MariaDB galera-cluster
ansible-galaxy install netzwirt.galera-cluster