4

Deploying MySQL Group Replication With Terraform

 1 year ago
source link: https://www.percona.com/blog/deploying-mysql-group-replication-with-terraform/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Deploying MySQL Group Replication With Terraform

February 15, 2023

Previously, I wrote about our Terraform provider to deploy Percona Server for MySQL (Percona Server for MySQL: Automatic Cloud Deployment With Terraform) and Percona Monitoring and Management (Deploying Percona Monitoring and Management (PMM) With Terraform). Now we also added the capability to deploy Group Replication configuration with Percona Server for MySQL, and assuming we have PMM installed (see previous post), we also can automatically add Group Replication nodes to PMM monitoring.

Shell
resource "percona_ps" "psgr" {
  count = 1
  instance_type            = "t3.micro" # for AWS
  key_pair_name            = "sshKey1"
  password                 = "password"
  replication_type         = "group-replication"                            
  replication_password         = "replicaPassword"
  cluster_size             = 3
  path_to_key_pair_storage = "/tmp/"
  pmm_address              = "http://admin:[email protected]"      
  pmm_password             = "password"

After deployment we have a 3-node Group Replication cluster with monitoring in PMM:

Group Replication cluster with monitoring in PMM

The source code for our Terraform provider is here: Percona-Lab/terraform-provider-percona: Terraform modules to deploy Percona Server and Percona XtraDB Cluster (github.com).

And you are welcome to use our prepackaged binaries from Percona-Lab/percona | Terraform Registry.

Percona Distribution for MySQL is the most complete, stable, scalable, and secure open-source MySQL solution available, delivering enterprise-grade database environments for your most critical business applications… and it’s free to use!

Download Percona Distribution for MySQL Today

Subscribe
Connect with
guest
Label
0 Comments

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK