[AlternC-dev] Re: Lot Dev, Vol 44, Parution 12

Retour à l'archive de la liste
Le site d'AlternC
Google Custom Search

Lunar lunar at anargeek.net
Ven 8 Déc 14:48:02 CET 2006

Le vendredi 08 décembre à 13:14 +0100, Lunar écrivait:
> Et p'tet que puppet [2], plus récent, serait encore plus intéressant à
> regarder.
> [2] http://reductivelabs.com/projects/puppet/

Je confirme !

Extrait du document « How it works » [1] :

  Configuration Phase 1: Comparison

  Before Puppet does any work at all, it compares its entire
  configuration to the state on disk (or in memory, or whatever). To do
  this, it recursively iterates across the tree of Puppet::Type
  instances (which, again, still roughly maps to the class structure
  defined in the manifest) and calls evaluate.

  Things are a bit messier than this in real life, but the summary is
  that evaluate retrieves the state of each object, compares that state
  to the desired state, and creates a Puppet::StateChange object for
  every individual bit that's out of sync (e.g., if a file has the wrong
  owner and wrong mode, then each of those are in separate StateChange
  instances). The end result of evaluating the whole tree is a
  collection of StateChange objects for every bit that's out of sync,
  all sorted in order of dependencies so that objects are always fixed
  before the objects that depend on them.

  Configuration Phase 2: Syncing
  The transaction's job is just to execute each change. The changes
  themselves are responsible for logging everything that happens (one of
  the reasons that all work is done by StateChange objects rather than
  just letting the objects do it is to guarantee that every modification
  is logged). This execution is done by calling go on each change in
  turn, and if the change does any work then it produces an event of
  some kind. These events are collected until all changes have been

  Once the transaction is complete, all of the events are checked to see
  if there are any callbacks associated with them.

[1] http://reductivelabs.com/projects/puppet/documentation/howitworks.html

À peluche,
Lunar                                               http://anargeek.net/
   ·-|-·dans un data-center personne ne vous entendra crier·-|-·
                                                  weather: Broken clouds
Dijon                                                temp: 11.0 C
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: signature.asc
Type: application/pgp-signature
Taille: 189 octets
Desc: Digital signature
URL: <http://lists.alternc.org/arch/dev/attachments/20061208/644469d0/attachment.pgp>

Plus d'informations sur la liste de diffusion Dev