mozilla/fxa-auth-server — pull request #436 by dannycoates (2013-12-16 23:31:35+00:00)
Title: Experimental local dev deployment + benchmarks

Looking for f? on some crazy new stuff.

@rfk @chilts @jbonacci

I started this branch to try for a better local test setup that's closer to production. So far I've got the absolute basics setup, SL 6.4, MySQL, node. No puppet, heka, circus yet. If you've got a few minutes to set this up and run it in the background I'd love your feedback.

### Prerequisites

* Install [packer](http://www.packer.io/downloads.html) I used brew
* virtualbox, vmware, or both
* vmware requires a **paid** vagrant [addon](http://www.vagrantup.com/vmware)

### Build

* `cd vm` and run `packer build dev.json` **or**
* virtualbox only `packer build --only=virtualbox dev.json`
* vmware only `packer build --only=vmware dev.json`
* This will take a ***LONG TIME*** so don't watch it closely
* it downloads the 4GB SL 6.4 iso
* builds a machine and installs updates
* compresses and creates a vagrant box
* This should produce files `sl64_*.box`

### Run

* `cd ..` and run `vagrant up`
* for vmware `vagrant up --provider=vmware_fusion`
* `vagrant ssh`
* `cd /vagrant`
* `npm rebuild`
* `npm install`
* `npm run test-all`
* And *finally* `node test/bench`
* this will run a test with a key_server and 2 clients for 2 minutes and print out a bit about rps, etc. Very rough.
* I still need to make all of the options into parameter
* you can also run `DB_BACKEND=mysql node test/bench` to test against mysql

I'm looking for feedback on the packer approach, test/bench, and whatever else. I'd like to incorporate the ops puppet scripts next if I can. And also build separate VMs for webhead, db, etc to mirror stage.

:snowman: