Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Setting up the Virtual Machines

This explains how to set-up a virtual machine (VM) in VirtualBox, to act as either a 'data computer' (server) or 'analysis computer' (client) for DataSHIELD.

Tip

Note: you don't have to do the setup manually.

The OBiBa github page provides scripts to automate this:

  • The instructions below give extra information for creating the VMs yourself. If you're using vagrant to create the VMs, you can ignore the rest of this page.

1. Create an Ubuntu Server 14.04 32bit Virtual Machine

  • Give the VM:
    • 20G hard drive
    • 1024G+ RAM
    • In addition to the default NAT adapter, also create a host-only adapter (so the VM has two network interfaces)
  • During installation, ensure you check the box to install OpenSSH. Otherwise, the defaults are all fine.

2. Set up the networking

Give the VM a static ip

  • The NAT adapter can be left as dhcp, however the VM needs a static ip address on the host-only adapter.

Start the VM. Edit /etc/network/interfaces:

Code Block
languagexml
$ sudo vi /etc/network/interfaces

For the primary interface it will list the lines:

Code Block
languagexml
auto eth0
iface eth0 inet dhcp

This is likely to be the NAT adapter - ensure that eth0 is the correct interface, by checking with the ifconfig or ip addr commands.

Note

Note: You have make sure you get the interfaces the right way round. In this example, eth0 is the NAT adapter; eth1 is the host-only adapter. This depends on the order you set up the adapters for the VM, or whether you cloned the VM from elsewhere and reinitialised the MAC address.

For the host-only interface (likely eth1), you are going to change 'dhcp' to 'static' and add the static configuration. Assuming the host-only adapter has the address 192.168.56.1 (default), then edit the interface (eth1) as follows:

Code Block
languagexml
auto eth1
iface eth1 inet static
    address 192.168.56.100
#   ^^^ IP Address for the VM
    netmask 255.255.255.0
    network 192.168.56.0
    broadcast 192.168.56.255

To test your changes, restart networking in the virtual machine:

Code Block
languagexml
$ sudo service networking restart

And view the interfaces:

Code Block
languagexml
$ ip addr

This should list the IP you assigned in /etc/network/interfaces.

SSH access

With the host only network set up you can ssh from the host machine into the VMs (or, of course, from one VM to another):

Code Block
languagexml
$ ssh user@192.168.56.100

If this fails, check the host is connected to the host-only interface.

3. Install Opal

You can download a script that will perform a basic install of opal and its dependencies.

opal-datashield-vm script

4. Add data to opal

Data can be added to opal using the web interface, accessible at:

Code Block
languagexml
192.168.56.100:8080 or :8443

from a browser on the host.

By default:

Code Block
languagexml
username: administrator
password: password

Instructions can be found in the opal documentationTo really test what you are doing and to do analysis in your local environment you probably need a DataSHIELD VM. This can be set up to look and behave just like a real DataSHIELD instance would that is hosted somewhere with real data. 

There are a few approaches to get to this goal:

  • Grab one of our pre-built VMs.
  • Build the whole thing from scratch with Vagrant.
  • Install the software on an existing VM with Puppet.
  • Install the software on an existing VM manually.
  • Use containers.


All of our continuous integration is based on the Vagrant install, so that is a good option.