Keeping GridEngine configuration information in git
If indeed “imitation is the highest form of flattery”, then Edward Dale should indeed be flattered since I’ve taken his idea about Keeping Grid Engine configuration information in Subversion that I noticed thanks to Chris’ blog entry and simply used git for the backend storage.
After seeing the simplicity of the solution and its usefulness, it looked to
be a must have, except that I generally use git for almost everything and
adding subversion to the mix would be annoying. The crux point thus seemed
to be replacing
svn_load_dirs.pl (to import and update everything) with an
make the script dependent on a number of additional python modules.
Luckily, every now and then it pays to RTFM instead of just searching
everywhere in the internet for a solution. Using
git --help or
reveals two obviously useful command-line options:
--git-dir=<path> Set the path to the repository. This can also be controlled by setting the GIT_DIR environment variable... --work-tree=<path> Set the path to the working tree... This can also be controlled by setting the GIT_WORK_TREE environment variable...
The resulting GridEngine-git-config script is now part of the programs in flex-grid.
In the current long form it adds various error checking and intelligence to avoid creating unnecessary snapshots, but stripped of all that it essentially boils down to this:
Stripped down to the essentials, the
svn_load_dirs.pl has been replaced by
git add .
git commit -a
both of which only rely on git being installed.
For convenience, the GridEngine-git-config script provides a pass-through for some common git commands:
- GridEngine-git-config log
- GridEngine-git-config ls-files
- GridEngine-git-config show
- GridEngine-git-config whatchanged
Under normal circumstances, the show and whatchanged would be the most useful means of seeing which changes have occurred.
git instaweb or the
gitweb.cgi can also be used to browse the