Public | Automated Build

Last pushed: 3 months ago
Short Description
base image
Full Description

Weatherlight

Machine Names

https://en.wikipedia.org/wiki/List_of_Mortal_Kombat_characters

Setting up a development environment

$ provision=yes vagrant up --provision
$ vagrant halt
$ vagrant up 
$ fab dev deploy

If initial set up of machine fails try running:

$ sudo apt-get update --fix-missing

Refering ansible hosts in Fabric

Entries in ansible's hosts file get translated into Fabric tasks.
For example the configuration

[dev]
dev.attentive.us
london.peddan.com
kaylee.attentive.us
jayne.attentive.us

generates a task named 'dev' for the whole group. So you can do

$ fab dev ping

And generates a task for each host, replacing the .s (dots) with _
So you can run:

$ fab dev ping    
$ fab london_peddan_com ping    
$ fab kaylee ping    
$ fab jayne ping

Deploying to Production

Make sure you can ssh to the production machines as deployer. The machines are organised by
function. We have 3 types of machines: webservers, workers and services. To deploy each one you just run:

$ fab webservers deploy
$ fab services deploy
$ fab workers deploy

You can run all 3 at once if you want:

$ fab webservers deploy services deploy workers deploy

Exporting/Importing the database

$ fab frontend backup_db
$ fab dev restore_db

The first time you are importing the DB you must remove the -c param from pg_restore.

SSH/CONFIG setup

Add this to your ssh/config:

host w1
user deployer
hostname ec2-52-16-121-78.eu-west-1.compute.amazonaws.com

host w2
user deployer
hostname ec2-52-31-191-29.eu-west-1.compute.amazonaws.com

host services
user deployer
hostname ec2-52-30-217-86.eu-west-1.compute.amazonaws.com 

host frontend
user deployer
hostname ec2-52-18-4-59.eu-west-1.compute.amazonaws.com
Docker Pull Command
Owner
attentive
Source Repository

Comments (0)