This vagrant project is for the xlang-vm project under XDATA. Follow these instructions.
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
git clone https://github.com/darpa-xdata/xlang-vm.git
Go to the repo directory and start the environment (vagrant commands must be typed in the repo root dir where the Vagrant file resides)
vagrant up
After it boots, log in to the VM
vagrant ssh
To add your software to the VM:
- 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.
- 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.
- Add a line to deploy.sh that calls your deployment script. # be sure to comment what it does here.
- Commit your changes back to this github repository early and often so everybody can test and benfit from them.
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 and troubleshooting:
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+: vagrant plugin install vagrant-vbguest
If deployment still fails because the /vagrant directory on the guest operating system fails to mount, this is potentially an incompatibility with VirtualBox Guest Additions. To fix this, vagrant ssh
into the system and run the following command:
sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions
Then exit the guest OS and type vagrant reload
. The system should provision cleanly now.
This problem was encountered after upgrading a host operating system to Trusty Tahr (14.04) May 2014.