diff --git a/vagrant/README.md b/vagrant/README.md index 9e69647..ad08861 100644 --- a/vagrant/README.md +++ b/vagrant/README.md @@ -3,14 +3,13 @@ Vagrant [Vagrant](www.vagrantup.com) is a tool for creating and configuring reproducible and portable development environments. It essentially creates a (disposable) virtual machine -for you that sets up OPM automatically. The files in this directory is everything you need +for you that can set up OPM automatically. The files in this directory is everything you need to create a Ubuntu 14.04 environment that checks out, compiles, and tests OPM modules. It requires [VirtualBox](www.virtualbox.org) and Vagrant to be installed. They are apt-gettable on recent Ubuntus and have relatively hassle-free installers on Windows and OSX. - To use vagrant execute the following from the directory containting the ```VagrantFile```. ``` $ sudo apt-get install vagrant @@ -18,9 +17,8 @@ $ vagrant up ``` The first time this is executed will take a significant amount of time, as the full Ubuntu -image must be downloaded. Consequently, OPM will be downloaded (from github), compiled, -and tests run. After this process has completed, you can log into the machine and try out -OPM. +image must be downloaded. After this process has completed, you can log into the machine +and try out OPM. Execute the following to log into the virtual machine as the vagrant user ``` @@ -30,3 +28,17 @@ $ vagrant ssh From here you can build and execute tests in a reproducible environment. Everything you do in this environment can easily be discarded, and will only affect the virtual machine: your own machine will remain unaffected by changes here. + +To clone, compile, and test OPM, simply run the shell script +``` +vagrant@vagrant$ /host/clone_and_compile.sh +``` +*inside* the virtual machine (after executing ```vagrant ssh```). This takes quite some time +to download, compile, and test the OPM modules one by one. + +If you for some reason are unhappy with the virtual machine, you can dispose of it easily +by executing +``` +$ vagrant destroy +``` +from outside the virtual machine. diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index f0a1fa5..2dc8cef 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -41,7 +41,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # the path on the host to the actual folder. The second argument is # the path on the guest to mount the folder. And the optional third # argument is a set of non-required options. - config.vm.synced_folder "..", "/opm-host" + config.vm.synced_folder ".", "/host" # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh index a22e1f3..c0c3d89 100755 --- a/vagrant/bootstrap.sh +++ b/vagrant/bootstrap.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash -./install_packages.sh +/host/install_packages.sh