GithubHelp home page GithubHelp logo

deploy-wordpress-aws's Introduction

Deploying Wordpress Site using Ansible and CloudFormation

We deploy a wordpress site using Ansible and CloudFormation Template. You should have the following Pre-Requisites installed on the ansible machine. The total time to setup would be around 20~25 minutes.

Pre-Requisites:

  • git
  • python-boto
  • ansible

We buid the following stack

  • 1 VPC
    • Creates a default "Main Route Table", "Security Group", "Network ACL"
  • 1 Public Subnet inside VPC
  • 2 Private Subnets inside VPC
  • 2 Security Groups (One for WebServer, One for DB Instance)
    • DBSecGroup : Allows traffic only on DB port
    • WebServerSecGroup : Allows traffic on SSH (22) and HTTP(80) ports
  • 1 EC2 Instance for WebServer ( Public Subnet )
  • 1 RDS Instance for Wordpress Database ( Private Subnet )
  • 1 Interet Gateway
  • 1 Route Table and 1 Route for the internet attached to the Public Subnet

Instructions to Use (For Linux-Ubuntu Users)

Lets first create a keypair by logging into our amazon console. Remember the name of the keypair. We will use the created keypair to ssh into ec2 instances.

Next lets setup the credentails which we will use to provision resources. You need the access_key and secret_access_key Create a folder name .aws in your home directory, using the following command

mkdir ~/.aws/

Next create credentails file in ~/.aws/ folder, using

touch credentails

Now lets add our keys to the credentials file. Replace your_access_key and your_secret_access_key with the keys provided to you. Add these lines in your credentials file.

[default]
aws_access_key_id=your_access_key
aws_secret_access_key=your_secret_access_key

Now lets download this repository. Run

git clone https://github.com/ajinkyakadam/deploy-wordpress-aws.git

Add the following to file /etc/ansible/hosts

[local]
localhost

Then,

cd deploy-wordpress/

and provision the stack run the following,

ansible-playbook -i /etc/ansible/hosts deploy-wp.yml --verbose

Once the stack creation is complete open your browser and goto (replace WebServerPublicIp with your WebServers IP)

http://WebServerPublicIp/wordpress/wp-admin/install.php

You will see the setup page as below

Next, after you select the language of your choice, enter your details

Now you are done. You will see the following,

References

deploy-wordpress-aws's People

Contributors

ajinkyakadam avatar

Watchers

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