Skip to content

oicr-ibc/DS

Repository files navigation

Vagrant for R

This small repository contains a setup that creates a small set of virtual machines all running R code. To use it, you'll need Vagrant, and possibly Ansible.

Install "precise64" box:

$ vagrant box add precise64 http://files.vagrantup.com/precise64.box

Make sure to install ansible as well:

$ git clone https://github.com/ansible/ansible.git

Basic use:

$ git clone [email protected]:oicr-ibc/DS.git
$ cd DS

Create a file vagrant_local.yml containing something like this:

---
provider:
  virtualbox:
    storage_root: '/var/local/...'

Then start your virtual machines:

$ vagrant up

By default this ccreates three machines, worker-1, worker-2, and worker-3, and you can ssh to them as follows:

$ vagrant ssh worker-1

You can run a command on one machine:

$ vagrant ssh worker-1 -c "R --vanilla"

You can close down (halt) all the machines at once:

$ vagrant halt

Many of these commands also take a machine name, so vagrant halt worker-2 works on that specific machine. Use vagrant help for more.

You can delete all the machines at once:

$ vagrant destroy

All the machines are listed in .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory, with port numbers for ssh, so you can manually use ssh/scp/... using a bit of underhand workings (see below). The port number is automatically set as forwarded from localhost by Vagrant, so each port will ssh to a different machine.

scp -P 2222 -i ~/.vagrant.d/insecure_private_key myfile.tar vagrant@localhost:/my/target

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published