public
Description: demisauce, a suite of services to aid application development
Homepage: http://www.demisauce.org
Clone URL: git://github.com/araddon/demisauce.git
Aaron Raddon (author)
Thu Nov 05 19:40:28 -0800 2009
commit  dd4d375c0af90f87c3595eae042f128d6d6890ef
tree    3f98ec5d9a9e9f19f48b90edc69ca0145d48d2c7
parent  9a6d61915bfa8c09ff7b7fb89316686e13d6ca20
demisauce / install
name age message
..
file README.rst Loading commit data...
directory ec2/ Tue Oct 27 11:47:30 -0700 2009 upgrading deprecated sha lib, deployment cleanup [Aaron Raddon]
file fabfile.py
file install.sh Mon Oct 26 17:29:13 -0700 2009 adding spam comment filtering, upgrade sqlalche... [Aaron Raddon]
file install_demisauce.sh Thu Nov 05 19:40:28 -0800 2009 adding redis, supervisord, fixing a few bugs in... [Aaron Raddon]
file install_initd.sh Thu Nov 05 19:40:28 -0800 2009 adding redis, supervisord, fixing a few bugs in... [Aaron Raddon]
file install_mysql.sh Thu Nov 05 19:40:28 -0800 2009 adding redis, supervisord, fixing a few bugs in... [Aaron Raddon]
file install_openvmtools.sh Sat Feb 07 12:45:24 -0800 2009 add script to install openvmtools on a vmware i... [Christian Carey]
file install_zamanda.sh Mon Oct 26 17:29:13 -0700 2009 adding spam comment filtering, upgrade sqlalche... [Aaron Raddon]
directory recipes/
file start_ec2.py Tue Jan 13 20:24:03 -0800 2009 mods to allow for EBS on ec2 and clean up readm... [Aaron Raddon]
install/README.rst

This is the main installer and it is assumed you are doing a server install, or on a VMWare. As Demisauce is meant to be services used by your app, the recommended install is in vm/kvm/xen for development, not onto your actual machine. If you install on VM in dev you can setup your desktop dev machine configs to point to this image for Memcached, Redis, Gearman, MySQL etc and do python on your desktop.

Simple Workflow: Setup a VM/EC2 image for trial of Demisauce

This uses Fabric for installation download and install.

If doing local VM install, Get Ubuntu Server and start the install by doing updates and adding SSH and wget. This also prints out the IP address (use bridging in vm if you want access via web from your desktop):

apt-get update
apt-get install openssh-server
ifconfig  | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}

Download Demisauce Source using git

git clone git://github.com/araddon/demisauce.git

Edit the Fab files for your IP(hostname) addresses of VM and run the install:

fab vm107 build:rootmysqlpwd="demisauce",userdbpwd="demisauce" -p demisauce

Full Lifecycle Workflow: Setup, dev, test, prod, deploy, repeat

Follow steps in Simple Worflow to install Fabric, and download VM's for dev on local.

1. Build Base Image (Dev, Test, Prod)

Build a machine from Scratch (see #2 for upgrades), you need to do the one step manually because it times out quite often:

fab vm107 build:rootmysqlpwd="demisauce",userdbpwd="demisauce" -p demisauce
2. Deploy Latest code to your env (Dev, Test, Prod)

Get latest set of source code, and potentially DB changes to deploy to Dev, Test or Prod machine(s). Note, this does Not include db script updates (see below):

fab vm107 release:userdbpwd="demisauce" -p demisauce
3. Backup DB on Prod Machine

Backup/Copies of prod data for backup as well as usage on #4. Combination of EC2 EBS as well as sql backups.:

System Message: WARNING/2 (<string>, line 44)

Literal block expected; none found.

fab vm107 db_backup_apply -p demisauce

4. Restore Prod Data on Dev, Test for testing next release
Getting your prod data onto machine to verify next release will work.
5. Apply DB Script updates for latest release
After restoring a copy of prod date (optional), apply any db changes since last release.
6. Test/Verify
Verify that changes work
7. Linse, Lather, Repeat: Do on prod after test
Repeat the steps for the dev, test, prod environments
8. Take image of EC2 Prod machine

After building a machine (#1) and deploying code and data (#2,5) if you are on EC2 save a copy of machine to S3.

This is useful in case you need to quickly restart a machine on failure (needs monitoring) OR for adding load balanced capacity.