Quattor NCM and SPMAtheory and exercisesGerman CancioCERN/IThttp://quattor.orgDataGrid is a project funded by the European Commission Heidelberg project conference, Sept 2003under contract IST-2000-25182‹‹‹‹ContentsNCM and SPMA ‘theory’Exercise setupNCM exercisesSPMA exercisesQuattor tutorial – Cancio, Poznanski - n° 2PXE DHCP KS/JSPackages(rpm, pkg)http nfs ftpNode install / config designSWRep ServerscachepackagesSPMAMgmt API(RPM, PKG)SPMA.cfgACL’sSPMANCMComponentsNode NCM(re)install?Installation serverCdispdPXEMgmt APIhandlingRegistrationCCMNotification ACL’sNodeDHCPInstall handlingKS/JSgeneratorClient NodesCDBCCMQuattor tutorial – Cancio, Poznanski - n° 3„‹„„‹Node Configuration Management (NCM)Client software running on the node which takes care of “implementing” what is in the configuration profileModules:“Components”Invocation and notification frameworkComponent support librariesQuattor tutorial – Cancio, Poznanski - n° 4‹„‹„„‹‹„‹„NCM: Components“Components” (like SUE “features” or LCFG ‘objects’) are responsible for updating local config files, and notifying services if neededComponents register their interest in configuration entries or subtrees, and get invoked in case of changesComponents can also be run manually, or via cronComponents do only configure the systemUsually, this implies regenerating and/or updating local config files (eg. /etc/sshd_config)Use standard ...
roLseojbFCG)aectsesporerfelbisntadpurocaloginignfcolCopmotnen(skeliUESfeurat files, and notifying services if needed
tsr tertheir interest in configuration entries or nadCeso,mpbotnernesueggeitsinvoked in case of changes Components can also be run manually, or via cron
Components do onlyconfigurethe system Usually, this implies regenerating and/or updating local config files (eg. _ /etc/sshd config)
Use standard system facilities (SysV scripts) formanagingservices services S their ocfngirutaionchanges.gnisuipcrVsysnhewtspmnooCcanentsifynot
Possible to define configuration dependencies between components Eg. configurenetworkbeforesendmail Components wont run if a pre-dependency is unsatisfied
QuattortutroailCancio,Poznanski-n°5
NCM: Components (II)
Components are written inPerl
Each component can implement two methods:
Configure():
startup, or when there was a CDBtypically invoked on configuration change
Mandatory method
Unconfigure():
invoked when a component is to be removed
Optional method most of the components wont need to implement it.
my $arch=$config->getValue('/system/architecture); # NVA API
open (myconfig,/etc/myconfig);
NCM: Components (III)
NVA API: configuration access library
This library allows hierarchical configuration structure access on the client side
Most popular methods: $value=$config->getValuenel//kerionvers(tsme/ys;)
If ($config->elementExists($path)) {} else {}
$element=$config->getElement($path);
while ($element->hasNextElement()) { my $newel=$element->getNextElement(); ... }
QuattrotutroialCancio,Poznanski-n°8
NCM support libs
Core functions: $self->log(@array):write @array to components log file $self->report(@array):write @array to log and stdout. $self->verbose(@array) $self->debug(@array):verbose/debug output $self->warn(@array):writes a[WARN]message, increases # of warnings $self->error(@array):writes an[ERROR]message, increases # of errors
Advanced support libraries available (coming from CERNs SUE tool): Configuration file manipulation Advanced file operations Process management Exception management libraries
QuattrotutorialCancio,Poznanski-n°9
totualriatQurtooP,nanzaCoicn0n°1ski-
make EDG_LSB=edg xxx use LSBorEDG prefixes
make pkg generates PKG (Solaris)
No makefile necessary
No specfile necessary
make rpm generates RPM
Portability
checks in modified files to CVS
Prompts for ChangeLog entry
Improved build tools allow for easier packaging of components
make release generate new version
Generates a new CVS tag for the component
Each component is packaged independently
NCM: packaging components
NCM: tools
ncm-ncd(Node Configuration Deployer):
framework and front-end for executing components (via cron, cdispd, or manually) Dependency ordering of components
cdispd(Configuration Dispatch Daemon)
Monitors the config profile, and invokes registered components via thencm-ncdif there were changes
ncm-query
examining configuration information as cached on theTool for node
More details in NCM design document http://edms.cern.ch/document/372643