DQM GUI Patches administration
Page Under Construction
Here you will find the instructions to test and deploy render plugins and layouts for DQM GUI Online.
1. Set the STG home directory
STG is the patch manager currently used for the DQM GUI Online patches. In order to set a STG home directory, go to the parent directory where you want to install STG and then execute the following commands:
mkdir guiworkspace
cd guiworkspace/
STG_HOME=$PWD
The variable $STG_HOME will be your STG home directory.
2. Install STG
cd $STG_HOME
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
3. STG Repository Maintenance
Set the $STG_HOME variable
see step 1
If a new version of DQM GUI is available then you should update the STG repository executing the command:
stg pull -m
Which will pull the latest changes from a remote repository checking for patches merged upstream. If there is a conflict, then for each one of the files involved execute:
git add [path and name of the file in conflict]
or
git checkout HEAD~1 [path and name of the file in conflict]
Then execute:
stg refresh reset
stg pull -m
stg refresh
And no more conflicts should be reported.
4. Patch Management
Set the $DQM_HOME variable (see the procedure
here) and $STG_HOME variable
see step 1
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 (year-version) directory]
cd $STG_HOME/Infrastructure/Deployment/dqmgui/
If you will use non-STG based patches and you do not have a main patch to add the new ones (
stg series
will show the current patches available), create a main patch executing the following command:
stg new -m "RP Layouts WS update" rp-layouts-ws-h$(date +%m%y)
stg refresh
- If you will use a non-STG based new patch to add to the main one, execute the following command:
cat /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current month directory]/[new patch name] | patch -p[0-4] --dry-run
The previous command will show you the output generated during a test patch application. Values for -p[0-4] change due to directories structure. If the command shows you an error try to solve it and if it is not possible you should report that one to the patch creator. If the patch applies in a correct way, execute the following command:
cat /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current (year-version) directory]/[new patch name] | patch -p[0-4]
- If you will use a STG based new patch, execute the following command:
stg import /afs/cern.ch/user/c/cmsdqm/scratch/patches-under-test/[current (year-version) directory]/[new patch name]
Then for both cases:
stg refresh
stg series
This command should show you the current patches in a correct order of application.
If you are adding patches then you can use the following command:
stg squash -n [main patch name] [main patch name] [new patch name]
stg refresh
stg show
This command should show the mixed body of the patches.
5. Patch Testing
Set the $DQM_HOME variable (see the procedure
here) and $STG_HOME variable
see step 1
I order to test a new patch, you should have a DQM GUI installation and execute the following commands:
cd $DQM_HOME/cfg/dqmgui
svn revert -R .;svn status | awk '/?/{print $2}' | xargs rm -rv; svn up ;
If the output shows an error then try the following option:
-
svn revert -R .;svn status | awk '/?/{print $2}' | xargs rm -rv; svn up -r 15374 ;
This command will revert the directory to its original state and apply the latest updates.
In order to export the patch, execute the following commands:
cd $STG_HOME/Infrastructure/Deployment/dqmgui/
stg export -d $DQM_HOME/cfg/dqmgui -p -n
The previous line will export all the patches to the $DQM_HOME/cfg/dqmgui directory
. $DQM_HOME/current/apps/dqmgui/etc/profile.d/env.sh
cd $DQM_HOME/cfg/dqmgui
Then you can test the patches:
cat [exported patch name] | patch -p[0-4] --dry-run
The previous command will show you the output generated during a test patch application. Values for -p[0-4] change due to directories structure.
cat [exported 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".
The previous lines should deploy, rebuild and restart the DQM GUI installation without errors. If the command shows you an error try to solve it and if it is not possible you should report that one to the patch creator.
6. Patch Deployment
Section Under Construction