darpa-xdata / vagrant-vm-boilerplate

Some files and examples to get people started on building collaborative development environments.
2 stars 0 forks source link

This project is an example of how to create a collaborative vagrant development environment.

Install and configure Vagrant
sudo apt-get install vagrant

(Optional) Add Vagrant plugin that keeps Virtual Box Guest Additions in sync.
vagrant plugin install vagrant-vbguest

Clone this repo

Go to the repo directory and start the environment
vagrant up

After it boots, log in to the VM
vagrant ssh

To add your software to the VM:

  1. Create a sensibly named deployment script in the /scripts directory. This script should download, intall, and configure all of your software from a bare operating system. This is where the majority of your development will be.
  2. Store any custom files or code in the files directory or call them from their source location with wget. Examples are in the examples.sh.
  3. Add a line to deploy.sh that calls your deployment script. # be sure to comment what it does here.

Other useful vagrant commands: vagrant suspend Saves the current running state of the machine and stops it. vagrant up will resume.

vagrant halt Gracefully shuts down the vm. vagrant up will boot it back up.

vagrant destroy Destroys the vm (and all the cruft inside of it). vagrant up will reprovision and run the deploy scripts again.

More info at http://www.vagrantup.com/

Other notes:

To have Vagrant sync the Guest Additions for Virtual Box do the following: $ # For vagrant < 1.1.5: $ # vagrant gem install vagrant-vbguest

$ # For vagrant 1.1.5+ (thanks Lars Haugseth): $ vagrant plugin install vagrant-vbguest