Rimrock installation consists of setting up the following components:
- Packages / Dependencies
- Java
- System user account
- Database configuration
- Grid certificates configuration
- Rimrock application
- Logrotate
- Nginx
- New Relic
Install the required packages:
sudo apt-get update
sudo apt-get install -y wget
su -
export OS_VERSION = change me
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu $OS_VERSION main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu $OS_VERSION main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit
See Web upd8 webpage for details.
Create a 'rimrock' user for Rimrock:
sudo adduser --gecos 'Rimrock' rimrock
Install PostgreSQL database:
# Install the database packages
sudo apt-get install -y postgresql-9.3 postgresql-client libpq-dev
# Log in to PostgreSQL
sudo -u postgres psql -d template1
# Create a user for Rimrock
template1=# CREATE USER rimrock CREATEDB;
# Create the Rimrock production database & grant all privileges to user rimrock
template1=# CREATE DATABASE rimrock_production OWNER rimrock;
# Quit the database session
template1=# \q
# Try connecting to the new database with the new user
sudo -u rimrock -H psql -d rimrock_production
Rimrock communicates with infrastructure using secured connections. In order to verify a remote server it is necessary to have CA Certificate of CA responsible for server's certificate. This can be done by installing "EGI IGTF" CA package, which can be found here: https://wiki.egi.eu/wiki/EGI_IGTF_Release. Installation method depends on the operating system, in case of Ubuntu it is necessary to follow these steps: https://wiki.egi.eu/wiki/EGI_IGTF_Release#Using_the_distribution_on_a_Debian_or_Debian-derived_platform
On Ubuntu follow the steps below:
sudo su
wget -q -O - https://dist.eugridpma.info/distribution/igtf/current/GPG-KEY-EUGridPMA-RPM-3 | apt-key add -
echo "deb http://repository.egi.eu/sw/production/cas/1/current egi-igtf core" > /etc/apt/sources.list.d/egi.list
exit
sudo aptitude install ca-policy-egi-core
wget http://software.plgrid.pl/packages/general/ca_PLGRID-SimpleCA-1.0-4.noarch.rpm
sudo alien --to-deb ca_PLGRID-SimpleCA-1.0-4.noarch.rpm
sudo dpkg -i ca-plgrid-simpleca_1.0-5_all.deb
sudo aptitude install fetch-crl
Get Rimrock code and its configuration:
# We'll install Rimrock into the home directory of the user "rimrock"
cd /home/rimrock
# Create the Rimrock home directory
sudo -u rimrock -H mkdir rimrock
# Download Rimrock app packages into single jar
export RIMROCK_VERSION=change_me
wget http://dev.cyfronet.pl/mvnrepo/pl/cyfronet/rimrock/${RIMROCK_VERSION}/rimrock-${RIMROCK_VERSION}.jar -O /home/rimrock/rimrock/rimrock.jar
# Download Rimrock configuration template and customize it
# FIXME
Create upstart scripts:
sudo -u rimrock -H mkdir -p /home/rimrock/.config/upstart
sudo -u rimrock -H wget --no-check-certificate https://gitlab.dev.cyfronet.pl/plgrid-core-4-1/rimrock/raw/master/install/doc/support/upstart/rimrock.conf -O /home/rimrock/.config/upstart/rimrock.conf
As a result Rimrock can be started/stopped/restarted using following commands:
sudo -u rimrock -H initctl start rimrock
sudo -u rimrock -H initctl stop rimrock
sudo -u rimrock -H initctl restart rimrock
sudo wget wget --no-check-certificate https://gitlab.dev.cyfronet.pl/plgrid-core-4-1/rimrock/raw/master/install/doc/support/logrotate/rimrock -O /etc/logrotate.d/rimrock
# Install nginx
sudo apt-get install -y nginx-light
# Download Rimrock nginx configuration file
sudo wget --no-check-certificate https://gitlab.dev.cyfronet.pl/plgrid-core-4-1/rimrock/raw/master/install/doc/support/nginx/rimrock -O /etc/nginx/sites-available/rimrock
# customize nginx configuration file
sudo editor /etc/nginx/sites-available/rimrock
# ...enable it...
sudo ln -s /etc/nginx/sites-available/rimrock /etc/nginx/sites-enabled/rimrock
# ...and restart nginx
sudo service nginx restart
Go to New Relic and create configuration for new Java application. Download prepared zip file into `/home/rimrock/rimrock' and unzip it:
cd /home/rimrock/rimrock
sudo -u rimrock -H newrelic-java-3.11.0.zip
sudo -u rimrock -H rm newrelic-java-3.11.0.zip
Next customize application New Relic configuration:
sudo -u rimrock -H edit /home/rimrock/rimrock/newrelic/newrelic.yml
The most important think to customize is the location of the new relic agent logs. Please change it into:
log_file_path: /home/rimrock/rimrock/log
Last think is to modify upstart script and enable New Relict by commenting/uncommenting lines according to the instruction available inside upstart configuration file:
sudo -u rimrock -H edit /home/rimrock/.init/rimrock.conf