Changes between Version 7 and Version 8 of AnnotatedExamples


Ignore:
Timestamp:
06/01/10 05:44:38 (13 years ago)
Author:
http://fab.id.fedoraproject.org/
Comment:

minor changes

Legend:

Unmodified
Added
Removed
Modified
  • AnnotatedExamples

    v7 v8  
    88 
    99Here is a series of example configurations for bcfg2, each introducing another layer of functionality.   
    10  * After each change, run 'bcfg-repo-validate -v' 
    11  * Run the server with 'bcfg2-server -v' 
    12  * Update the client with 'bcfg2 -v -d -n'. (will not actually make client changes) 
     10 * After each change, run `bcfg-repo-validate -v` 
     11 * Run the server with `bcfg2-server -v` 
     12 * Update the client with `bcfg2 -v -d -n`. (will not actually make client changes) 
    1313 
    14 === package only === 
     14=== Package only === 
    1515 
    1616Our example starts with the bare minimum configuration setup.  We have a client, a profile group, a list of packages, and a base configuration. 
     
    1919 # cat Metadata/clients.xml  
    2020 <Clients version='3.0'> 
    21  <Client profile='fedora' pingable='N' pingtime='0' name='foo.bar.com'/> 
     21   <Client profile='fedora' pingable='N' pingtime='0' name='foo.bar.com'/> 
    2222 </Clients> 
    2323 
    2424 # cat Metadata/groups.xml  
    2525 <Groups version='3.0'> 
    26  <Group profile='true' name='fedora' toolset='rh'/> 
     26   <Group profile='true' name='fedora' toolset='rh'/> 
    2727 </Groups> 
    2828 
     
    3030 <Base> 
    3131 <Group name='fedora'> 
    32  <Package name='ntp'/> 
     32   <Package name='ntp'/> 
    3333 </Group> 
    3434 </Base> 
     
    3636 # cat Pkgmgr/packages.xml 
    3737 <PackageList type='rpm' priority='0'> 
    38  <Package name='ntp' version='4.2.0.a.20050816-11.FC5'/> 
     38   <Package name='ntp' version='4.2.0.a.20050816-11.FC5'/> 
    3939 </PackageList> 
    4040}}} 
    4141 
    42 === add service === 
     42=== Add service === 
    4343 
    4444Configure the service, and add it to the base. 
     
    4646 # cat Svcmgr/services.xml  
    4747 <Services priority='0'> 
    48  <Service name='ntpd' status='on'/> 
     48   <Service name='ntpd' status='on'/> 
    4949 </Services> 
    5050 
    5151 # cat Base/base.xml  
    5252 <Base> 
    53  <Group name='fedora'> 
    54  <Package name='ntp'/> 
    55  <Service name='ntpd'/> 
    56  </Group> 
     53   <Group name='fedora'> 
     54     <Package name='ntp'/> 
     55     <Service name='ntpd'/> 
     56  </Group> 
    5757 </Base> 
    5858}}} 
    5959 
    60 === add config file === 
     60=== Add config file === 
    6161 
    62 Setup an etc directory structure, and add it to the base. 
     62Setup an `etc/` directory structure, and add it to the base. 
    6363{{{ 
    6464 # cat Cfg/etc/ntp.conf/ntp.conf  
     
    6767 # cat Base/base.xml  
    6868 <Base> 
    69  <Group name='fedora'> 
    70  <Package name='ntp'/> 
    71  <Service name='ntpd'/> 
    72  <ConfigFile name='/etc/ntp.conf'/> 
    73  </Group> 
     69   <Group name='fedora'> 
     70     <Package name='ntp'/> 
     71     <Service name='ntpd'/> 
     72     <ConfigFile name='/etc/ntp.conf'/> 
     73   </Group> 
    7474</Base> 
    7575}}} 
    7676 
    77 === create a bundle === 
     77=== Ccreate a bundle === 
    7878 
    79 The above configuration layout works fine for a single service, but 
    80 that method of organization would quickly become a nightmare as you 
    81 approach the number of packages, services, and config files required 
    82 to represent a fully configured host.  Bundles allow the grouping of 
    83 related configuration entries that are used to provide a single 
    84 service. This is done for several reasons: 
    85  * Grouping related things in one place makes it easier to add those 
    86    entries for a multiple groups of clients 
    87  * Grouping entries into bundles makes their validation occur 
    88    collectively. This means that config files can override the 
    89    contents of packages. Also, config files are rechecked after 
    90    packages are upgraded, so that they can be repaired if the package 
    91    install clobbered them.  
    92  * Services associated with a bundle get restarted whenever any 
    93    entity in that bundle is modified. This ensures that new 
    94    configuration files and software are used after installation. 
     79The above configuration layout works fine for a single service, but that method of organization would quickly become a nightmare as you approach the number of packages, services, and config files required to represent a fully configured host.  Bundles allow the grouping of related configuration entries that are used to provide a single service. This is done for several reasons: 
    9580 
    96 The config file, package, and 
    97 service are really all related components describing the idea of an 
    98 ntp client, so they should be logically grouped together.  We use a 
    99 bundle to accomplish this. 
     81 * Grouping related things in one place makes it easier to add those entries for a multiple groups of clients 
     82 * Grouping entries into bundles makes their validation occur collectively. This means that config files can override the contents of packages. Also, config files are rechecked after packages are upgraded, so that they can be repaired if the package install clobbered them.  
     83 * Services associated with a bundle get restarted whenever any entity in that bundle is modified. This ensures that new configuration files and software are used after installation. 
     84 
     85The config file, package, and service are really all related components describing the idea of an ntp client, so they should be logically grouped together.  We use a bundle to accomplish this. 
    10086 
    10187{{{ 
    10288 # cat Bundler/ntp.xml 
    10389 <Bundle name='ntp' version='2.0'> 
    104  <Package name='ntp'/> 
    105  <Service name='ntpd'/> 
    106  <ConfigFile name='/etc/ntp.conf'/> 
     90   <Package name='ntp'/> 
     91   <Service name='ntpd'/> 
     92   <ConfigFile name='/etc/ntp.conf'/> 
    10793 </Bundle> 
    10894}}} 
    10995 
    110 After this bundle is created, it must be associated with a group (or 
    111 groups). Add a bundle child element to the group(s) which should install this bundle.  
     96After this bundle is created, it must be associated with a group (or groups). Add a bundle child element to the group(s) which should install this bundle.  
    11297 
    11398{{{ 
     
    122107}}} 
    123108 
    124 Once this bundle is created, a client reconfigure will install these 
    125 entries. If any are modified, then the ntpd service will be 
    126 restarted. If you only want ntp configurations to be updated (and 
    127 nothing else), the bcfg2 client can be run with a -b <bundle name> 
    128 option that will only update entries in the specified bundle. 
     109Once this bundle is created, a client reconfigure will install these entries. If any are modified, then the ntpd service will be restarted. If you only want ntp configurations to be updated (and nothing else), the Bcfg2 client can be run with a `-b <bundle name>` option that will only update entries in the specified bundle. 
    129110 
    130 == mysql example == 
     111== Mysql example == 
    131112 
    132113Author: Patrick Ruckstuhl 
    133114 
    134 I had some time ago to continue with putting my configuration into 
    135 bcfg2 and maybe this helps someone else. 
     115I had some time ago to continue with putting my configuration into Bcfg2 and maybe this helps someone else. 
    136116 
    137117I added a new bundle: