Skip to content

Provisioning basic infrastructure for ProxySQL & MySQL on VPC

Notifications You must be signed in to change notification settings

debeando/psshat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Percona Server Stack in HA with Terraform AWS

This project work with another project to provisioning and configure each instances.

Requirements:

  • AWS Credentials
  • S3 Bucket to store terraform states.

First steps

export AWS_ACCESS_KEY_ID=<YOUR_ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<YOUR_SECRET_ACCESS_KEY>
export AWS_DEFAULT_REGION=<YOUR_REGION>

To set default variables for Terraform, add the TF_VAR_ prefix for each custom variables:

export TF_VAR_aws_region=$AWS_DEFAULT_REGION
export TF_VAR_aws_key_name=<KEY_NAME>
export TF_VAR_project=<PROJECT_NAME>
export TF_VAR_env=<ENV_NAME>

The TF_VAR_aws_key_name variable without .pem.

Initialize a Terraform working directory, download plugins and load modules:

make install

Environment

Define the follow env variables for specific environment, for example:

export TF_VAR_env=sandbox

Deploy

Modules

terraform plan -target module.vpc
terraform apply -target module.vpc

Number of instances

terraform apply -target module.mysql -var 'mysql_count=2'

About

Provisioning basic infrastructure for ProxySQL & MySQL on VPC

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published