ansible-role-mariadb
ansible-role-mariadb copied to clipboard
Feature galera support
At your request I added tags: mariadb to all tasks and the mariadb_ preposition to the new role variables. (notify me if I forgot any)
In regard to the availability to external users, I used a Vagrant test environment with bertv.rh-base:
- Execute on all nodes to test if they all joined the cluster:
sudo su
mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size'"
- Test the availability to an external machine:
- Ansible rh-base firewall configuration:
rhbase_firewall_allow_ports:
- 53/udp
- 3306/tcp
- 4567/tcp
- 4567/udp
- 4568/tcp
- 4444/tcp
- Ansible database configuration:
mariadb_bind_address: '0.0.0.0'
mariadb_databases:
- name: wordpress
mariadb_users:
- name: fpkmatthi
password: "{{ vault_mariadb_fpkmatthi_password }}"
priv: 'wordpress.*:ALL'
host: '%'
mariadb_root_password: "{{ vault_mariadb_root_password }}"
mariadb_galera_cluster_name: 'galera_cluster'
mariadb_galera_nodes:
- 192.168.40.21
- 192.168.40.22
- 192.168.40.23
- Execute on a host that's not part of the cluster:
mysql -u fpkmatthi -p -h 192.168.40.21 wordpress
I think support for an arbiter should be added. I'm also going to address some issues I see in the PR, please fix them before merging.
Perhaps also add a L7 check when the node has joined the cluster. Also, the galera playbook isn't idempotent.
Idempotence is a requirement for merging. I appreciate the work that has been put into this, and I'm sorry I'm not able to follow up on PRs in a more timely manner. I have no resources to go through this PR's code myself to fix any issues. Since the PR has been stale for quite some time, I'm afraid I'm going to have to close this.