README Update

This commit is contained in:
Tyler Hale 2023-02-06 15:47:28 -07:00
parent db8abb89d8
commit 4daa6d2d0b
Signed by: Tyler
GPG key ID: C7CC4B910D88EF96

View file

@ -1,19 +1,50 @@
# Ansible-MariaDB-Cluster # Ansible-MariaDB-Cluster
Ansible playbook that provisions a group of servers to run mariadb as a Galera Cluster.
## Requirements ## Requirements
If you are using HaProxy as a front end to the cluster, you will need to create a user for the health checks to work properly. The user does not need to be able to access any databases, it just needs to be able to authenticate against the server.
```sql
CREATE USER 'haproxy_check'@'10.10.10.253' WITH MAX_QUERIES_PER_HOUR 1 MAX_UPDATES_PER_HOUR 0 MAX_STATEMENT_TIME 0.0000000001;
```
## Variables ## Variables
| Variable | Required | Default | Choices | Description | | Variable | Required | Default | Description |
| -------- | -------- | ------- | ------- | ----------- | | ---------------------------------- | -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------- |
| | | | | | | mariadb_cluster_wsrep_cluster_name | yes | my_wsrep_cluster | The wsrep cluster name that should be used for the galera cluster |
| mariadb_cluster_access_ip | no | "" | If defined, the normal database port (3306) will only be accessible from the defined IP for use with a load balancer |
## Example ## Example
```yml
---
# file: hosts
mariadb_cluster:
hosts:
db01:
ansible_host: 10.10.10.11
db02:
ansible_host: 10.10.10.12
vars:
mariadb_cluster_wsrep_cluster_name: "CustomCluster1"
mariadb_cluster_access_ip: "10.10.10.253"
ansible_user: ansible
```
## Troubleshooting
You can view the status of the cluster by running the following command.
```sql
SHOW GLOBAL STATUS LIKE 'wsrep_%';
```
## License ## License
See LICENSE file for full license information. See LICENSE file for full license information.
## Screenshots