Skip to content

Virtual machine provisioned with a few geometry related packages, for experimental purposes.

License

Notifications You must be signed in to change notification settings

sciboxes/geobox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geobox

Virtual machine provisioned with a few geometry related packages, (fastkml, shapely, gmaps, geopy), for experimental purposes. The VM also includes the required packages (ipython, jinja2, pyzmq, tornado) to run the ipython notebook.

At the time of this writing the box used is the official Ubuntu Server 14.04 LTS (Trusty Tahr) build as found at Vagrant Cloud at https://vagrantcloud.com/ubuntu/trusty64.

You should have recent versions of the following installed:

and the following vagrant plugins:

$ vagrant plugin install vagrant-cachier vagrant-vbguest

If you have an existing directory with code you wish to use inside the VM, you can set the variable LAB_DIR to the path of the directory, e.g.:

$ export LAB_DIR=/home/user/some_project/

Run:

$ vagrant up

NOTE: Especially if it is the first time you build the machine, it'll take a while. (Perhaps in between 5 to 10 minutes plus the time to download the ubuntu image.)

Connect:

$ vagrant ssh

The box is provisioned to have a pre-built python virtual environment, named env under /home/vagrant.

Active it

vagrant@(...)~$ source ~/env/bin/activate

The provisioning phase should also install the python packages listed under ~/requirements.txt.

Before running the notebook, check the ip address (<box_ip>) of the virtual machine. You can run ifconfig to do so.

In the virtual environment run:

(env)vagrant@(...)~$ ipython notebook --ip=0.0.0.0 --no-browser

You should then be able to access the notebook from the host machine at http://<box_ip>:8888

Using an automatic vagrant bash completion, may be helpful to speed up your work when using vagrant.

The first time you run vagrant up the box will be provisioned, but afterwards it will not as this takes more time, and may not be needed. You can instruct vagrant to provision the box like so:

$ vagrant up --provision

If the box is already running then you can use the reload command like so:

$ vagrant reload --provision

You can execute the salt states manually within the virtual machine, using the salt-call command:

vagrant@(...)~$ salt-call --local state.highstate -l debug

This will "re-provision" the machine, and is usually faster than getting out of the virtual machine, and invoking vagrant reload --provision.

It is useful to use this approach when troubleshooting the provisioning phase, and trying different configurations to fix the issue. That is, you can modify one or more salt states, and run salt-call to see the effect.

About

Virtual machine provisioned with a few geometry related packages, for experimental purposes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published