Coder Social home page Coder Social logo

pvj / mikado Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dominis/mikado

0.0 2.0 0.0 485 KB

🤖💨Mikado helps managing your AWS infrastructure for Wordpress sites by defining an out-of-box, highly available, easy-to-deploy setup

License: MIT License

Makefile 2.85% Shell 12.58% HCL 78.59% Perl 5.97%

mikado's Introduction

Mikado

Intro

Mikado helps managing your AWS infrastructure for Wordpress sites by defining an out-of-box, highly available, easy-to-deploy setup.

Our goals are:

  • Provide an oversimplified but flexible and resilient one-click Wordpress deployment
  • Create a widely used standardized Wordpress infrastructure
  • Implement performance, security and infrastructure best practices out of box
  • Have automated, auditable, and idempotent configuration

Overview

Mikado provides a fully automated way to deploy and maintain your infrastructure built with Terraform and Packer + Ansible with the following services integrated optionally:

Infrastructure overview

Mikado overview

  • Mikado will create its own VPC with public and private subnets in all the available Availability Zones in the selected region - providing a geo-redundant highly-available setup
  • The Wordpress site will be deployed to an Multi-AZ Auto scaling group with a set of pre-defined but fine tunable up/down scaling rules
  • Uploaded assets are stored on an EFS drive
  • A Multi-AZ RDS cluster is used in the database layer
  • Route53 used to manage DNS for the site
  • Optionally you can deploy a Fastly service for your site to cache all your requests.

Quick start

Building your base AWS infra

Mikado provides a Vagrant instance for local development with all the dependencies installed.

Get the latest version of mikado:

git clone http://github.com/dominis/mikado
cd mikado

Start the vagrant instance, for this you need to install vagrant first:

vagrant up
vagrant ssh
cd mikado

You need to create your env file for your credentials:

cp env.mk.template env.mk
vim env.mk

Once you done you can run terraform to build the base infrastructure:

make apply

This will create a VPC in the selected region with public and private subnets in all available Availability Zones. This is needed for the next step.

At this point you will be able to create the image for your application servers. This step will start a new EC2 instance in one of your subnets and will provision it by using Ansible. If the process is successful an AMI will be created. This will be the base for your servers in the Auto Scaling Groups.

make build-ami
make deploy-ami

If you make it this far you can configure your Wordpress setup. Check out the examples.

cp examples/basic-no-fastly.tf terraform/wpexample.com.tf
make apply

Deploying your website

Mikado has a very simple automated deploy workflow based on git and branches.

You need to set the site_repo variable in the env.mk file in the following format: https://YOUR_GITHUB_OAUTH_TOKEN:[email protected]/YOUR_GITHUB_USER/wordpress.example.com.git

More info on the token creation

Take a look at the example repository. The simplest way to start is forking this repo.

Important information about the wordpress deploy process:

  • develop branch will be deployed to the test server
  • production branch will be deployed to the prod server
  • the wp-contents/uploads directory should be ignored in the .gitignore and shouldn't exists in the repo, a symlink is created pointing to the EFS mount here automatically
  • for the test/prod database config check out the wp-config.php
  • this is the script which pulls the changes from git every minute on the instances

FAQ

  • Q: How can I ssh to my instances

  • A: Both the test and prod ELB exposes ssh for the IP blocks in the internal SG (TF_VAR_allowed_cidrs env var), so you can simply ssh [email protected] or ssh [email protected].

  • Q: The following error is thrown during vagrant up: The box 'bento/centos-7.1' could not be found or could not be accessed in the remote catalog. If this is a private box on HashiCorp's Atlas, please verify you're logged in via vagrant login. Also, please double-check the name. The expanded URL and error message are shown below: (sic!)

  • A: On version 1.8.7 the embedded curl Vagrant uses had a bug. Workaround for v1.8.7: sudo rm -rf /opt/vagrant/embedded/bin/curl Or, update Vagrant to v1.8.8

Mailing list

https://groups.google.com/forum/#!forum/mikado-dev

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.