DQM Online training
1. Execution Environment
Request a virtual machine to the CERN Virtual Machine Service (
http://vmm.cern.ch
), the following are expected features:
- Operating System: SLC5-x86_64
- RAM Memory: 2GB
- CPU: 1 core
- Hard Disk: 40G
2. DQM GUI Installation
mkdir testGui
cd testGui
DQM_HOME=$PWD
svn co svn+ssh://svn.cern.ch/reps/CMSDMWM/Infrastructure/trunk/Deployment cfg
#
svn co -r 15374 svn+ssh://svn.cern.ch/reps/CMSDMWM/Infrastructure/trunk/Deployment cfg
#
$DQM_HOME/cfg/Deploy -t MYDEV -s "prep sw post" $DQM_HOME dqmgui/bare
3. Starting the DQM GUI server
$DQM_HOME/current/apps/dqmgui/etc/profile.d/env.sh
$DQM_HOME/current/config/dqmgui/manage restart "I did read documentation"
Other options of the previous command include start, stop and status.
4. Setting the DQM GUI Index
cd $DQM_HOME/state/dqmgui/dev
visDQMIndex create ix
- In order to load a valid histogram, download one or more from
https://cmsweb.cern.ch/dqm/offline/data/browse/ROOT/
and then copy them to the virtual machine
scp [root file name].root [virtual machine hostname]:/$DQM_HOME/state/dqmgui/dev/uploads/
visDQMIndex add . $DQM_HOME/state/dqmgui/dev/ix . $DQM_HOME/state/dqmgui/dev/uploads/*.root
5. STG Installation
STG is the patch manager used for the DQM GUI tool patches.
sudo mkdir guiworkspace
cd guiworkspace/
STG_HOME=$PWD
sudo mkdir Infrastructure
sudo yum install git.x86_64 1.7.4.1-1.el5
sudo yum install git-all.x86_64 1.7.4.1-1.el5
sudo yum install gitk.x86_64 1.7.4.1-1.el5
sudo yum install gitweb.x86_64 1.7.4.1-1.el5
sudo yum install stgit.noarch
mkdir ~/.stgit
ln -s stg/stgit/templates ~/.stgit
git config --global user.name "[your name]"
git config --global user.email "[your CERN email]"
git config --global svn.addAuthorFrom true
git config --global svn.useLogAuthor true
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto
(echo "Host *" echo " ControlMaster auto" ) >> ~/.ssh/config
ssh -Nf svn.cern.ch
nano ~/.ssh/config
If it is present, delete the line:
echo " ControlPath $HOME/.ssh/%h.%p.%r"
and save the changes.
git svn clone svn+ssh://svn.cern.ch/reps/CMSDMWM/Infrastructure -s
cd Infrastructure/
git config branch.master.remote svn
git config stgit.pull-policy fetch-rebase
git config stgit.fetchcmd "git svn -i trunk fetch"
git config stgit.rebasecmd "git svn rebase"
touch .git/FETCH_HEAD
stg init
stg branch -c mydev
git config branch.mydev.remote svn
In your home directory:
sudo git clone git://repo.or.cz/stgit.git
cd stgit
sudo yum install asciidoc
sudo make prefix=/usr all doc
sudo make prefix=/usr install install-doc
6. Patch Management (Testing and deploying render plugins and layouts).
Remember to set $DQM_HOME variable as your DQMGUI installation directory (see step 2).
New patches will be available in the directory:
/afs/cern.ch/user/c/cmsdqm/scratch/gui-patch-dropbox/
They must be moved to the test directory:
mv /afs/cern.ch/user/c/cmsdqm/scratch/gui-patch-dropbox/* /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]
Remember to set STG_HOME variable as your STG workspace (see step 5):
cd $STG_HOME/Infrastructure/Deployment/dqmgui/
Create a patch that will compile all of the pending patches that are not STG based (if there is one already in place for the current week just skip next line):
stg new -m "RP Layouts WS update" rp-layouts-ws-h$(date +%m%y)
For DQM general patches:
cat /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]/[new patch name] | patch -p[0-4] --dry-run
cat /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]/[new patch name] | patch -p[0-4]
For DQM STG based patches:
stg import /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]/[ new patch name]
Then for both cases:
stg refresh
stg series
This command should show the current patches.
Then you should mix the new patch with the one that you have created in order to compile the patches:
stg squash -n rp-layouts-ws-h$(date +%m%y) rp-layouts-ws-h$(date +%m%y) [patch name]
stg refresh
stg series
stg show
This command should show the mixed body of the patches.
cd $DQM_HOME/cfg/dqmgui
svn revert -R .;svn status | awk '/?/{print $2}' | xargs rm -rv; svn up ;
This command will reverts the directory to its original state and apply the lastest updates.
cd Infrastructure/Deployment/dqmgui/
stg export -d $DQM_HOME/cfg/dqmgui -p -n
. $DQM_HOME/current/apps/dqmgui/etc/profile.d/env.sh
cd $DQM_HOME/cfg/dqmgui
cat [patch name] | patch -p[0-4] --dry-run
cat [patch name] | patch -p[0-4]
$DQM_HOME/cfg/Deploy -t MYDEV -s sw $DQM_HOME dqmgui/bare
monControl rebuild all from $DQM_HOME/current/config/dqmgui/[config file changed]
$DQM_HOME/current/config/dqmgui/manage restart "I did read documentation".