okfn/ckan — pull request #1186 by rshk (2013-08-14 07:53:11+00:00)
Title: Added Vagrantfile + setup scripts

I added support for quickly creating a development virtual machine using vagrant.
The machine setup procedure is quite rudimentary (I used a shell script to set up all the services, while something like puppet might be more appropriate) but it works just fine and helps a lot when creating a fresh development/testing installation.

To try it, you just have to:

* Install [VirtualBox](https://www.virtualbox.org/)
* Install [Vagrant](http://www.vagrantup.com/) (>=1.1 is recommended)

* Launch the automatic VM creation/setup (first time will be a bit slow as it has to download the base ubuntu image, then it saves it locally so the next times will run much faster)
```
vagrant up
```

* SSH into the machine
```
vagrant ssh
```

* Activate the CKAN virtualenv
```
workon ckan
```

* Initialize the database:
```
paster --plugin=ckan db --config=$VIRTUAL_ENV/etc/ckan/development.ini init
```

* Run the paster server
```
paster --plugin=ckan serve $VIRTUAL_ENV/etc/ckan/development.ini
```

* If everything went fine, you can now access your new ckan installation at http://localhost:8080