Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vickyphang/mariadb-replication-setup
Ansible to setup MariaDB master-slave replication cluster on Ubuntu
https://github.com/vickyphang/mariadb-replication-setup
Last synced: about 2 months ago
JSON representation
Ansible to setup MariaDB master-slave replication cluster on Ubuntu
- Host: GitHub
- URL: https://github.com/vickyphang/mariadb-replication-setup
- Owner: vickyphang
- License: apache-2.0
- Created: 2024-04-01T02:10:25.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-23T09:21:57.000Z (7 months ago)
- Last Synced: 2024-05-23T10:32:54.875Z (7 months ago)
- Homepage:
- Size: 312 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MariaDB Replication Cluster ⚙️
[![GitHub license](https://img.shields.io/github/license/vickyphang/mariadb-replication-setup)](https://github.com/vickyphang/mariadb-replication-setup/blob/master/LICENSE)
![GitHub stars](https://img.shields.io/github/stars/vickyphang/mariadb-replication-setup)
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
```bash
apt update && apt install -y ansible
```2. Clone this repository
```bash
git clone https://github.com/vickyphang/mariadb-replication-setup
```3. 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
```bash
nano inventory
```4. Edit the variable file vars/main.yml
```bash
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`5. Try to connect and ping to all hosts
```bash
ansible all -m ping
```6. Run playbook
```bash
ansible-playbook deploy_cluster.yml
```