To run the virtual servers you will need to install VirtualBox.
On Ubuntu:
$ sudo apt-get install virtualbox |
Two virtual servers are available for you to test DataSHIELD with. The virtual servers require 4GB RAM each and about 5GB hard-disk space each.
You can download the VMs from google drive:
You will need to import the VMs into Virtualbox. Open Virtualbox:
File > Import Appliance
File
and select
Preferences...
, this opens up a VirtualBox settings window.
Edit host-only network (Space)
when you hover on it.
Adapter
tab the following should be set:
DHCP Server
tab make sure that
Enable server
is unchecked. Select
OK
to save the settings.Before starting the Opal servers it is very useful to take a snapshot. This enables you to roll-back the Opal servers to a pristine state, without needing to delete them and repeat the process above to re-import them.
To take a snapshot, first open VirtualBox and click on a server. Now click the button in the top right that says
Snapshots
, the camera icon (for VirtualBox 6, click on a server, click the three horizontal lines to open a menu and select 'Snapshots', then click the 'Take' button).
Remember you must repeat this for each Opal server
Snapshots can be named however you like. Also you can take as many as you like, to save different states of the Opal server. For example, you could take Snapshot 1 straight after importing the Opal server, and then later Snapshot 2 after uploading some of your own simulated data. |
If a network warning occurs, or you are having trouble connecting to the VM (e.g. can't ping it or open the opal webpage) it might be necessary to reset the network adaptor. You can do this by powering down the VM, then deleting the host-only adaptor in the main virtualbox setting, then adding a new host-only adaptor that matches the original settings. |
By default, machines on the host-only network can be found at 192.168.56.xxx:
Your computer (the host) will be at 192.168.56.1
The virtual servers have been configured as follows:
Should you wish to create more servers, you can clone any one of these. You will however need to:
|
You can use the opal web interface in you browser. Simply type the ip address of the VM, followed by the port number.
For example: to access the web interface for dstesting-100, go to:
Note: You will get a warning when connecting to 8443 because the SSL certificate is self-signed. |
Should you require logging into the Opal web interface e.g. to upload your own data click on the website and use the following username and password:
|
SSH access
Once the machines have been started you can login directly, or you have ssh access:
Username: user password: password or Username: root password: puppet |
For example:
$ ssh user@192.168.56.100 |
Note: you may want to alias the virtual servers in the host's ~/.ssh/config by adding the following:
$ cat >> ~/.ssh/config << 'EOF' Host server0 HostName 192.168.56.100 User user EOF |
Now you can ssh into the virtual server by:
$ ssh server0 |
See Shutting down the Opal Servers for instructions on how to shut down the servers depending on whether you have or have not made changes to the Opal test servers.
These are instructions for installing R on your own machine. That is, the machine you will be using for analysis, not the virtual servers. These instructions assume you are using Ubuntu on your local machine. |
Do the following as root:
$ sudo su |
Add the following to /etc/apt/sources.list, this gives a newer version of R than the one that is in Ubuntu's repositories:
deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/ |
Note: the CRAN R repository you add depends on the Ubuntu release you are running. For example: 'xenial' = '16.04', 'bionic' = '18.04' |
You may wish to select a different CRAN mirror, closer to your location.
You can find further details about installing R in Ubuntu on the CRAN website.
# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 |
(Plus one dependency, needed for installing R packages)
# apt-get update # apt-get install r-base r-base-dev libcurl4-openssl-dev |
The following libraries will need to be installed should Ubuntu users wish to do DataSHIELD development
|
Don't do this as root.
$ R install.packages('rjson') install.packages('RCurl') install.packages('mime') install.packages('opal', repos='http://cran.obiba.org', type='source') install.packages('opaladmin', repos='http://cran.obiba.org', type='source') |
install.packages('dsBaseClient', repos=c(getOption('repos'), 'http://cran.obiba.org'), dependencies=TRUE) |
Although be aware that this will place the DataSHIELD packages wherever your R libraries are saved. This may be unhelpful for development. |
See: Current release
If you have installed the DataSHIELD
client packages using the method above (that is, within R using install.packages
and specifying the Obiba repository), then you can update those client packages as follows:
# R update.packages(repos='http://cran.obiba.org') |
You are now fully set up. To start using the DataSHIELD test environment sit our Tutorial for DataSHIELD users. The tutorial teaches you the basics of DataSHIELD including how to:
|
Further instructions are available for the advanced uses of the DataSHIELD test environment:
|