This Project creates Highly Available WORDPRESS website where MySQl DB is RDS and Persistent Storage using EFS.
-
Well ! not much of an expert, a very basic explanation is that CANARY deployment strategy is a new version of the Software can be deployed for the Testing Purpose and Current Version remains deployed as production release for Normal operations on the stage.
-
By keeping canary traffic small and the selection random, most users are not adversely affected at any time by potential bugs in the new version, and no single user is adversely affected all the time.
-
After the test metrics pass your requirements, you can promote the canary release to the production release and disable the canary from the deployment. This makes the new features available in the production stage.
Find more info at AWS Documentation
- Application Load Balancer alb.tf
- AutoScaling Group with Max 3 Instance and Min 1 Instance asg.tf
- Blue ECS Cluster Group for our Blue means Production release worklaod Blue_ECS.tf
- Task definition for the Blue ECS Service blue_task_definition.json
- Green ECS Cluster Group for our Green means Production release worklaod Green_ECS.tf
- Task definition for the Blue ECS Service green_task_definition.json
- Deployment Controller for cananry deployment deployment_group.tf
- Elastic File System to store persistent data efs.tf
- Launch Configuration lc.tf
- RDS MySql Database for high avaialbility of DB rds_mysql.tf
- Roles required to manage the ECS Task Scaling roles.tf
- Route 53 to manage the DNS routing route53.tf
- Virtual Private Cloud VPC for our workload vpc.tf
- All the variables are stored in variables.tf for Generic Deployment.
- Clone Current Repository.
git clone https://github.com/ankitosh/aws-ecs-canary-deployment.git
- Create config.tf file with below details.
data "aws_caller_identity" "current" {} provider "aws" { region = "${var.aws_region}" } terraform { backend "s3" { bucket = "Your S3 Bucket Name" key = "Your File Name.tfstate" region = "region of choice" } }
- Create .tfvars file with secret info
aws_region = "eu-west-1" ecs_key_pair_name = "" db_admin = "" db_password = "" domain_name = ""
- Run Terraform Initialization Command
terraform init - After Successfull Initialization you can run PLAN your resources.
terraform plan -var-file=yourvarsfile.tfvars - Once verified the resources you can Deploy it for production use.
terraform apply -var-file=yourvarsfile.tfvars
- Cloudfront
- Web Application Firewall
