Installation of DBS

Deploying DBS

Following the instructions at DBS twiki page, we can deploy DBS by "One Click".

export PROJ_DIR=/data/projects/dbs/ ### Change as appropriate
export SCRAM_ARCH=slc4_ia32_gcc345
export APT_VERSION=0.5.15lorg3.2-cmp
wget -O$PROJ_DIR/bootstrap.sh http://cmsrep.cern.ch/cmssw/cms/ \
bootstrap.sh
chmod +x $PROJ_DIR/bootstrap.sh
### You only need to do this once
$PROJ_DIR/bootstrap.sh -repository comp -arch $SCRAM_ARCH -path \
$PROJ_DIR setup 
cd $PROJ_DIR
source $SCRAM_ARCH/external/apt/$APT_VERSION/etc/profile.d/init.sh
apt-get update
apt-cache search dbs-server # find the latest release 
apt-get install cms+dbs-server+DBS_1_0_8-cmp2 
apt-get install cms+dbs-client+DBS_1_0_8-cmp2 
apt-get install cms+dbs-schema+DBS_1_0_8-cmp2 
Change port 8080 to 8090 at /opt/cmsdbs/slc4_ia32_gcc345
/external/apache-tomcat/5.5.26-cmp/conf/server.xml

 

Testing the local DBS

cd DBS/Server/JavaServer/test
Look inside the bash file runAllTest.sh and go to the bottom of the file
Comment or uncomment the test calls. 
For example comment insertAlgorithm and uncomment listPrimaryDatasets
Run the script and it will display the test results on the console
./runAllTest.sh 
User can rerun the script by uncommenting the test calls.
or in your web browser, input the URL as follows:
http://localhost:8090/DBS/servlet/DBSServlet
or
http://localhost:8090/DBS/servlet/DBSServlet?api=listPrimary
Datasets&apiversion=DBS_1_0_8-cmp7

You also can refer Local Scope DBS that was presented by Vijay Sekhri at USCMS T2 workshop '08.

Starting local DBS and stopping it

$PROJ_DIR/$SCRAM_ARCH/cms/dbs-server/DBS_1_0_8_cmp-7/Servers/JavaServer/
bin/dbs_init.sh start
$PROJ_DIR/$SCRAM_ARCH/cms/dbs-server/DBS_1_0_8_cmp-7/Servers/JavaServer/
bin/dbs_init.sh stop 

Local DBS space and version

Local DBS was installed at /opt/cmsdbs on cmsdbs.rcac.purdue.edu. 
Now its version is DBS_2_0_7.

 

Publishing Data at DBS

1. Setup the environment

First, make use of python shipped with CMSSW installation: 
source $PROJ_DIR/$SCRAM_ARCH/cms/dbs-client/DBS_1_0_8-cmp7/etc/
profile.d/init.sh
In $PROJ_DIR/$SCRAM_ARCH/cms/dbs-client/DBS_1_0_8-cmp7/lib, run: 
source setup.sh

 

2. Modify dbsInsertEverything.py accordingly and run

cd $PROJ_DIR/$SCRAM_ARCH/cms/dbs-client/DBS_1_0_8-cmp7/lib/DBSAPI/ \
UserExamples
python dbsInsertEverything.py --url=http://localhost:8090
/DBS/servlet/DBSServlet

3. List primary dataset name

python dbsListPrimaryDatasets.py --url=http://localhost:8090
/DBS/servlet/DBSServlet

 

Purdue Local DBS

http://cmsdbs.rcac.purdue.edu:8090/DBS/servlet/DBSServlet