-
Notifications
You must be signed in to change notification settings - Fork 1
Provisioning an Opal2 Web Service with Singularity
We are going to launch a small (two core) VM, with /scratch
space on two attached volumes. The cpu will handle the jobs, and the volumes will hold the results data temporarily. Our VM serves as a 'master' for coordinating jobs sent from OpenTopography jobs running on Open Science Grid. It can also handle user submitted jobs which target the same Makeflow job name and matching password.
Singularity manages our container dependencies.
To coordinate jobs to OpenTopography we use the Opal-Toolkit upon which OpenTopography is built.
On CyVerse Atmosphere, Centos 7.4 or Centos 7.4
On XSEDE Jetstream, Centos 7.6 or Centos 7.6
Select an instance size of "tiny" 1-core or "small" 2-core instance.
Create two large volumes (1-2 TB each) and mount the volumes to the running instance. These will likely show up as /vol_b
, /vol_c
, or /vol_d
.
Use these instructions for mounting a volume in Centos
Note: if you are running an OpenStack instance, make sure to add the appropriate ports for Tomcat (80,8080) and Makeflow (20000-24000) to the Security group.
Always run an update to get the latest security and fixes
sudo yum -y update
We need to add some additional packages
sudo yum install curl-devel expat-devel gcc gettext-devel htop nano openssl-devel perl-ExtUtils-MakeMaker wget zlib-devel
We use Salt to provision the VM.
sudo yum install https://repo.saltstack.com/py3/redhat/salt-py3-repo-latest.el7.noarch.rpm
sudo yum install salt-master
sudo yum remove git
cd /usr/src
sudo wget https://www.kernel.org/pub/software/scm/git/git-2.9.4.tar.gz
sudo tar xzf git-2.9.4.tar.gz
rm -rf git-2.9.4.tar.gz
cd git-2.9.4
sudo make prefix=/usr/local/git all
sudo make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
Check git
version
git --version
Clone this GitHub repository to the /srv
directory
cd /srv
git clone https://github.com/cyverse-gis/eemt.git
Create the eemt
user, give it a password, and sudo privileges.
Instructions for Centos user creation here
Create a file under the eemt
account with the password:
~/.eemt-makeflow-password
Mats has created a Salt provisioning script in this repository that will install Opal2, Singularity, and Tomcat.
cd /srv/eemt/opal2-vm
sudo ./bootstrap.sh
If you have additional problems, try reinstalling everything:
./srv/eemt/opal2-vm/salt/opal2/redeploy-opal2
Make sure to update the opal.properties
file. There are several on the VM (in the repo, and in the deployed opal2 folder) to find them:
find /srv -name opal.properties
Then edit each HOSTNAME
with the appropriate public IP address of the VM
If you have to reboot the VM, you might need to restart Apache (do so as the eemt
user)
/srv/tomcat/bin/catalina.sh start
Featured images on Atmosphere and Jetstream now have an ez
installation feature. See CyVerse Learning Center for details. To install Singularity type:
ezs
Alternately, you can install Singularity yourself.
Create a directory for downloading a pre-built Singularity image:
cd /opt
sudo mkdir singularity_imgs
cd singularity_imgs
Download the latest Singularity image:
singularity pull shub://cyverse-gis/eemt:master
cd /srv/eemt/singularity
sudo singularity build osgeo-singularity.simg /srv/software/eemt/singularity/Singularity
Test your Singularity installation
singularity exec --home $PWD:/srv --pwd /srv --contain --ipc --pid /srv/software/eemt/singularity/Singularity.simg echo "Hello World"
If you get an error for iptables
try check to see if it is installed, and if not -- install it
sudo yum install iptables-services
sudo systemctl start iptables