You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Background

It is a requirement of SLAC's security policy to keep as little number of ports open as possible on its perfSONAR machines. Therefore a group of XML based services can be instructed to listen on one port only instead of using a separate port for each. Services and ports in original configuration:

  • snmp-MA uses port 8065
  • PingER uses port 8075
  • perfSONARBUOY (pSB) uses 8085
  • LookupService (hLS) uses 8095

Services and ports in modified configuration:

  • snmp-MA, PingER, pSB and hLS should all listen on lets say 8075

The steps to do so are described below:

Step 1. Create an init script

Browse to /etc/init.d/ and copy an existing script (say snmpMA.sh) to ps-universal.sh. That init script would be responsible for starting up a single instance of the daemon that handle all the services. Open the script and modify the TOOL_EXE to be something like:

/etc/init.d/ps-universal.sh
TOOL_EXE="perl \-I /usr/local/perfSONAR-PS/perfSONAR_PS-PingER/lib \-I /usr/local/perfSONAR-PS/perfSONAR_PS-perfSONARBUOY/lib \-I /usr/local/perfSONAR-PS/perfSONAR_PS-SNMPMA/lib \-I /usr/local/perfSONAR-PS/perfSONAR_PS-LookupService/lib /usr/local/perfSONAR-PS/Shared/scripts/perfsonar-daemon.pl"

Also change TOOL_CONF and TOOL_LOGGER to tell the init script to point to the "combined.conf" and "combined_logger.conf" files.

/etc/init.d/ps-universal.sh
TOOL_CONF=${CONF_PREFIX}/combined.conf
TOOL_LOGGER=${CONF_PREFIX}/combined_logger.conf

And change TOOL for message display purposes:

/etc/init.d/ps-universal.sh
TOOL="Services"

Step 2. Creating conf files

Browse now to /usr/local/etc/perfSONAR/ and do a concatenate to merge all conf files into one so that the script can read configurations for all four services from a single file:

/usr/local/etc/perfSONAR/combined.conf
cat /usr/local/etc/perfSONAR/*conf > /usr/local/etc/perfSONAR/combined.conf

Then go through and remove duplicate entries at the top-level, e.g. you'll have "disable_echo 0" in there repeatedly. Note: this does not apply to anything inside an <endpoint> block. Also, remove the extraneous <port> entries so that all the endpoint elements are under a single port entry. Since this can be confusing, I am attaching a working sample.

  • No labels