The following procedure describes the steps to perform on CentOS6, CentOS7 and Ubuntu 14 Linux distros to set up the Ophidia pre-requisites.
Setup one ore more Linux nodes; recommended distribution is CentOS.
CentOS
Update the node basic software
sudo yum update yum
sudo yum update
Install the required repository
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
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
Install the packages:
on CentOS
sudo yum install httpd php mod_ssl
on Ubuntu
sudo apt-get install apache2-bin php5 libapache2-mod-php5
To allow the startup at boot, activate the following:
on CentOS6
chkconfig --level 2345 httpd on
on CentOS7
systemctl enable httpd
on Ubuntu 14
sudo update-rc.d apache2 defaults
Start the service:
on Centos
service httpd start
on Ubuntu
service apache2 start
Create the ophidia user
sudo useradd -r ophidia -d /usr/local/ophidia
Create the Ophidia stack default installation dir
mkdir /usr/local/ophidia
and the extra dir
mkdir /usr/local/ophidia/extra
Assign to ophidia the owner of these folders:
sudo chown -R ophidia:ophidia /usr/local/ophidia
MySQL 5.6 is required by the Ophidia framework.
CentOS6
Install the required repository
sudo yum install https://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm
In order to solve some compatibility issue with the latest MySQL version, install the MySQL v5.6 modifying the mysql yum repo parameters:
vim /etc/yum.repos.d/mysql-community.repo
Disable the latest version:
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
and enable the 5.6 version:
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Install MySQL
sudo yum install mysql-community-server mysql-community-devel
To allow the startup at boot, activate the following chkconfig levels:
sudo chkconfig --level 2345 mysqld on
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 14
Install MySQL
sudo apt-get install mysql-server-5.6 mysql-client-5.6 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 reccomanded)
mysqladmin -u root password 'new_password'
Install munge. If running on CentOS
sudo yum install munge munge-devel munge-libs
If running on Ubuntu
sudo apt-get 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 (and make them otherwise) the following folders with these permissions
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 CentOS6
chkconfig --level 2345 munge on
while on CentOS7
systemctl enable munge
and on Ubuntu 14
sudo update-rc.d munge defaults
Start munge and test it
service munge start
munge -n
munge -n | unmunge
remunge
Install the Slurm Workload Manager 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. If you have already installed the tool munge (see above), you can skip that. This procedure can be applied on both CentOS and Ubuntu.
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/
Note
If you plan to install the Ophidia Server on a different machine from where the Slurm controller is running, you should also enable password-less key-based SSH authentication.
For example, as ophidia user run in the home directory
ssh-keygen -t dsa -f /usr/local/ophidia/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
and test the key-based ssh connection on localhost
ssh target_host "srun --mpi=pmi2 -n 2 hostname"
(no password required)
Accept the key fingerprint authenticity of host target_host when connecting in order to avoid the system asking this again.
Some Ophidia primitives require libmatheval functionalities. To build libmatheval, first install dependencies:
on CentOS6
sudo yum install guile-devel guile flex-devel bison
on CentOS7
sudo yum install compat-guile18 compat-guile18-devel flex-devel guile-devel guile bison
on Ubuntu 14
sudo apt-get install guile-1.8-dev libfl-dev flex bison
Then download libmatheval-1.1.11 from http://ftp.gnu.org/gnu/libmatheval/ and install it in the path /usr/local/ophidia/extra running the following commands:
tar -xzf libmatheval-1.1.11.tar.gz
cd libmatheval-1.1.11
./configure --prefix=/usr/local/ophidia/extra
make
sudo make install
To fully take advantage of Ophidia Analytics Framework features, netCDF library with parallel I/O support is required. Package versions listed in this section are recommanded, but more recent version of surce codes should be adequate.
CentOS6
First download HDF5-1.8.16 from https://www.hdfgroup.org/downloads/ and install it in the path /usr/local/ophidia/extra with the following:
tar -xzf hdf5-1.8.16.tar.gz
cd hdf5-1.8.16
CC=/usr/lib64/mpich/bin/mpicc ./configure --prefix=/usr/local/ophidia/extra --enable-parallel
make
make install
cd ..
then download netcdf-4.4.0 from http://www.unidata.ucar.edu/downloads/netcdf/index.jsp and install it in the path /usr/local/ophidia/extra using the following configuration:
tar -xzf netcdf-4.4.0.tar.gz
cd netcdf-4.4.0
CC=/usr/lib64/mpich/bin/mpicc CPPFLAGS="-I/usr/local/ophidia/extra/include" LDFLAGS="-L/usr/local/ophidia/extra/lib" LIBS=-ldl ./configure --prefix=/usr/local/ophidia/extra --enable-parallel-tests
make
make install
CentOS7
You can install the parallel-enabled packages directly from yum:
sudo yum install hdf5-mpich hdf5-mpich-devel
sudo yum install netcdf-mpich netcdf-mpich-devel
Ubuntu 14
First download HDF5-1.8.16 from https://www.hdfgroup.org/downloads/ and install it in the path /usr/local/ophidia/extra
tar -xzf hdf5-1.8.16.tar.gz
cd hdf5-1.8.16
CC=/usr/bin/mpicc ./configure --prefix=/usr/local/ophidia/extra --enable-parallel
make
make install
cd ..
then download netcdf-4.4.0 from http://www.unidata.ucar.edu/downloads/netcdf/index.jsp and install it in the path /usr/local/ophidia/extra using the following configuration
tar -xzf netcdf-4.4.0.tar.gz
cd netcdf-4.4.0
CC=/usr/bin/mpicc CPPFLAGS="-I/usr/local/ophidia/extra/include" LDFLAGS="-L/usr/local/ophidia/extra/lib" LIBS=-ldl ./configure --prefix=/usr/local/ophidia/extra --enable-parallel-tests
make
make install
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
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 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 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