Skip to content

Containerised high available wordpress application

Notifications You must be signed in to change notification settings

amalcp/Terraform_WP_ECS

Repository files navigation

Containerised Wordpress on ECS

This template can be used to launch on-demand Wordpress application in AWS ECS.

What this template will do

  • Use AWS as platform
  • Create barnd new coustom VPC with all requied configurations
  • ECS Culuster with container load balancing
  • Self heling ECS instances
  • RDS
  • Out put the ELB endpoint URL

Prerequisites!

AWS CLI

$ apt-get update && apt-get install python-pip
$ pip install awscli
$ awscli --version

Terraform

$ cd /opt/
$ wget https://releases.hashicorp.com/terraform/0.11.8/terraform_0.11.8_linux_amd64.zip
$ unzip terraform_0.11.7_linux_amd64.zip
$ sudo ln -s terraform /usr/bin/terraform
$ terraform --version

Dry Run!

Run the following terraform plan command is used to create an execution plan:

$ git clone [email protected]:amalcp/Terraform_WP_ECS.git
$ cd Terraform_WP_ECS
$ terraform plan -var db_pass=<strong_rds_pass> -var key_name=<existing_ec2_key_name>

Build

The terraform apply command is used to apply the changes required to reach the desired state of the configuration, or the pre-determined set of actions generated by a terraform plan execution plan

$ terraform apply -var db_pass=<strong_rds_pass> -var key_name=<existing_ec2_key_name

Browse the wordpress blog!

Copy the elb_hostname from the out put section & past on your browser. Done!

Deleting the stack

Resources will be destroyed using the terraform destroy command, which is similar to terraform apply but it behaves as if all of the resources have been removed from the configuration

$ terraform destroy

About

Containerised high available wordpress application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published