Changes between Version 1 and Version 2 of AnnotatedExamples


Ignore:
Timestamp:
06/27/06 11:22:54 (15 years ago)
Author:
desai
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • AnnotatedExamples

    v1 v2  
    6262 </Base> 
    6363}}} 
     64 
     65=== create a bundle === 
     66 
     67The above configuration layout works fine for a single service, but 
     68that method of organization would quickly become a nightmare as you 
     69approach the number of packages, services, and config files required 
     70to represent a fully configured host.  Bundles allow the grouping of 
     71related configuration entries that are used to provide a single 
     72service. This is done for several reasons: 
     73 * Grouping related things in one place makes it easier to add those 
     74   entries for a multiple groups of clients 
     75 * Grouping entries into bundles makes their validation occur 
     76   collectively. This means that config files can override the 
     77   contents of packages. Also, config files are rechecked after 
     78   packages are upgraded, so that they can be repaired if the package 
     79   install clobbered them.  
     80 * Services associated with a bundle get restarted whenever any 
     81   entity in that bundle is modified. This ensures that new 
     82   configuration files and software are used after installation. 
     83 
     84The config file, package, and 
     85service are really all related components describing the idea of an 
     86ntp client, so they should be logically grouped together.  We use a 
     87bundle to accomplish this. 
     88 
     89{{{ 
     90 # cat Bundler/ntp.xml 
     91 <Bundle name='ntp' version='2.0'> 
     92 <Package name='ntp'/> 
     93 <Service name='ntpd'/> 
     94 <ConfigFile name='/etc/ntp.conf'/> 
     95 </Bundle> 
     96}}} 
     97 
     98After this bundle is created, it must be associated with a group (or 
     99groups). Add a bundle child element to the group(s) which should install this bundle.  
     100 
     101{{{ 
     102 # cat Metadata/groups.xml 
     103 <Groups> 
     104... 
     105 <Group name='fedora'> 
     106   <Bundle name='ntp'/> 
     107 </Group> 
     108... 
     109 </Groups> 
     110}}} 
     111 
     112Once this bundle is created, a client reconfigure will install these 
     113entries. If any are modified, then the ntpd service will be 
     114restarted. If you only want ntp configurations to be updated (and 
     115nothing else), the bcfg2 client can be run with a -b <bundle name> 
     116option that will only update entries in the specified bundle.