Quattor tutorial
28 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
28 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

quattor NCM componentsintroduction tutorialGerman CancioCERN IT/FIOGerman.Cancio@cern.ch‹„‹„‹ContentsPreparationNCM ‘theory’Components – what are they, how to run themPackagingNCM exercisesDisclaimer:This is not a full quattor tutorial, but an introduction to the NCM framework. In particular, neither CDB/pan, nor SWRep/SPMA, nor AII are covered. A basic understanding of the PAN language is recommended.Quattor NCM tutorial – German.Cancio@cern.ch - n° 2„‹„„‹„‹„PreparationLogin onto your ‘worker node’ (see whiteboard) as rootPlease download the following tar.gz file, and uncompress it in your $HOME directory (~root):cd ~wget http://cern.ch/quattor/documentation/tutorials/cern-0404/ncm-tutorial.tgztar xvfz ncm-tutorial.tgzRun the setup script:~/ncm-tutorial/bin/tutorial_setup.shshould print [OK]Quattor NCM tutorial – German.Cancio@cern.ch - n° 3PXE DHCP KS/JSPackages(rpm, pkg)http nfs ftpNCM environmentSWRep ServerscachepackagesSPMAMgmt API(RPM, PKG)SPMA.cfgACL’sSPMANCMComponentsNode NCM(re)install?AII serverCdispdPXEMgmt APIhandlingRegistrationCCMNotification ACL’sNodeDHCPInstall handlingKS/JSgeneratorClient NodesCDBCCMQuattor NCM tutorial – German.Cancio@cern.ch - n° 4„‹„„„„‹‹‹„„„‹What are components? (1/2)“Components” (like SUE “features” or LCFG ‘objects’) are responsible for updating local config files, and notifying services if neededComponents do only configure the ...

Informations

Publié par
Nombre de lectures 49
Langue English

Extrait

quattor NCM components introduction tutorial
German Cancio
CERN IT/FIO
German.Cancio@cern.ch
ttauQt MCN roGream.nturoai lern.ch-nCancio@c2 °
„Components  what are they, how to run them
‹NCM theory
‹NCM exercises
„Packaging
Disclaimer:
This is not a full quattor tutorial, but an introduction to the NCM framework. In particular, neither CDB/pan, nor SWRep/SPMA, nor AII are covered. A basic understanding of the PAN language is recommended.
‹Preparation
Contents
r toatQutotuM NCeG lairnaC.namrcio@cern.ch-n° 3
‹Run the setup script:
„~n/mct-turoai/lh.suptes_lairotut/nib
„should print[OK]
„cd ~
‹Please download the following tar.gz file, and uncompress it in your $HOME directory (~root):
„tar xvfz ncm-tutorial.tgz
„wget-n/mcls/coria0404ern-atnemucotut/noit/qchn.er/dorttuatpht/c:/ tutorial.tgz
‹Login onto your worker node (see whiteboard) asroot
Preparation
EXPr NCM tuQuattoeGmrnaC.otirla .crnn°h-cianceo@4 
Node Install
Mgmt API ACLs
NCM environment
CCM
Client Nodes
CDB
SWRep Servers
Notification
SPMA
Mgmt API ACLs
AII server
Node (re)install?
handling DHCP handling
KS/JS generator
packages (RPM, PKG)
‹Components can be run „manually „via hooks (cron, boot time, etc) „via CERN-CCs notification framework (notd) „ydekocasu iano tamitacll:fngrierguitsatoeir  ntnheeritr interest in codna teg  s ie sortrubs,eed(sieg s dtabaelechan of CCN-ER C) inv
‹to define configuration dependencies between componentsPossible „Eg. configurenetworkbeforesendmail „ontts wonenComps  icyen)ndpeed-erp a fi nur unsatisfied(eg. failing prerequisite component
‹Use standard system facilities (SysV scripts) formanagingservices „Components can notify services using SysV scripts when their configuration changes.
‹features or LCFG objects) are responsible forComponents (like SUE updating local config files, and notifying services if needed
‹Components do onlyconfigurethe system conf „/Uestucal/lsy,s htdhisciomnfpliig)giifel se(.g nitarenero/dna ginatpd ul calog  reges _
What are components? (1/2)
toatNCr tuM ritouQo@cern.ch-n° 5la eGmrnaC.naic
mreG laicnaC.naNCr toatritotuM uQo@cern.ch-n° 6
‹Components are written as Perl OO class instances
What are components? (2/2)
‹Each component has to provide two methods:
‹Unconfigure():
‹Configure():
„Optional method most of the components wont need to implement it.
„invoked when a component is to be removed
„Mandatory method
„invoked when there was a CDB configuration change or on startup
hcn- °7oic@re.nman.Cancial Ger
„Monitors the config profile, and invokes registered components viancm-ncdif there were changes
‹cdispd(Configuration Dispatch Daemon)
‹ncm-query
„examining configuration information as cached on theTool for node
How to run components?
„dependency ordering of components
„framework and front-end for executing components (via cron, cdispd, or manually)
‹ncm-ncd(Node Configuration Deployer):
„not described in this tutorial.
QCM tutoruattor N
8 rn.ch-n°ancio@ceC.namreG lairottuM NCr toatQu
my $arch=$config->getValue('/system/architecture); #NVA API
#notify affected (SysV) services if required
if ($changed) {
#(re)generate and/or update local config file(s)
open (myconfig,/etc/myconfig); 
my ($self,$config) = @ ; _
$self->Fail (not supported") unless ($arch eq i386);
system(/sbin/service myservice reload); 
#access configuration information
sub Configure {
}
}
Component (simplified) example
‹Most popular methods:
‹allows to access the node profiles configurationThis library (hierarchical structure)
„if ($config->elementExists($path)) {} else {}
„$value=$config->getValue(/system/;v/lenrek)noisre
„$element=$config->getElement($path); while ($element->hasNextElement()) { my $newel=$element->getNextElement(); ... }
NVA API: configuration access library
Components and CDB profile access
uaQortt °n-hc.n9t tuN MC lGroain.Caerma@cerncio
‹Reporting functions: „$self->log(@array):write @array to components log file „$self->report(@array):write @array to log and stdout. „$self->verbose(@array), $self->debug(level,@array):verbose/debug output
Component support libs
‹Advanced support libraries available (revamped from CERNs SUE): „Configuration file manipulation „Advanced file operations „Process management „Exception management libraries See /opt/edg/lib/perl/LC for details 
Failures of reconfigurations are done using error(..). Components depending on a failed component arenotexecuted.
„$self->warn(@array):writes a[WARN]message, increases # of warnings „$self->error(@array):writes an[ERROR]message, increases # of errors
Quattor NCMtut airoG lamreCan.ioncer@cchn.10-n° 
turoMCt Greai lQor Nuattre.noic@aCcnam.n° 11ch-n
‹ncm-state (/usr/lib/perl/NCM/Components/state.pm)
„Updates a local configuration file(/etc/state.desired) with the nodes production state (production, standby, etc.)
Real component walktrough
  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents