DTSC Cell Setup:
installation procedure
This section describe how to create a setup for the DTSC full system ,
how to install it on the DT PCs and how to update the services without
reinstalling the setup.
How to create the setup:
- checkout dtsc applications and setup code in your personal home directory on cmsusr..
- you can use this perl script, similar to the Trigger Supervisor one : bootstrap_dtsc.pl;
- execute the script in you home : perl bootstrap_dtsc.pl tagname (tagname is optional)
- these packages should be the minimal ones to be downloaded from cvs:
- TriDAS/trigger/dtsc/ts
- TriDAS/trigger/dtsc/setup
- TriDAS/trigger/dtsc/Makefile
- ssh to vmepcs2g16-11 with your private account
- execute bash script: TriDAS/trigger/dtsc/ts/toolbox/scripts/confRoot_vmepc.sh
- execute bash script: TriDAS/trigger/dtsc/ts/toolbox/scripts/environment_linco_TS15.sh
- cd TriDAS/trigger/dtsc/setup/dtscts
- execute: make rpm
- rpm is created in TriDAS/trigger/dtsc/setup/dtscts/rpm
- rpm is called trigger-dtscts-x.y.z-6.i386.rpm where x,y,z
stands for version number ; you can change it by editing
TriDAS/trigger/dtsc/setup/dtscts/Makefile, fields:
- PACKAGE_VER_MAJOR=x
- PACKAGE_VER_MINOR=y
- PACKAGE_VER_PATCH=x
How to install the setup:
- use your private account (because it has sudo privileges on DT PCs!)
- go to TriDAS/trigger/dtsc/setup/dtscts (where you have already created the rpm setup)
- VERY
IMPORTANT : Check that Function Manager of DAQ is not running and it
must be destroyed before rpm installation: if not the DAQ won't run
anymore and all PCs must be rebootted!
- use a script like that in order to install rpm on all PCs:
- #!/bin/bash
export RPM_HOME=/nfshome0/travagli/TriDAS/trigger/dtsc/setup/dtscts;
for M in "06" "07" "08" "09" "10"; do
ssh vmepcs2g16-"$M" "sudo
/sbin/service slp stop;sudo /sbin/service xdaqd stop;sudo /sbin/service
dtsctsd stop;sudo rpm -e trigger-dtscts;cd $RPM_HOME;sudo rpm -ivh
rpm/trigger-d
tscts-1.0.0-6.i386.rpm;sudo /sbin/service xdaqd start; sudo /sbin/service slp start"
done
- remember pointing RPM_HOME to your private rpm directory!
- remember changing trigger-dtscts-1.0.0-6.i386.rpm with trigger-dtscts-x.y.z-6.i386.rpm having the correct version number!!!
- Step by step description (what the script does!):
- loop on all 5 DT PCs
- stop slp and xdaqd services
- erase previous trigger-dtscts rpm version (if installed)
- install new version
- restart slp and xdaqd previously stopped
How to start/stop/restart DTSC trigger supervisor services:
- copy this script in your private account; home directory: you can name it (script_TS_DTSC.sh)
#!/bin/bash
SYSTEM=$TSSYSTEM # just a tag or name, may not be used in this script
ACTION=$TSACTION # status, start, stop or restart
if [ x$ACTION="x" ]; then
if [ $# -lt 1 ]; then
echo "ERROR: No action (status|stop|start|restart) set:"
echo "usage: $0 status|stop|start|restart [systemname]"
exit 0
fi
ACTION=$1
if [ x$SYSTEM = "x" -a $# -gt 1 ]; then
SYSTEM=$2
TSSYSTEM=$SYSTEM
fi
fi
if [ x$ACTION != "xstart" -a x$ACTION != "xstop" -a x$ACTION != "xstatus" -a x$ACTION != "xrestart" ]; then
echo "ERROR: invalid action=\"$ACTION\" (should be status|stop|start|restart)!"
echo "usage: $0 status|stop|start|restart [systemname]"
exit 0
fi
echo "*** $SYSTEM ($ACTION) ************************************"
echo "System $SYSTEM ($(date))"
echo "Action: "$0 $ACTION "(system="$TSSYSTEM")"
# PUT HERE YOUR COMMANDS: #####################################
# ...
for M in "06" "07" "08" "09" "10"; do
echo "vmepcs2g16-"$M" ("$TSSYSTEM"): "
ssh vmepcs2g16-"$M" 'sudo /sbin/service dtsctsd '$ACTION' '$SYSTEM' '
done;
###############################################################
exit 0
- in your cmsusr home directory execute the action you want:
- ssh username@cmsusr1 ". script_TS_DTSC.sh start"
- ssh username@cmsusr1 ". script_TS_DTSC.sh status"
- ssh username@cmsusr1 ". script_TS_DTSC.sh stop"
- ssh username@cmsusr1 ". script_TS_DTSC.sh restart"
How to uninstall the setup:
- use your private account (because it has sudo privileges on DT PCs!)
- Stop all dtscts services: ssh username@cmsusr1 ". script_TS_DTSC.sh stop"
- VERY
IMPORTANT : Check that Function Manager of DAQ is not running and it
must be destroyed before rpm uninstallation: if not the DAQ won't run
anymore and all PCs must be rebootted!
- use a script like that in order to uninstall rpm on all PCs:
#!/bin/bash
for M in "06" "07" "08" "09" "10"; do
ssh vmepcs2g16-"$M" "sudo
/sbin/service xdaqd stop;sudo /sbin/service slp stop;sudo /sbin/service
dtsctsd stop;sudo rpm -e trigger-dtscts;sudo /sbin/service slp start;
sudo /sbin
/service xdaqd start"
done
How to install DTSC trigger supervisor code:
- download TS framework (l1ts-20080408)
- checkout dtsc applications and setup code in your personal home directory on cmsusr..
- you can use this perl script, similar to the Trigger Supervisor one : bootstrap_dtsc.pl;
- execute the script in you home : perl bootstrap_dtsc.pl tagname (tagname is optional)
- these packages should be the minimal ones to be downloaded from cvs:
- TriDAS/trigger/dtsc/ts
- TriDAS/trigger/dtsc/setup
- TriDAS/trigger/dtsc/Makefile
- rename TriDAS directory to TriDAS_yyyymmdd
- make tar.gz of TriDAS_yyyymmdd and call it TriDAS_yyyymmdd.tar.gz
- ssh to vmepcs2g16-11 with your private account
- log as dtdev : sudo su -l dtdev
- copy the tar.gz previously created on dtdev home
- extract the tar.gz
- make the symbolic link TriDAS pointing to the TriDAS_yyyymmdd
- execute bash script: TriDAS/trigger/dtsc/ts/toolbox/scripts/confRoot_vmepc.sh
- execute bash script: TriDAS/trigger/dtsc/ts/toolbox/scripts/environment_linco_TS15.sh
- install TS framework , by executing (perl TriDAS/trigger/ts/toolbox/script install.pl)
- cd TriDAS/trigger/dtsc
- make clean
- make
- exit (back to your private account)
- exit back to cmsusr
- ssh username@cmsusr1 ". script_TS_DTSC.sh restart"