Skip to content
Snippets Groups Projects
Commit 2771950f authored by Ruud Overeem's avatar Ruud Overeem
Browse files

BugID: 827

Moved deployment stuff from LOFAR_DATA/* and LCS/Common to MAC/Deployment.
parent 8ca77c33
No related branches found
No related tags found
No related merge requests found
Showing
with 643 additions and 0 deletions
# -- MACScheduler--
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node MACScheduler 1.0.0 development 'node constraint' "Controller that starts the observations"
# name dir. type unit prun. vm value constr. descr.
#----------------------------------------------------------------------------------------------------------------------------------
par OTDBdatabasename I text - 10 0 otdbtest - "The database to work on"
par OTDBusername I text - 10 0 paulus - "The database user"
par OTDBpassword I text - 10 0 boskabouter - "The password"
par OTDBpollInterval I time - 10 0 5s - "Time between two polls in the database"
par QueuePeriod I time - 10 0 15m - "The period length between startup of the observation software and the start of the observation"
par ClaimPeriod I time - 10 0 2m - "The period length between 'going standby moment' of the observation software and the start of the observation"
# -- OLAP_HW--
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node OLAP_HW 1.0.0 development 'node constraint' "OLAP Hardware"
# name dir. type unit prun. vm value constr. descr.
#--------------------------------------------------------------------------------------------------------
par _hostname I text - 10 0 'INP002' - 'host on which OLAP will be started, value is determined by the scheduler'
par AMCServerHost I text - 10 0 '192.168.100.254' - 'ip-address of AMC server'
par AMCServerPort I int - 10 0 '8400' - 'port on which the AMC server is listening'
par DelayCompensationHost I text - 10 0 '192.168.100.254' - 'ip-address of AMC server'
par DelayCompensationPorts I text - 10 0 '[8300, 8301, 8302, 8303, 8304, 8305, 8306, 8307, 8308, 8309, 8310, 8311]' - 'ports on which DelayCompensation is listening'
par InputClusterFEN I text - 10 0 '129.125.99.51' - 'ip-address of input cluster front end'
par InputBGLHosts I text - 10 0 '[10.20.98.08, 10.20.98.09, 10.20.98.10, 10.20.98.11, 10.20.98.12, 10.20.98.13, 10.20.98.14, 10.20.98.15, 10.20.98.16, 10.20.98.17, 10.20.98.18, 10.20.98.19]' - 'hosts on which InputSection is listening'
par InputBGLPorts I text - 10 0 '[8000, 8001, 8002, 8003, 8004, 8005, 8006, 8007, 8008, 8009, 8010, 8011]' - 'ports on which InputSection is listening'
par StellaFEN I text - 10 0 'bglfen1.service.rug.nl' - 'ip-address of Stella front end'
par BGLStorageHosts I text - 10 0 '[192.168.100.01, 192.168.100.02, 192.168.100.03, 192.168.100.04, 192.168.100.05, 192.168.100.06, 192.168.100.07, 192.168.100.08, 192.168.100.09, 192.168.100.10, 192.168.100.11, 192.168.100.12]' - 'Hosts on which Storage is listening'
par BGLStoragePorts I text - 10 0 '[8100, 8101, 8102, 8103, 8104, 8105, 8106, 8107, 8108, 8109, 8110, 8111]' - 'ports on which Storage is listening'
par StorageClusterFEN I text - 10 0 'hpclf1.service.rug.nl' - 'ip-address of storage cluster front end'
par partition I text - 10 0 'R000_64' - 'partition to use on Stella'
# -- OLAP--
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node OLAP 1.0.0 development 'node constraint' "OLAP"
# name dir. type unit prun. vm value constr. descr.
#--------------------------------------------------------------------------------------------------------
par samplesToIntegrate I int - 10 0 196608 - 'number of samples to integrate, is almost equal to sample frequency'
par secondsToBuffer I flt - 10 0 30 - 'number of seconds that should be buffered in the input cluster'
par useAMCServer I bool - 10 0 f - 'use an AMC server or the AMC implementation that is linked to the executable'
par nodesPerCell I int - 10 0 16 - 'number of BG/L compute cores per compute cell (or pset)'
par subbandsPerCell I int - 10 0 4 - 'number of subbands that is processed per compute cell (or pset)'
par ppfTaps I int - 10 0 16 - 'number of taps for the digital filter in the PPF'
#
#generic parameters needed by OLAP
#
par nrSubbands I int - 10 0 >>Observation.subbandList[] - 'number of subbands in this observation'
par nrChannelsPerSubband I int - 10 0 >>Observation.channelsPerSubband - 'number of channels per subband'
par nrStations I int - 10 0 >>VirtualInstrument.stationList[] - 'number of stations in this observation'
par nrInputNodes I int - 10 0 >>VirtualInstrument.inputNodeList[] - 'number of input nodes in this observation'
par nrRSPBoards I int - 10 0 8 - 'Total Nr of RSPboards'
par nrSamplesPerSecond I int - 10 0 >>Observation.clockMode.samplesPerSecond - 'Samples per second'
par MSName I text - 10 0 >>Observation.MSName - 'Name for the Measurement set for this Observation'
par nrSamplesPerEthFrame I int - 10 0 125 - 'number of samples the RSP board will put in one ethernet frame'
par nyguistZone I int - 10 0 >>Observation.nyguistZone - 'number of the nyguist zone'
par startTime I dbl - 10 0 >>Observation.startTime - 'start time of the observation in GMT'
par stopTime I dbl - 10 0 >>Observation.stopTime - 'stop time of the observation in GMT'
par stationList I text - 10 0 >>VirtualInstrument.stationList - 'Stations taking part in this observation'
par stsPosition I text - 10 0 >>VirtualInstrument.stationList[].stsPosition - 'Station position in longitude, latitude and heigth'
par RSPMACAddresses I text - 10 0 >>VirtualInstrument.stationList[].RSPMacAddresses - 'MAC addresses of the RSPBoards'
par InputNodeMACAddresses I text - 10 0 >>VirtualInstrument.inputNodeList[].MACAddress - 'List of all MACaddresses from inputNodes'
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
uses OLAP_HW 1.0.0 development 1 "Partitions and IP stuff"
# -- ObsCtrl --
#
# Parameter specification of the ObservationController.
#
# $Id$
#
# -- ObsCtrl--
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node ObsCtrl 1.0.0 development 'node constraint' "Observation Controller"
# name dir. type unit prun. vm value constr. descr.
#--------------------------------------------------------------------------------------------------------
par heartbeatInterval I dbl - 10 0 10 - "Interval (in sec) between to 'sanity checks'"
# -- ObsSW--
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node ObsSW 1.0.0 development 'node constraint' "Observation Software"
uses Observation 2.0.0 development 1 "Observations under this SW control"
# -- Observation --
#
# Component description of an observation
#
# $Id$
#
# -- Observation--
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node Observation 2.0.0 development 'node constraint' "Observation"
# name dir. type unit prun. vm value constr. descr.
#--------------------------------------------------------------------------------------------------------
par startTime I text - 10 0 0 - 'start time of the observation in GMT (yyyy-mm-dd hh:mm:ss)'
par stopTime I text - 10 0 0 - 'stop time of the observation in GMT (yyyy-mm-dd hh:mm:ss)'
par claimPeriod I int - 10 0 0 - 'periodlength in seconds the CLAIM phases will take'
par preparePeriod I int - 10 0 0 - 'periodlength in seconds the PREPARE phases will take'
par nyquistZone I int - 10 0 0 - 'number of the nyquist zone'
par subbandList I text - 10 0 [0] - 'list of all used subbands in this observation'
par MSName I text - 10 0 '/data2/ObservationA.MS' - 'Name for the Measurement set for this Observation'
par channelsPerSubband I int - 10 0 256 - 'number of channels per subband'
par clockMode I node - 10 0 <<Clock160 - 'Mode in which clock is running'
par sampleClock I dbl MHz 10 0 >>Observation.clockMode.systemClock - 'sampleClock'
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
uses OLAP 1.0.0 development '1' "Online Applications"
uses BBS 1.0.0 development '1' "Blackboard System"
uses VirtualInstrument 1.0.0 development '1' "Virtual Instrument"
uses ObsCtrl 1.0.0 development '1' "Observation Control"
# -- PIC--
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node PIC 1.0.0 development 'node constraint' "Physical Instrument Component"
uses @ring@ 1.0.0 development 'node constraint' "One of the four ring-areas"
# -- PermSW--
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node PermSW 1.0.0 development 'node constraint' "Permanent Software"
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
uses MACScheduler 1.0.0 development 1 "Mac Scheduler"
!!! IMPORTANT !!!
The files in this directory depend on files in other directories!
Read the instructions below!
This directory contains the component files that need to be loaded in the OTDB.
Several components like the stations and the compute-nodes can be generated using
the '.base' files in the ../PVSS directory(!) with the command 'create_OTDB_files'.
All the '.comp' files and the generated '.gcomp' file can now be loaded manually
into a database using the OTB. To load all components into a database the
load_all_comps.cc needs to be compiled first because we need the C++ layer of the
OTDB. To compile this program be sure you a installed OTDB package in
../../LOFAR/installed/gnu_debug. To compile the program type './compile'.
When 'create_OTDB_files' and 'compile' both succeeded you are ready to load all
components in this directory into a database, type 'load_components <databasename>'
e.g.: load_components CDR
# -- Ring--
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node Core 1.0.0 development 'node constraint' "Central Core"
uses @CoreStation@ 1.0.0 development 1..25 "Station in this ring"
node InRing 1.0.0 development 'node constraint' "InnerRing"
uses @InRingStation@ 1.0.0 development 1..25 "Station in this ring"
node OutRing 1.0.0 development 'node constraint' "OuterRing"
uses @OutRingStation@ 1.0.0 development 1..25 "Station in this ring"
node ExtRing 1.0.0 development 'node constraint' "External Ring"
uses @ExtRingStation@ 1.0.0 development 1..25 "Station in this ring"
# -- BaseStation--
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node @Station@ 1.0.0 development 'node constraint' "Station @Station@"
# name dir. type unit prun. vm value constr. descr.
#----------------------------------------------------------------------------------------------------------------------------------
par IPaddress I text - 10 0 @IPaddress@ - 'The IPaddress of the LCU of the station'
par nrRSPboards I int - 10 0 0 - 'Number of RSPboards in this station'
par nrLBAntennas I int - 10 0 0 - 'Number of LowBand antennas in this station'
par nrHBAntennas I int - 10 0 0 - 'Number of HighBand antennas in this station'
par stsPosition I text - 10 0 [0,0,0] - 'Station position in longitude, latitude and heigth'
par RSPMacAddresses I text - 10 0 '[00:30:00:00:00:00, 00:30:00:00:00:00]' - 'MAC addresses of the RSPBoards'
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
uses ControlSW 1.0.0 development 1 "Control Software for this Station"
# -- Storage --
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node Storage 1.0.0 development 'node constraint' "Storage Node Settings"
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
uses @StorageNode@ 1.0.0 development 1 "Storage Node @StorageNode@"
# -- Storage node --
#
# $Id$
#
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node @StorageNode@ 1.0.0 development 'node constraint' "Storage Node Settings"
# name dir. type unit prun. vm value constr. descr.
#--------------------------------------------------------------------------------------------------------
par IPAddress I text - 10 0 @IPaddress@ - 'Ip number for this node'
par RAM I int RAM 10 0 1024 - 'RAM space on this node'
par Storage I int DISK 10 0 2048 - 'Storage space on this node'
STOR000
STOR001
STOR002
STOR003
STOR004
STOR005
STOR006
STOR007
STOR008
STOR009
STOR010
STOR011
STOR012
# -- Virtual Instrument--
#
# Component description of a Virtual Instrument
#
# $Id$
#
# -- Observation--
# name vers qual constr. descr.
#--------------------------------------------------------------------------------------------------------
node VirtualInstrument 1.0.0 development 'node constraint' "VirtualInstrument"
# name dir. type unit prun. vm value constr. descr.
#-------------------------------------------------------------------------------------------------------
par stationList I text - 10 0 [CS001,CS002,CS003] - 'list of all used stations'
par inputNodeList I text - 10 0 [INP002,INP003,INP004,INP005] - 'list of all used InputNodes'
par BGLNodeList I text - 10 0 [BGL001,BGL002,BGL003] - 'list of all used BGLNodes'
par storageNodeList I text - 10 0 [STOR005,STOR006] - 'list of all used StorageNodes'
par imageNodeList I text - 10 0 [IMG005,IMG002,IMG003] - 'list of all used ImageNodes'
par storageCapacity I int DISK 10 0 760 - 'total available StorageCapacity'
#!/usr/bin/ksh
#
# create_OTDB_comps : Expand all base-file to gcomp files.
#
# Copyright (C) 2006
# ASTRON (Netherlands Foundation for Research in Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Syntax: create_OTDB_comps
#
# $Id$
#
VERSION="v1.0"
#
# SyntaxError msg
#
SyntaxError()
{
Msg=$1
[ -z "${Msg}" ] || echo "ERROR: ${Msg}"
echo ""
echo "Syntax: $(basename $0) [-d destdir] target(s)"
echo " destdir Relative directory where the resultfiles are placed"
echo " targets PVSS | C++ | OTDB"
echo ""
exit 1
}
#
# cleanlist filename
#
# Removes all (partial) comment lines from the file
cleanlist()
{
cut -d"#" -f1 $1 | awk '{ if (NF > 0) print $0 }'
}
#
# concatfile filename
#
# concatinates all lines of the file
concatfile()
{
cleanlist $1 | while read line
do
result=$result":"$line
echo $result
done | tail -1 | sed "s/^://"
}
#
# substitute_marker objectname marker
#
# replaces all lines containing the marker with the contents of the markerfile
#
substitute_marker()
{
echo "#"
VALUELIST=`concatfile $1.list`
awk -v VALUELIST=${VALUELIST} -v MARKER=$2 '
BEGIN {
nrMarkers=split(VALUELIST, valueName, ":");
};
{
hasMarker=index($0, MARKER);
if (hasMarker > 0) {
for (someValue in valueName) {
inputCopy = $0;
sub(MARKER, valueName[someValue], inputCopy);
sub(MARKER, valueName[someValue], inputCopy);
sub(MARKER, valueName[someValue], inputCopy);
print inputCopy;
}
}
else {
print $0;
}
} '
}
#
# expand_marker objectname marker ip-prefix
#
expand_marker()
{
# expand the nodes
echo -n "# This file was generated by $(basename $0) ${VERSION} on " ; date
cleanlist $1.list | while read nodename
do
number=`echo ${nodename} | sed -e "s/[A-Z]//g"`
ipaddr=`echo $3 | sed -e "s/@/${number}/"`
(
echo ""
echo "#"
cleanlist $1.base
) | sed -e "s/$2/${nodename}/g" -e "s/@IPaddress@/${ipaddr}/g"
done
substitute_marker $1 $2
}
#
# substitute_station objectname marker ip-prefix
#
substitute_station()
{
# expand the nodes
cleanlist $1.list | while read nodename
do
number=`echo ${nodename} | sed -e "s/[A-Z]//g"`
arm=`echo ${number} | awk '{ print substr($1,1,1) }'`
ring=`echo ${number} | awk '{ print substr($1,3,1) }'`
ipaddr=`echo $3 | sed -e "s/@@@/${number}/" | sed -e "s/@@/${arm}${ring}/"`
(
echo ""
echo "#"
cleanlist StationNode.base
) | sed -e "s/@Station@/${nodename}/g" -e "s/@IPaddress@/${ipaddr}/g"
done
substitute_marker $1 $2
}
#------------------------------ MAIN program ------------------------------
#
# Syntax: create_db_files [-d destdir]
#
# where target is pvss / c++ / otdb
#
DESTDIR="."
eval set argv=`getopt "d:h" $*` # reformat arguments
shift
while [ "$1" != "--" ]
do
case "$1" in
-d) DESTDIR=$2
[ -d ${DESTDIR} ] ||
SyntaxError "Destination directory >${DESTDIR}< does not exist"
shift 2
;;
-h) SyntaxError
;;
esac
done
shift # remove --
for file in `ls -1 *.base | grep -v Node`
do
rawname=`echo $file | cut -d'.' -f1`
outputname=`echo ${DESTDIR}/$(basename $rawname)".gcomp"`
echo "Creating ${outputname}..."
grep @BGLNode@ $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
cleanlist $file | \
expand_marker "BGLNode" "@BGLNode@" "10.20.100.@" >${outputname}
fi
grep @InputNode@ $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
cleanlist $file | \
expand_marker "InputNode" "@InputNode@" "10.130.150.@" >${outputname}
fi
grep @StorageNode@ $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
cleanlist $file | \
expand_marker "StorageNode" "@StorageNode@" "10.130.170.@" >${outputname}
fi
grep @ImagingNode@ $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
cleanlist $file | \
expand_marker "ImagingNode" "@ImagingNode@" "10.130.180.@" >${outputname}
fi
grep @CoreStation@ $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
(
echo -n "# This file was generated by $(basename $0) ${VERSION} on " ; date
cleanlist $file | \
substitute_station "../PVSS/CoreStations" "@CoreStation@" "10.140.@@@.10" |\
substitute_station "../PVSS/InRingStations" "@InRingStation@" "10.140.1@@.10" |\
substitute_station "../PVSS/OutRingStations" "@OutRingStation@" "10.140.1@@.10" |\
substitute_station "../PVSS/ExtRingStations" "@ExtRingStation@" "10.140.@@@.10"
) >${outputname}
fi
grep @ring@ $file >/dev/null 2>&1
if [ $? -eq 0 ]; then
cat $file | \
substitute_marker "../PVSS/Rings" "@ring@" >${outputname}
fi
done
#!/usr/bin/ksh
#
# load_components : loads all components in an OTDB database
#
# Copyright (C) 2006
# ASTRON (Netherlands Foundation for Research in Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Syntax: load_components databasename
#
# $Id$
#
VERSION="v1.0"
# SyntaxError msg
#
SyntaxError()
{
Msg=$1
[ -z "${Msg}" ] || echo "ERROR: ${Msg}"
echo ""
echo "Syntax: $(basename $0) databasename"
echo ""
exit 1
}
#
# Add all nodes that are not 'used' to the resultfile (COMPORDERFILE)
# and update the 'node' and 'uses' file by deleting the nodes or childs
# from these files.
solve_layer()
{
echo -n "."
comm -23 ${NODEFILE} ${USESFILE} >>${COMPORDERFILE}
comm -23 ${NODEFILE} ${USESFILE} | while read component
do
grep -v ^${component} ${NODEFILE} >tmp
mv tmp ${NODEFILE}
grep ^${component} ${RELFILE} | while read parent child
do
grep -v ^${child} ${USESFILE} >tmp
mv tmp ${USESFILE}
done
done
}
#
# MAIN
#
# check invocation syntax
if [ $# -ne 1 ]; then
SyntaxError
fi
# We use a lot of tmpfile to make life easier.
NODEFILE=/tmp/node
USESFILE=/tmp/uses
RELFILE=/tmp/relation
COMPORDERFILE=/tmp/comporder
COMPDEFFILE=/tmp/compdef
FILERELFILE=/tmp/filerel
RESULTFILE=fileOrder
# construct a file with 'node uses file' relations
grep -e '^node' -e '^uses' *comp | cut -d":" -f2 | awk '
BEGIN {
node="";
};
{
if ($1 == "node") {
node = $2;
}
else {
print node" "$2;
}
} ' | sort | uniq >${RELFILE}
# make file with all node-names and all uses-names.
grep -e '^node' *comp | awk '{ print $2 }' | sort | uniq >${NODEFILE}
grep -e '^uses' *comp | awk '{ print $2 }' | sort | uniq >${USESFILE}
# strip off layer for layer
>${COMPORDERFILE}
echo -n "Analysing load order: "
while [ -s ${USESFILE} ]
do
solve_layer
done
cat ${NODEFILE} >>${COMPORDERFILE}
rm ${RELFILE} ${NODEFILE} ${USESFILE}
echo "."
# we now have a file with components (in reverse) order
# add the filenames in which the components are defined, remove duplicates
# and finally make sure each name only exists once in the resultfile
grep -e '^node' *comp | sed "s/:/ /" | awk '{ print $3" "$1 }' | sort | uniq >${FILERELFILE}
tac ${COMPORDERFILE} | while read component
do
grep ^${component} ${FILERELFILE}
done | \
awk '{ print $2 }' | uniq | \
awk '{
if (!($1 in names)) {
print $1;
names[$1]=$1;
}
}' >${RESULTFILE}
rm ${COMPORDERFILE} ${FILERELFILE}
../../build/gnu_debug/data/bin/load_OTDB_comps $1 ${RESULTFILE}
rm ${RESULTFILE}
# Property file to be use with the demo program testLogger.
# Configure the rootLogger
log4cplus.rootLogger=INFO, STDOUT
# Define the STDOUT appender
log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout
log4cplus.appender.STDOUT.layout.ConversionPattern=%-5p [%x]%c{3} - %m%n
log4cplus.appender.STDOUT.ImmediateFlush=true
# Define TRC at level INFO
log4cplus.logger.TRC=INFO
arm1
arm2
arm3
arm4
arm5
# BeamCntrl
connected bool
CS001
CS002
CS003
CS004
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment