This template can be used to launch on-demand Wordpress application in AWS ECS.
- 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
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
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>
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
Copy the elb_hostname
from the out put section & past on your browser.
Done!
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