Making ROCKS Rolls

ROCKS is designed with plug-able "rolls" that allow features to be added to the cluster. There are hooks for doing pretty much any frontend or client customization desired. The required roll install and uninstall process varies depending on the aspects of configuration handled by the individual roll. Generally, for client build configuration, rolls can be added and removed from the frontend with only a "rocks create distro" action required. Moving local "site-profiles" and "rpm contrib" client configuration into rolls is simple and requires little new process.

Compared to a large client configuration held only in site-profiles and contrib, utilizing rolls can provide advantages:

  • further modularization of configuration
  • version control at roll level vs. global site-profiles level
  • rpms used by given feature contained within roll vs. intermixed in contrib
  • ability to remove rolls from frontend useful; this functionality not replicated by site-profiles method
Probably the most significant gain is the grouping of rpms. Creation and installation of a Scientific Linux OS update roll is literally a 15 minute process that can be performed in an automated or rote manor. Compare this to hours of tedious work to update the ROCKS 5.3 contrib rpms.

ROCKS provides a highly automated build process for rolls. It is well documented by the ROCKS Roll Developer Guide:

Building a basic Roll

Rolls source are committed to SVN at So far, I've just been committing the rolls source and not finished roll. The committed files should match to what exists in the directory roll after "make clean" is done. Once checked out, the roll can be built with "make roll".

Here are steps used to make the roll "agl-update-sl58".

$ cd svn-trunk/rolls-src
$ rocks create new roll version=0.01 name=agl-update-sl58 color=turquiose
$ cd agl-update-sl58
$ mkdir -p RPMS/x86_64
$ cp /export/mirror/scientific/58/x86_64/updates/security/*rpm RPMS/x86_64
$ make roll

NOTE for ROCKS 5.5 due to a change in the Makefile setup, remove the src directory if it is not being used; insert "rm -rf src" before the "make roll" above.

This creates the file agl-update-sl58-0.01-0.x86_64.disk1.iso

To install this on the frontend and make available for client builds, do (note the enable step):

$ rocks add roll agl-update-sl58-0.01-0.x86_64.disk1.iso
$ rocks enable agl-update-sl58

$ rm -rf /export/rocks/install/rocks-dist
$ rocks create distro

I'm handling the finished rolls as ISO images --- not burned to optical media. By default, rolls are chunked into CD-ROM sizes, which to override that for larger update rolls. As a hack, one can add make commands to the file. I added these lines (this is also shown in SVN):

# override variable from
# allow one isoimage to be 10GB

(You can pick color names from the Graphviz SVG color scheme )

Transitioning site-profiles and contrib

The basics of functionality between customization using "site-profiles" and "contrib" vs. rolls is the same. XML files placed in the roll's nodes and graphs directories will be included in the finished rocks-dist. A difference here is that there is no direct equivalent of the site-profiles/5.3/include directory. An alternative is to inline needed files into nodes/*.xml files. For example, see the agl-cfengine roll here

The roll agl-base includes graph nodes that form a central point for collecting features needed by worker nodes. "agl-base-worker" links to nodes defined in other rolls. There is a mechanism for requiring dependencies between rolls, but that has not been utilized in these agl- rolls. This roll also includes the definition of the "t2-dcx" node meant to provide the starting point for T2 worker node appliance for MSU.

-- TomRockwell - 25 Apr 2012
Topic revision: r3 - 04 Jun 2012, TomRockwell
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback