Vagrant and virtualenv
Alright 3 questions here:
Whats the postinstall.sh that is found on every vagrant VM for? do i need to run it everytime I create a new VM?
Second, whats the purpose of using vagrant together with virtualenv? isn't the whole point of using vagrant is to create a self-contained VM?
Third, from what I understand so far, Vagrant has some functions to help setup the VM with the required software packages, so why not install pip, django, and so on through its provisioning system?
Also, thanks a bunch for doing this :), glad my first kickstarter contribution turns out so awesome!
Answers
Yes, Vagrant creates a self-contained environment, but the point of using Vagrant is to more closely replicate Heroku, since that is our production environment, and Heroku uses virtualenvs. I also think it's a damn good idea, 99.9999% of the time, to use virtualenv anyway. It's a good practice to get into and I'd rather encourage it than point out ways around it.
Could it be that the author wanted to emphasize the need to be familiar with the most python specific stuff, like pip, virtualenv and django installation? These python tools will always be good to master, even if you would not bother with vagrant and VM setups.
postinstall.sh installs the necessary packages (cookbooks) like Git and PostgreSQL (found in the Cheffile). run it only once, after you boot the VM for the first time.
you might need to install different Django version or another framework with libraries that might not work with others or cause some problems, so it is better to isolate each version or framework in its own virtualenv environment .
vagrant has a lot of benefits. specifically when working in teams, you can ensure identical development environments for everyone on your team.
http://net.tutsplus.com/tutorials/php/vagrant-what-why-and-how/
http://docs-v1.vagrantup.com/v1/docs/getting-started/why.html