Frontier Project Notes

Client release procedure

These are the steps to release the client:
  1. Update the RELEASE_NOTES with everything that has changed since the last version
  2. Update the version number in Makefile
  3. Update client version and date in ../README and then do
    scp ../README dbfrontier@frontier.cern.ch:dist/frontiersourcereadme.txt
    (frontier.cern.ch should be set up in ~/.ssh/config with a 'Port 2222' option to make sure it goes only to the master server.)
  4. Commit all your changes to git, push them to your origin branch, create pull requests, and merge them into the upstream github master repo. Also push the changes to the redmine repo.
  5. Set a client tag in the following format and push to all 3 repositories:
    CLIENTVERSION=2_8_16
    git tag v$CLIENTVERSION
    git push --tags
    git push upstream --tags
    git push redmine --tags
  6. In a scratch directory download the source code from github with
    wget https://github.com/fermitools/frontier/archive/v$CLIENTVERSION.tar.gz
    tar xzvf v$CLIENTVERSION.tar.gz frontier-$CLIENTVERSION/client
    cd frontier-$CLIENTVERSION/client
  7. make PACPARSER_DIR=$HOME/devFRONTIER/FRONTIER all-dist # or wherever pacparser is installed
  8. scp tmp/* dbfrontier@frontier.cern.ch:dist
  9. scp RELEASE_NOTES dbfrontier@frontier.cern.ch:dist/clientreleasenotes.txt
  10. ssh dbfrontier@frontier.cern.ch and edit dist/index.html with the new version numbers for the client sources and binary
  11. Make a ticket in the SPI JIRA, ask them to build the new frontier_client release, and give them a copy of or link to the release notes for the new version.
  12. Request that the new client be used as an updated external package in a cmsdist github issue.
  13. Announce to frontier-talk@cern.ch

Servlet release procedure

These are the steps to release the frontier servlet:
  1. Update RELEASE_NOTES with everything that has changed since the last version
  2. Update the version number in src/gov/fnal/frontier/FrontierServlet.java
  3. Update servlet version and date in README and then do
    scp README dbfrontier@frontier.cern.ch:dist/frontiersourcereadme.txt
  4. Commit all your changes to git, push them to your origin branch, create pull requests, and merge them into the upstream github master repo. Also push the changes to the redmine repo.
  5. Set an environment variable SERVLETVERSION=3_NN where NN is the current number.
  6. Set a servlet tag in the following format and push to all 3 repositories:
    git tag servlet_$SERVLETVERSION
    git push --tags
    git push upstream --tags
    git push redmine --tags
  7. In a scratch directory download the source code from github with
    wget https://github.com/fermitools/frontier/archive/servlet_$SERVLETVERSION.tar.gz
    tar xzvf servlet_$SERVLETVERSION.tar.gz --exclude client frontier-servlet_$SERVLETVERSION
  8. Prepare and release the sources:
    mv frontier-servlet_$SERVLETVERSION Frontier_$SERVLETVERSION
    tar zcf Frontier_servlet__`echo $SERVLETVERSION|tr _ .`__src.tar.gz Frontier_$SERVLETVERSION
    scp Frontier_servlet__`echo $SERVLETVERSION|tr _ .`__src.tar.gz dbfrontier@frontier.cern.ch:dist
  9. Prepare and release the binaries:
    cd Frontier_$SERVLETVERSION
    ant -f build.local clean
    ant -Dcatalina.home=$CATALINA_HOME -f build.local dist
    (where CATALINA_HOME is set to the top level directory of a tomcat installation)
    scp dist/Frontier.war dbfrontier@frontier.cern.ch:dist/Frontier_`echo $SERVLETVERSION|tr _ .`.war
    scp RELEASE_NOTES dbfrontier@frontier.cern.ch:dist/servletreleasenotes.txt
  10. ssh dbfrontier@frontier.cern.ch and edit dist/index.html with the new version number for the server sources and binary

NOTE: most of the rest of this page is badly out of date. Contact Dave Dykstra if you need current procedures.

Required Products

Building/Deploying Servlet

  1. Install Java, Tomcat, and Ant
  2. Check out frontier CVS package
  3. Make sure ant/java are in your path
  4. Modify file build.local: set value for property catalina.home to point to the root directory of your tomcat installation. For example, un my build.local file I've got <property name="catalina.home" value="/scratch/veseli/devel/tomcat"/>
  5. To build the servlet code: ant -f build.local
  6. To build the servlet code and prepare war distribution file: ant -f build.local dist
  7. Here is an example of a servlet configuration file which is working on Tomcat 5.5.x:
    $ pwd
    /scratch/veseli/devel/tomcat/conf/Catalina/localhost
    $ cat FrontierCMS.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Context debug="99" displayName="froNtier CMS Database Web Application" docBase="FrontierCMS" path="/FrontierCMS" reloadable="true">
     <Resource auth="Container" name="jdbc/frontiercms" type="javax.sql.DataSource" 
      url="jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=uscmsdb03.fnal.gov))(CONNECT_DATA=(SID=cmscald)))" 
      driverClassName="oracle.jdbc.driver.OracleDriver" validationQuery="select * from dual" maxIdle="1" 
      maxActive="2" maxWait="-1" username="cms_reader" password="reader" logAbandoned="true" />
    
    </Context>
    
    
  8. The other two configuration files one has to worry about is the servlet deployment file web.xml (deployed in the webapps/FrontierCMS/WEB-INF ), as well as the configuration file config.properties (deployed in webapps/FrontierCMS/WEB-INF/classes).
    • Working example for Frontier web.xml file:
      $ pwd
      /scratch/veseli/devel/tomcat/webapps/FrontierCMS/WEB-INF
      $ cat web.xml
      <!DOCTYPE web-app
          PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
          "http://java.sun.com/dtd/web-app_2_3.dtd">
      
      <web-app>
         <display-name>Frontier 3</display-name>
         <description>Frontier 3 - XSD v2, writing, finders, etc.</description>
         <session-config>
          <session-timeout>300</session-timeout>   <!-- 300 minutes -->
         </session-config>
      
         <servlet>
           <servlet-name>FrontierCMS</servlet-name>
           <servlet-class>gov.fnal.frontier.FrontierServlet</servlet-class>
           <load-on-startup>1</load-on-startup>
         </servlet>
      
         <servlet-mapping>
           <servlet-name>FrontierCMS</servlet-name>
           <url-pattern>/Frontier</url-pattern>
         </servlet-mapping>
      
         <resource-ref>
             <description>
                  This is the refererence to the Oracle data source we
                  use to talk to the database configured in server.xml.
             </description>
             <res-ref-name>jdbc/frontiercms</res-ref-name>
             <res-type>javax.sql.DataSource</res-type>
             <res-auth>Container</res-auth>
         </resource-ref>
      </web-app>
      
    • Working example for Frontier config.properties file:
      $ pwd
      /scratch/veseli/devel/tomcat/webapps/FrontierCMS/WEB-INF/classes
      $ cat config.properties
      ServerName=FrontierCMS
      DataSourceName=jdbc/frontiercms
      XsdTableName=frontier_descriptors
      #MonitorNode=MonAlisa_server_node_name
      #MonitorMillisDelay=300000
      UseFdoCache=no
      #CacheExpireHourOfDay=5
      #CacheExpireSeconds=86400
      
      

Building and Testing Frontier Access Plugin

The Frontier Access C++ Plugin is the primary means of accessing Frontier from the CMS framework software. The notes here include examples that work on the lxplus.cern.ch cluster.
  1. Copy/unpack the client distribution file in your work area on lxplus cluster:
    
    $ tar zxvf frontier_client__2.7.0__src.tar.gz
    frontier_client__2.7.0__src/
    ...
    
    
  2. Build client libraries
    $ cd frontier_client__2.7.0__src
    $ make dist
    ...
    
    
  3. Build frontier access plugin; example which prepares build area, checks out necessary code, prepares environment, etc. is shown below.
    $ cat ~/bin/coralscram
    #!/bin/bash
    case $SCRAM_ARCH in
            *_dbg);;
            *) export SCRAM_ARCH=${SCRAM_ARCH}_dbg;;
    esac
    exec /afs/cern.ch/sw/lcg/app/spi/scram/scram "$@"
    $ coralscram project CORAL CORAL_1_6_2
    ...
    $ cd CORAL_1_6_2/src
    $ eval `coralscram runtime -sh`
    $ export CVSROOT=:pserver:anonymous@coral.cvs.cern.ch:/cvs/coral
    $ cvs co -r CORAL_1_6_2 FrontierAccess
    ...
    $ cd FrontierAccess
    $ coralscram build
    Configuring Local Area
    ...
    $ cd tests/CmsNewFrontier
    $ unitTest_FrontierAccess_CmsNewFrontier
    ...
    
    
  4. Once the above is done, one has built frontier access plugin using frontier libraries provided in the release. However, in order to test the plugin with the frontier_client headers and libraries built in your work area, one has to modify the scram setup:
    $ cd ../.. # if still in tests/CmsNewFrontier
    $ coralscram setup -i frontier_client
    ...
    (copy and paste the full path to your frontier_client__2.7.0__src/dist
     directory as the FRONTIER_CLIENT_BASE, and for all others copy and paste
     the value it does an "existence check" just before prompting.)
    ...
    $ eval `coralscram runtime -sh`
    $ coralscram build clean
    $ coralscram build
    Configuring Local Area
    ...
    $ cd tests/CmsNewFrontier
    $ unitTest_FrontierAccess_CmsNewFrontier
    ...
    

Dave Dykstra
Last modified: 10 November 2008