bertvv / ansible-role-mariadb

Install MariaDB on RHEL/CentOS 7 or Fedora.
https://galaxy.ansible.com/bertvv/mariadb/
Other
144 stars 108 forks source link

Feature galera support #42

Closed fpkmatthi closed 1 year ago

fpkmatthi commented 4 years ago

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'"
  2. 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
bertvv commented 4 years ago

Thank you!

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

csuka commented 4 years ago

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 commented 4 years ago

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

bertvv commented 1 year ago

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.