wiki:Obsolete/Development/Templates/Components

Updating NCM Components

NCM components are maintained as part of the core Quattor distribution and QWG templates are using them as is. It is important to keep core Quattor distribution and QWG templates in sync with this respect. This page describes the procedure required to properly update NCM Components.

Modifying Component Templates

Templates related to components (located in directory components/xxx where xxx is the component name) must never be modified in place. These files are imported from Quattor repository on SourceForge and edits made directly in QWG templates will be lost at next update of the component.

If you need to modify these templates (e.g. to add support for a new configuration option), you need to get a copy of the Quattor repository, make your modification and commit your changes to produce a new version of the component. This requires write access to Quattor repository.

If you are not familiar with Quattor build tools, here is the steps required to produce a new version of the component :

  1. Make your modifications keeping the current version number (without committing them), rebuild the component and install you changes. Take care of editing .cin files instead of the real file (component module, doc or templates).
  2. Test your changes : if you modified the component module, it is recommended you install your RPM manually on one node to test it (use ncm-ncd --configure component to execute it). The commands to rebuild the component are :
    make
    make rpm
    
  3. Commit your changes : you can use plain svn commit directly but to produce the new version of the component you have to use make targets. There are 3 targets related to tagging a new release, according to the importance of the change :
    • release for minor modifications without new features (increment r in M.m.r-n)
    • minorversion for significant modifications (including new features) but without major redesign of the component (increment m in M.m.r-n`)
    • majorversion for major changes like component rewrite or incompatible changes with a previous version (increment M in M.m.r-n`).
  4. Rebuild the new version of the component : it is important to do a clean before else TPL/config.tpl may not be updated properly :
    make clean
    make
    make rpm
    

Installing a New Version

To install a new version of a NCM component inside SCDB, the easiest is to use src/utils/misc/updateComponent script. This script takes care of rebuilding the component from sources (an up-to-date working copy of Quattor repository is required), to install templates in all places where it is relevant into SCDB (for grid templates, into all the version of grid templates installed) and, optionally to copy the RPM into a RPM repository. The syntax is :

src/utils/misc/updateComponent --source /repository/checkout/path/ncm-components/category \
                               --rpmrep /your/component/RPM/repository/path \
                               component_name

For example, to upgrade ncm-glite' from /scratch/sources/ncm-components/glite and install RPM in /tmp', do :

src/utils/misc/updateComponent --source /scratch/sources/ncm-components/glite \
                               --rpmrep /tmp \
                               glite

Building component glite...
Installing component glite templates in cfg/grid/glite-3.0.0/components..
Installing component glite templates in cfg/grid/glite-3.1/components..
Installing component glite RPM (ncm-glite-1.1.1-1.noarch.rpm) in /tmp..
Last modified 14 years ago Last modified on Jun 30, 2010, 1:54:20 PM