This is a Terraform and Ansible project to provision a high availability MariaDB Enterprise Server deployment on Amazon Web Services. This automation project will create the following system:
- 3 MariaDB Nodes For Durability & Performance
- 2 MaxScale Nodes For High Availability
† Requires Terraform v0.14.4 or above.
‡ Requires Full Ansible 2.10.5 or above. (Not Ansible-Core)
Open a terminal window and clone the repository:
git clone https://github.com/mariadb-ksizemore/mariadb-enterprise-ha-ansible.git
cd
into the newly cloned folder- Edit terraform.tfvars and variables.tf files to supply your own variables.
terraform init --var-file="terraform.tfvars"
terraform plan --var-file="terraform.tfvars"
(Optional)terraform apply --var-file="terraform.tfvars" --auto-approve
ansible-playbook provision.yml
AMI OS | AMI ID | Region | Zone |
---|---|---|---|
centos7 | ami-0a4497cbe959da512 | us-west-2 | us-west-2a |
- url:
http://<MaxScale_Public_IPv4_DNS>:8989
- username:
admin
- password:
mariadb
terraform destroy --var-file="terraform.tfvars" --auto-approve
Packages Required:
- openjdk-17-jdk
- openjdk-17-jre
STEPS:
-
Edit Demo.java file and input the MaxScale External IPs.
-
Execute the code:
cd scripts
javac -cp *.jar Demo.java