Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

State Decoded / Vagrant Configuration

A Vagrant configuration for State Decoded, to make it easy to get started.

Install Vagrant and git!

Installing Vagrant is very simple—simply follow the instructions.

You can find an installer for git here

Dowload the code and start the Vagrant Machine

  • From the command line run git clone
  • cd into the statedecoded-vagrant directory
  • Download the git submodules using: git submodule update --init
  • Run the command vagrant up (This can take roughly 10 minutes or slightly longer if this is the first time)

Watch puppet take care of most of the installation! (hopefully!)

We are using puppet to provision our virtural machine. If you run into problems at this stage please open a bug on github. Once puppet has finished running several things have happened:

  • The virtual machine exists on a private network, reachable at
  • An apache server is running with its doc root at /var/www/statedecoded/htdocs
  • A solr server is running with its home set to /var/www/statedecoded/solr_home
  • A mysql server is running with a username and password specified at the top of manifests/default.pp (the root mysql password can be found at ~/root-mysql/.my.cnf
  • PHP and all of its dependencies have been installed
  • A copy of the statedecoded source code has been placed at /var/www/statedecoded

At this point you are extremely close to having a running instance of the statedecoded. What you need to do is finish the configuration/setup of the statedecoded itself. Refer to the manual for the for the whole picture of what happened. Anyway, you still need to download some laws in XML to import and then run the law import. Before doing this you should test your enviroment by going to and running the tests. Make sure everything passses, if you can't figure out how to get a test to pass just ask somebody. Once that is all done you should be able to run the parser also at that imports the laws into mysql and solr.

If all else fails!

If the puppet install is causing more problems than it is worth try the manual installation. Create a new vagrant box and follow the docs!

Debugging notes

  • On your host machine the virtual machine is reachable at

  • Meaning the statedecoded admin interface lives at

  • If you want to run puppet from within the vagrant machine run this concise command:

puppet apply --verbose --modulepath
'/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' --manifestdir
/tmp/vagrant-puppet/manifests --detailed-exitcodes
  • Solr's admin interface is reachable at:

  • You can run solr as a foreground process to see if it is having problems on startup/running with (assuming you did the puppet install): /usr/bin/java -Dsolr.solr.home=/var/www/statedecoded/solr_home -Djetty.home=/opt/solr/example -jar /opt/solr/example/start.jar

  • The php error log's generated by the statedecoded live in /var/log/apache2/

  • Remember that patience is a virtue :)


Vagrant configuration for State Decoded, to make it easy to get started, in the spirit of GitMachines.



No releases published
You can’t perform that action at this time.