Giter VIP home page Giter VIP logo

terraform-wp-ecs's Introduction

Wordpress setup in AWS

References

Some references for setting up wordpress in AWS, and best practices.

Phases

Phase 1: Basic ✅

I'm going to start with a basic docker setup of wordpress locally. I'll use docker-compose to setup the wordpress and miria containers. Using the official wordpress and miria images from docker hub to start.

  • miriadb
  • wordpress
    • should learn what wordpress volumes are needed to be 'shared' between containers
    • setting up volume for entire wp dir is easiest for now

Phase 2: terraform AWS ✅

I'll use terraform to setup the AWS infrastructure. I'll start with a basic VPC, public and private subnets, and a bastion host. I'll use the AWS reference architecture as a guide.

A basic terraform setup will be used, with a main.tf file for the main configuration, and a variables.tf file for the variables.

All inputs will be stored in a main.auto.tfvars file, which will be gitignored. See the main.auto.tfvars.example file for an example.

Pre-requisites: create a ssh key pair using ssh-keygen -f bastion.key

  • Create a VPC
  • Create a public subnet
  • Create a private subnet
  • Create a bastion host (just in case 🤷‍♂️)
  • Create RDS MiriaDB instance
    • allow ssh forwarding to connect to RDS

Phase 3: Setup ECS ✅

  • Create EFS volume (single for entire wordpress dir)
    • choosing bitnami image for wordpress because it uses seperate /bitnami folder allowing for a single volume mount to be used
  • Create ECS cluster (fargate)
  • Create ECS task definition
  • Create ECS service
  • Create ALB
    • just http for now
  • Create memchased cluster

Phase 4: Setup performance services

  • Create Route53 record (bonus)
  • Setup caching manually via UI
    • there is a permission issue on the W3-cache plugin
  • Create CDN
  • Tweak EFS settings for cost/performance
  • Tweak ECS settings for cost/performance

terraform-wp-ecs's People

Contributors

tinomen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.