Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 1.9 KB

README.md

File metadata and controls

58 lines (43 loc) · 1.9 KB

MariaDB Replication Cluster ⚙️

GitHub license GitHub stars

The mariadb-replication-setup project is designed to deploy MariaDB master-slave replication clusters on Ubuntu (both focal, jammy, mantic). This solution is tailored for use on dedicated physical servers, virtual machines, and within both on-premises and cloud-based infrastructures.

This project currently only facilitates the creation of new clusters.


MariaDB Master-Slave Replication Topology

Requirements

This playbook requires root privileges or sudo.

Deployment: quick start

  1. Install ansible on control node
apt update && apt install -y ansible
  1. Clone this repository
git clone https://github.com/vickyphang/mariadb-replication-setup
  1. Edit the inventory file

Specify hostname, IP addresses (ansible_host) and connection settings (ansible_user, ansible_ssh_pass or ansible_ssh_private_key_file for your environment

nano inventory
  1. Edit the variable file vars/main.yml
nano vars/main.yml

Minimum set of variables:

  • mariadb_version
  • mariadb_replication_user # user to connect to the Master server and request binary logs
  • mariadb_replication_password
  • (Optional) create_user # if set to true, create new user. must fill mariadb_user, mariadb_password, mariadb_host
  1. Try to connect and ping to all hosts
ansible all -m ping
  1. Run playbook
ansible-playbook deploy_cluster.yml