Vagrant VM setup for Socorro
Ruby Shell
Pull request Compare This branch is 20 commits behind rhelmer:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
files
manifests
.gitignore
README
Vagrantfile
ubuntu-bootstrap.sh

README

This project will use vagrant and puppet to 
install a complete Socorro (https://github.com/mozilla/socorro) 
environment in a local VM.

---
INSTALL
---

1) Install http://www.virtualbox.org/

2) Run vagrant (http://vagrantup.com/) :

 git clone git://github.com/rhelmer/socorro-vagrant.git
 cd socorro-vagrant
 gem install vagrant

 # NOTE: if you have a 32-bit host, change "lucid64" to "lucid32"
 vagrant box add socorro-all http://files.vagrantup.com/lucid64.box
 
 vagrant up

3) Add 33.33.33.10 to /etc/hosts:

33.33.33.10	crash-stats crash-reports socorro-api

4) Enjoy your Socorro environment!

browse UI:      http://crash-stats
submit crashes: http://crash-reports/submit (HTTP POST only)
query data:     http://socorro-api/bpapi/201005/adu/byday/p/GenericProduct/v/1.0/rt/any/osx/start/2011-07-27/end/2011-08-03

SSH into your VM:
 vagrant ssh

The Socorro checkout is in:
/home/socorro/dev/socorro

Socorro documentation (including developer docs) can be found at: http://socorro.readthedocs.org/

To edit and install code (after doing "vagrant ssh"):
 sudo su - socorro
 cd ~/dev/socorro
 # vi, emacs or your favorite editor
 make install

The Socorro files will be installed to /data/socorro/. You will need to restart
the apache2 or supervisord services if you modify middleware or backend code.

Alternatively, you may rerun puppet (which will run "make install" and automatically restart any
services as-needed):

 # as vagrant user
 sudo puppet /vagrant/manifests/init.pp


---
LOADING DATA
---

If you are starting a new Socorro database, refer to: http://socorro.readthedocs.org/en/latest/populatepostgres.html

Or, if you have access to an existing Socorro database snapshot, you can load it like so:

 # shut down database users
 sudo /etc/init.d/supervisor force-stop
 sudo /etc/init.d/apache stop

 # drop old db and load snapshot
 sudo su - postgres
 dropdb breakpad
 createdb -E 'utf8' -l 'en_US.utf8' -T template0 breakpad
 pg_restore -Fc -d breakpad minidb.dump

This may take several hours, depending on your hardware. One way to speed this up would
be to :

* add more CPU cores to the VM (via virtualbox GUI), default is 1
* add "-j n" to pg_restore command above, where n is number of CPU cores - 1


---
KNOWN ISSUES
---

* HBase
** need to install LZO, remove sed hack