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:
  1. checkout dtsc applications and setup code in your personal home directory on cmsusr..
    1. you can use this perl script, similar to the Trigger Supervisor one : bootstrap_dtsc.pl
    2. execute the script in you home : perl bootstrap_dtsc.pl tagname (tagname is optional)
    3. these packages should be the minimal ones to be downloaded from cvs:
  2. ssh to vmepcs2g16-11 with your private account
  3. execute bash script: TriDAS/trigger/dtsc/ts/toolbox/scripts/confRoot_vmepc.sh
  4. execute bash script: TriDAS/trigger/dtsc/ts/toolbox/scripts/environment_linco_TS15.sh
  5. cd TriDAS/trigger/dtsc/setup/dtscts
  6. execute: make rpm
  7. rpm is created in TriDAS/trigger/dtsc/setup/dtscts/rpm
  8. 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:
        1. PACKAGE_VER_MAJOR=x
        2. PACKAGE_VER_MINOR=y
        3. PACKAGE_VER_PATCH=x
How to install the setup:

  1. use your private account (because it has sudo privileges on DT PCs!)
  2. go to TriDAS/trigger/dtsc/setup/dtscts (where you have already created the rpm setup)
  3. 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!
  4. use a script like that in order to install rpm on all PCs:
    1. #!/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
    2. remember pointing RPM_HOME to your private rpm directory!
    3. remember changing  trigger-dtscts-1.0.0-6.i386.rpm with trigger-dtscts-x.y.z-6.i386.rpm having the correct version number!!!
    4. Step by step description (what the script does!):
      1. loop on all 5 DT PCs
      2. stop slp and xdaqd services
      3. erase previous trigger-dtscts rpm version (if installed)
      4. install new version 
      5. restart slp and xdaqd previously stopped

How to start/stop/restart DTSC trigger supervisor services:

#!/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
How to uninstall the setup:
  1. use your private account (because it has sudo privileges on DT PCs!)
  2. Stop all dtscts services: ssh username@cmsusr1 ". script_TS_DTSC.sh stop"
  3. 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!
  4. 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:
  1. download TS framework (l1ts-20080408)
  2. checkout dtsc applications and setup code in your personal home directory on cmsusr..
    1. you can use this perl script, similar to the Trigger Supervisor one : bootstrap_dtsc.pl
    2. execute the script in you home : perl bootstrap_dtsc.pl tagname (tagname is optional)
    3. these packages should be the minimal ones to be downloaded from cvs:
  3. rename TriDAS directory to TriDAS_yyyymmdd
  4. make tar.gz of TriDAS_yyyymmdd and call it TriDAS_yyyymmdd.tar.gz
  5. ssh to vmepcs2g16-11 with your private account
  6. log as dtdev : sudo su -l dtdev
  7. copy the tar.gz previously created on dtdev home
  8. extract the tar.gz
  9. make the symbolic link TriDAS pointing to the TriDAS_yyyymmdd
  10. execute bash script: TriDAS/trigger/dtsc/ts/toolbox/scripts/confRoot_vmepc.sh
  11. execute bash script: TriDAS/trigger/dtsc/ts/toolbox/scripts/environment_linco_TS15.sh
  12. install TS framework , by executing (perl TriDAS/trigger/ts/toolbox/script install.pl)
  13. cd TriDAS/trigger/dtsc
  14. make clean
  15. make
  16. exit (back to your private account)
  17. exit back to cmsusr
  18. ssh username@cmsusr1 ". script_TS_DTSC.sh restart"