Code Monkey home page Code Monkey logo

infrastructure-as-code-with-wordpress-and-terraform's Introduction

Infrastructure Deployment with Terraform

Software Architecture of the Project

The high-level view of the software architecture of the project consists of the following:

  • An Ubuntu virtual machine (or EC2 instance)
  • A MySQL database
  • A PHP + WordPress installation
  • The Apache web server

High-Level Cloud Infrastructure of the Project

Deployment CheckList

  • [ X ] Launch and configure private network resources in your cloud provider.
  • [ X ] Set up the database as a service.
  • [ X ] Implement NFS filesystem as a service.
  • [ X ] Deploy and configure the load balancer service.
  • [ X ] Gather information on launched services and resources.
  • [ X ] Dynamically generate scripts to bootstrap admin and web virtual machine instances.
  • [ X ] Launch the admin virtual machine instance with the generated script, updating the OS, installing necessary software, configuring NFS, and setting up WordPress.
  • [ X ] Launch web/worker virtual machine instances with the generated script, updating the OS, installing required software, configuring NFS, and starting the webserver.
  • [ X ] Register all virtual machine instances with the load balancer for traffic distribution.

Setting Up The Infrastructure

  • Navigate into the terrafrom directory in the repo
  • To change the default variables used in deploying the infrastructure, go to the 99-variables.tf and 01-setup.tf files to set up your different values.
  • Make sure to have Terraform installed; initialize the Terraform project with:
terraform init
  • Then, to check the execution plan produced by Terraform for the project:
terraform plan
  • If everything is alright, go ahead and deploy the infrastructure with:
terraform apply

Accessing the WordPress Admin Instance

  • There will be 3 outputs;
    • the Address to use to access the WordPress application in the instances,
    • the username to use to Login to the WordPress admin instance,
    • the password to use to Login to the WordPress instance labelled sensitive.
  • To view the password, run the command terraform output -json. It will output all the above outputs unto you terminal and you can use these to access the WordPress instances.

infrastructure-as-code-with-wordpress-and-terraform's People

Contributors

taskmasterernest 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.