Permalink
Browse files

clarify & amplify vagrant instructions

  • Loading branch information...
1 parent f7d4fc4 commit a841737d79bf3fe4d0ab1daedbe161aa50463127 @phrawzty phrawzty committed Feb 28, 2014
Showing with 41 additions and 24 deletions.
  1. +41 −24 docs/vagrant.rst
View
@@ -1,42 +1,59 @@
-.. index:: vagrant
+Set up a services VM with Vagrant
+=================================
-.. _vagrant-chapter:
+Vagrant can be used to build a VM that supplies the basic services stack
+required by Socorro. This is an alternative to setting up these services
+manually in your local environment.
-Setup a development VM with Vagrant
-===============================
+Requirements
+------------
-Vagrant can be used to build a full Socorro VM.
+You'll need both VirtualBox (http://www.virtualbox.org/) and
+Vagrant (http://vagrantup.com/) set up and ready to go.
-1. Clone Socorro repository
-::
- git clone git://github.com/mozilla/socorro.git
- cd socorro/
+Virtualenv warning
+------------------
+
+Make sure that you don't already have a ``./socorro-virtualenv`` directory
+created with a different architecture, otherwise you'll get odd errors
+about pip not existing, binaries being the wrong architecture, and so on.
-2. Install VirtualBox from:
-http://www.virtualbox.org/
+Instructions
+------------
-3. Install Vagrant from:
-http://vagrantup.com/
+1. Clone the Socorro repository:
+::
+ git clone git://github.com/mozilla/socorro.git
-4. Download and copy base box, boot VM and provision it with puppet:
+2. Provision the VM:
::
vagrant up
-5. Add to /etc/hosts (on the HOST machine!):
+This step will:
+
+* Download the base image if it isn't already present.
+* Boot the VM.
+* Using Puppet, install and initialise the basic services that Socorro
+ needs.
+
+3. Add entries to ``/etc/hosts`` on the **HOST** machine:
::
10.11.12.13 crash-stats crash-reports socorro-api
+That's it!
+----------
+
If everything works, you'll now have a VM running with all of Socorro's
-dependencies installed and ready for you!
+service dependencies installed and ready to go!
Your git checkout will automatically be shared with the VM in
-/home/vagrant/src/socorro, you can access it like so:
-::
- vagrant ssh
- cd src/socorro
-
-Make sure that you don't already have a ./socorro-virtualenv directory
-created with a different architecture! Otherwise you'll get odd errors
-about pip not existing, binaries being the wrong architecture and so on.
+``/home/vagrant/src/socorro`` .
+
+You can either hack on the code from within the VM or on the host machine
+as normal. Note that, by default, none of the services are available outside
+of the VM; see the Vagrant_ documentation for more details on how to modify
+this behaviour.
Now continue in the install docs, starting from: :ref:`settingupenv-chapter`
+
+.. _Vagrant: https://docs.vagrantup.com/v2/networking/forwarded_ports.html

0 comments on commit a841737

Please sign in to comment.