Changes between Version 16 and Version 17 of Download/QWGTemplates/Install


Ignore:
Timestamp:
Apr 15, 2014, 8:16:57 PM (10 years ago)
Author:
/C=FR/O=CNRS/OU=UMR8607/CN=Michel Jouvin/emailAddress=jouvin@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Download/QWGTemplates/Install

    v16 v17  
    3333 * Synchronize your configuration database with your local copy of the template library.
    3434
    35 To integrate new/changed templates in your configuration database, the easiest is to use the tool . This tool can be used '''only''' with [wiki:Doc/SCDB SCDB], as it relies on [http://subversion.tigris.org Subversion] to do a non destructive update. As a benefit, it cannot damage your configuration database as every change made by this tool can be reverted with Subversion.
     35To integrate new/changed templates in your configuration database, the easiest is to use the tool [source:templates/trunk/tools/directory-sync directory-sync]. This tool can be used '''only''' with [wiki:Doc/SCDB SCDB], as it relies on [http://subversion.tigris.org Subversion] to do a non destructive update. As a benefit, it cannot damage your configuration database as every change made by this tool can be reverted with Subversion.
    3636
    37 After importing all the changes with `directory-sync` (or manually), you need to commit them into your SCDB, after checking it compiles successfully and the changes in the profiles look appropriate (generally mainly some RPMS update). For this last check you can use `src/utils/profiles/compare_xml` script. After integrating the new templates, identify the changed templates, review the change if necessary and revert those not appropriate. You'll probably need to revert changes of all templates in directories `repository` (these templates are site specific but some of them are required to reside in standard directories for multiple version support).
     37This tool updates a directory with the contents of a reference source, doing the following :
     38 * For each directory existing both in QWG repository and in source tree :
     39   * Removes all `.pan` files from the destination directory (the directory to update).
     40   * Copy all .pan files from the source directory (built by appending destination directory name to source directory root)
     41 * For each directory in the source tree and not in the repository, copy the tree from the source tree and add files to SVN QWG repository.
     42 * For each directory in the repository but no longer in the source tree, do a `svn rm` of the directory.
     43 * Show the differences with `svn status`
    3844
    39 ''Note : when checking for changes brought by a new version, you can temporaly define [wiki:Download/QWGTemplates/Install#ControllinggLiteUpdatesInstallation GLITE_UPDATE_VERSION] to your current version. This way you should have no changed RPMs.''
     45It accepts 2 parameters:
     46 1. directory to synchronize: '''must be''' a relative path specification.
     47 1. reference directory parent: the parent path where a directory with the '''same relative name''' is located and must be used as a reference source.
     48
     49''Note: because the second argument is not the source directory itself but a parent for a directory with the same relative name as the first parameter, when synchronizing a real configuration database with a QWG branch or trunk you must run this tool from `cfg` directory or one of its subdirectories.'' As you run this tool from a SVN workspace, you always have the opportunity to do a `svn revert` in case things went wrong...
    4050
    4151
    42 === Fresh Installation of New Middleware Templates ===
     52{{{
     53find grid os standard -type d -not -path '*.svn*' -exec tools/directory-sync {} /tmp/scdb-vanilla/cfg \;
     54}}}
     55
     56You need to fix manually the unexpected differences. Unexpected differences are all the templates that existed in the repository but no longer exist in the local workspace or all the templates copied from the source but not registered in the repository. There are 3 situations :
     57 * A template has been renamed or moved. In this case, you should revert the change for this template, do the relevant `svn mv` and rerun [source:templates/trunk/tools/directory-sync directory-sync] to avoid breaking the template modification history.
     58 * Else, if the template existed in the repository but is no longer present in the workspace (flagged `!` by `svn status`), it can be safely removed from the repository with command :
     59{{{
     60# To remove template template_name.tpl
     61svn rm --force template_name.tpl
     62# To remove all templates no longer present in the repository
     63svn rm `svn status | grep '^\!' | awk '{print $2}'`
     64}}}
     65 * Else, if the template is present in the workspace but not registered into the repository ((flagged `?` by `svn status`) and this is a new template, it should be added to the repository with one of theses commands :
     66{{{
     67# Add one specific template template_name.tpl
     68svn add template_name.tpl
     69
     70# Add all the files not yet registered in the repository
     71svn add `svn status | grep '^\?' | awk '{print $2}'`
     72}}}
     73
     74When you have cleaned up the situation for all the templates, except those that are present in the workspace (because they are used in your local Quattor configuration) but don't need to be in the repository, you can do the final cleanup with :
     75{{{
     76rm -f `svn status | grep '^\?' | awk '{print $2}'`
     77}}}
     78
     79When there is no more templates flagged as `!` (missing) or `?` (unknown), you can commit your changes to the repository. Please, take care of setting up a useful message for the commit as this is the only source for a ChangeLog...
     80
     81After importing all the changes with `directory-sync` (or manually), before committing them into your SCDB, check that you can compile them successfully and that the changes in the profiles look appropriate (generally mainly some RPMS update). For this last check you can use `src/utils/profiles/compare_profile` script. After integrating the new templates, identify the changed templates, review the change if necessary and revert those not appropriate. You'll probably need to revert changes of all templates in directories `repository` (these templates are site specific but some of them are required to reside in standard directories for multiple version support).
     82
     83== Fresh Installation of New Middleware Templates ===
    4384
    4485In this scenario, you first have to download the new version of the templates, as in previous scenario. After, rather than sync'ing your templates with the release, you can copy the middleware templates provided by the release (e.g. `grid/glite-3.0.0`) in a new directory under `cfg/grid` in your CDB/SCDB and add them to the repository (use `svn add` for SCDB).