ansible-role-mariadb icon indicating copy to clipboard operation
ansible-role-mariadb copied to clipboard

Feature galera support

Open fpkmatthi opened this issue 5 years ago • 3 comments
trafficstars

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:

  1. 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'"
  1. 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

fpkmatthi avatar Jun 19 '20 15:06 fpkmatthi

Thank you!

ansible-lint indicates several issues, can you check these? See the Travis-CI build log

bertvv avatar Jun 20 '20 08:06 bertvv

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.

csuka avatar Aug 11 '20 13:08 csuka

Perhaps also add a L7 check when the node has joined the cluster. Also, the galera playbook isn't idempotent.

csuka avatar Aug 11 '20 13:08 csuka

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.

bertvv avatar Oct 07 '22 13:10 bertvv