Building a WordPress website with Terraform, Ansible, Kubernetes clusters and Docker-Compose on Amazon AWS ecosystem (EC2, Route53, ELB, EFS and RDS)

Building a WordPress website with Terraform, Ansible, Kubernetes clusters and Docker-Compose on Amazon AWS ecosystem (EC2, Route53, ELB, EFS and RDS)

Main Architecture Schema

This website is built on Amazon AWS cloud with high availability servers clusters. I can scale up to N clusters, but for this example, 2 running instances are enough to illustrate the usage.

AUTOMATION

In order to provide redundancy and orchestrate the deployments of the servers applications, namely WordPress, I use Kubernetes with Docker images of Nginx (webserver) and WordPress.

Ansible will deploy the specifics apps and ressources uniformely on the nodes.

DATABASES

The Amazon Aurora database (MySQL compatible) is also replicated on the cloud and run on different EC2-instances.

VM SERVERS

EC2 Instances (Linux Ubuntu 16.4) are built automatically with Terraform scripts (infrastructure as code).

COSTS

This infrastructure solution will cost approx. 5 USD a day for the operational use (T2 micro and small instances). They are no setup fees except the yearly costs of the domain DNS purchase hellocloud.ch

Here is an example billing screenshot (costs not from this site) if you have AWS account and installed the mobile console.

 

One thought on “Building a WordPress website with Terraform, Ansible, Kubernetes clusters and Docker-Compose on Amazon AWS ecosystem (EC2, Route53, ELB, EFS and RDS)

Leave a Reply

Your email address will not be published. Required fields are marked *