Preliminary steps

The following procedure describes the steps to perform on CentOS (CentOS7 is recommended) and Ubuntu Linux distros to set up the Ophidia pre-requisites.

System setup

Setup one the nodes; recommended distribution is CentOS.

CentOS7

Update the node basic software and install the required repository

sudo yum update yum
sudo yum update
sudo yum install epel-release

In case of installation from source code, install also:

sudo yum groupinstall 'development tools'
sudo yum install libtool-ltdl\*

Ubuntu 18

Update the node basic software

sudo apt-get autoclean
sudo apt-get update

In case of installation from source code, install also:

sudo apt-get install autoconf autotools-dev gcc make git libltdl-dev

Ophidia user setup

It is recommended to create a specific ophidia user for running the framework components.

sudo useradd -r ophidia -d /usr/local/ophidia

Create the Ophidia stack default installation and extra directories and assign the ownership to the ophidia user.

mkdir /usr/local/ophidia
mkdir /usr/local/ophidia/extra
sudo chown -R ophidia:ophidia /usr/local/ophidia

Web server setup

The following commands show the procedure to setup a basic Apache HTTP server. For more details about the setup and configuration, please refer to https://httpd.apache.org/docs/.

CentOS7

Install the packages:

sudo yum install httpd php mod_ssl

Enable startup at boot:

sudo systemctl enable httpd

Start the service:

sudo service httpd start

Ubuntu 18

Install the packages:

sudo apt-get install apache2-bin php libapache2-mod-php

Enable startup at boot:

sudo update-rc.d apache2 defaults

Start the service:

sudo service apache2 start

MySQL setup

MySQL 5.6 is recommended for the Ophidia platform, although version 5.7 should also work. For more information about MySQL installation and configuration please check the official documentation https://dev.mysql.com/doc/refman/5.6/en/installing.html

CentOS7

Install the required repository

sudo yum install http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm

Install MySQL

sudo yum install mysql-community-devel mysql-community-server

To allow the startup at boot, activate the following chkconfig levels:

sudo systemctl enable mysqld.service

Ubuntu 18

Install the latest repository from MySQL web site, for example:

wget http://repo.mysql.com/mysql-apt-config_0.8.11-1_all.deb
sudo apt-get install lsb-release
sudo dpkg -i mysql-apt-config_0.8.11-1_all.deb

Install MySQL

sudo apt-get install mysql-community-client mysql-community-server libmysqlclient-dev

To allow the startup at boot, activate the following:

sudo update-rc.d mysql defaults

Finalize setup

Start the mysqld daemon

sudo service mysql start

Initialize MySQL server (in case of errors, skip this step)

sudo mysql_install_db --user=mysql

Change the default mysql root password (use a robust one, ‘new_password’ is not recommended)

mysqladmin -u root password 'new_password'

Resource manager setup

The suggested resource manager is the Slurm Workload Manager with MUNGE for authentication. If you have already installed MUNGE you can jump to the Slurm section.

Install and configure MUNGE

The following provide an example setup for MUNGE authentication service. Please refer to https://dun.github.io/munge/ for a additional details.

To install MUNGE run the following.

On CentOS7

sudo yum install munge munge-devel munge-libs

On Ubuntu 18

sudo apt-get install munge libmunge-dev libmunge2

Then create the munge key:

sudo dd if=/dev/urandom bs=1 count=1024 > /etc/munge/munge.key
sudo chmod 400 /etc/munge/munge.key

Check if exist the following folders with these permissions (or create them otherwise)

  • /etc/munge/ The recommended permissions for it are rwx—— (700 in unix environment).
  • /var/lib/munge/ The recommended permissions for it are rwx–x–x (711 in unix environment).
  • /var/log/munge/ The recommended permissions for it are rwx—— (700 in unix environment).
  • /var/run/munge/ The recommended permissions for it are rwxr-xr-x (755 in unix environment).

For instance,

sudo mkdir -p /var/run/munge
sudo chmod 755 /var/run/munge
sudo mkdir -p /var/log/munge
sudo chmod 700 /var/log/munge
sudo mkdir -p /var/lib/munge
sudo chmod 711 /var/lib/munge
sudo mkdir -p /etc/munge
sudo chmod 700 /etc/munge

Assign the ownness of these folders to munge user and related group.

sudo chown -R munge:munge /etc/munge
sudo chown -R munge:munge /var/lib/munge
sudo chown -R munge:munge /var/log/munge
sudo chown -R munge:munge /var/run/munge

Add your hostname in /etc/hosts.

For instance, if your hostname is localhost.localdomain:

127.0.0.1 localhost localhost.localdomain
[..]

To allow the startup at boot, run:

on CentOS7

systemctl enable munge

and on Ubuntu 18

sudo update-rc.d munge defaults

Finally start munge and test it

service munge start
munge -n
munge -n | unmunge
remunge

Install and configure Slurm

Install Slurm from source codes, using the Linux user named ophidia, or from RPM/DEB packages if avaiable. Recommended slurm version is 17.

To install slurm from source codes, first download it from the official web site (http://slurm.schedmd.com/download.html), then follow the procedure reported at http://slurm.schedmd.com/quickstart_admin.html.

Note that you need to create Slurm configuration file (slurm.conf) under the ‘etc’ folder in the directory where it has been installed. Please refer to http://slurm.schedmd.com/quickstart_admin.html#Config for a detailed description of Slurm configuration.

Start the slurmctld and slurmd daemon using the Linux user named ophidia. For example, if you have installed it under /usr/local/ophidia/extra/ (in case of source codes)

/usr/local/ophidia/extra/sbin/slurmd
/usr/local/ophidia/extra/sbin/slurmctld

Finally, consider to add the slurm ‘bin’ folder in your PATH environment variable and dynamic library path to shared library cache:

export PATH="/usr/local/ophidia/extra/bin:$PATH"
ldconfig -n /usr/local/ophidia/extra/lib/

Optional dependencies

GSI support

To install Ophidia with GSI support, you need the following packages from RPM repository (note that this procedure has been fully tested only on CentOS6):

yum install globus-common-devel globus-gsi-credential-devel globus-gsi-proxy-core-devel globus-gssapi-gsi-devel voms-devel

To make proxy certificates, install the following package (for both server side and client side):

yum install voms-clients-cpp

To check CA certificate signatures, install the following package (for both server side and client side):

wget -O /etc/yum.repos.d/EGI-trustanchors.repo http://repository.egi.eu/sw/production/cas/1/current/repo-files/EGI-trustanchors.repo
yum install ca-policy-egi-core

WPS support

To install Ophidia with WPS support, you need Python 2.6 and PyWPS 3.2.4 - Python Web Processing Service (http://pywps.org/), which can be built from sources provided that the following packages (for example on CentOS) are installed:

yum install libxml2-devel libxslt-devel

It is recommended to start the service as module of Apache web server (https://www.apache.org/), so that TLS could be exploited to encrypt Ophidia credentials coded in WPS Requests. In this case, the following packages (for example on CentOS) are required

yum install python-lxml python-setuptools mod_ssl

and mod_python from http://modpython.org/. This module requires

yum install python-devel httpd-devel