How To Set Up a Domain Service Registry
These instructions explain how to setup a Domain Service Registry (
DSR) for a site. As a prerequisite, any SL6 host, either real of virtual is required with a valid host certificate. Note that Mongo needs 2GB of space in the file system.
Installing the DSR
Install the EMI relese package.
yum install yum-priorities yum-protectbase
rpm -Uvh http://emisoft.web.cern.ch/emisoft/dist/EMI/2/sl6/x86_64/base/emi-release-2.0.0-1.sl6.noarch.rpm
Install the EMI Registry package.
wget https://github.com/downloads/eu-emi/emiregistry/emi-emir-1.2.0-0.sl6.noarch.rpm
yum localinstall emi-emir-1.2.0-0.sl6.noarch.rpm
Install the trust anchors.
wget http://repository.egi.eu/sw/production/cas/1/current/repo-files/EGI-trustanchors.repo -O /etc/yum.repos.d/EGI-trustanchors.repo
yum install lcg-CA
Configure the DSR
Edit the file /etc/emi/emir/emir.config and set the address for the
DSR.
emir.address=https://dsr.example.com:9126
Set the registry parent attribute to be the following.
emir.parentAddress=https://zam052v04.zam.kfa-juelich.de:54321
Enable the anonymous port for querying.
emir.address.anonymousPort=9127
Configure the trust store
emir.security.truststore.type=directory
emir.security.truststore.directoryEncoding=PEM
emir.security.truststore.directoryLocations.main=/etc/grid-security/certificates/*.pem
Configure host certificate location
emir.security.credential.path=/etc/grid-security/hostcert.pem
emir.security.credential.format=PEM
emir.security.credential.keyPath=/etc/grid-security/hostkey.pem
Set the mongo DB name
emir.mongodb.dbName=emiregistrysecure
Edit the DN of the host certificate to the file /etc/emi/emir/emir.acl
CN=dsr.example.com,OU=computers,DC=example,DC=com :: serviceowner
Start the services
service mongod start
service emi-emir start
Test the DSR
Check that the
DSR is running
http://dsr.example.com:9127/ping
Install the service publisher
Install the emir service publisher.
rpm -Uvh https://github.com/downloads/eu-emi/emir-serp/emir-serp-1.2.1-0.el6.noarch.rpm
Install the service translator.
rpm -Uvh http://kojipkgs.fedoraproject.org//packages/ginfo/0.2.4/1.el6/noarch/ginfo-0.2.4-1.el6.noarch.rpm
Configure the service publisher
Edit the file /etc/emi/emir-serp/emir-serp.ini and set the url for yor
DSR.
url = https://dsr.example.com:9126
Set the credential file locations
cert = /etc/grid-security/hostcert.pem
key = /etc/grid-security/hostkey.pem
cadir = /etc/grid-security/certificates
Uncomment advancedServiceWithWatchDir section and the set the json_dir_location.
[serviceFromWatchDir]
json_dir_location = /var/cache/emir/services
Create the json directory.
mkdir -p /var/cache/emir/services
Create a hourly cron job to run the following command, where bdii.example.com is the host name of a site BDII.
ginfo --host bdii.example.com --emi > /var/cache/emir/services/example
Run the above command manually to avoid waiting for the cron job to run.
Start the service
service emir-serp start
Test the service publisher
Check the expected services are published
http://dsr.example.com:9127/services
Troubleshooting
General Tips
Check the following log files.
/var/log/emi/emir/emir.log
/var/log/emi/emir-serp/emir-serp.log
emird crashes on starting
Check that the example file is valid.