2011/3/10 David Lee <david....@ecmwf.int>:
> Sorry, Mark.  Yes, there was an element of letting off steam, partly
> because I'm still struggling, despite significant cf-2 experience, to
> get my poor little head around cf-3.  (I could really, really do with a
> "cookbook";  and with step-by-step definitions and examples.  The
> definitions and descriptions of cf-3 concepts such as bundles and bodies
> and components etc. seem to be incomplete or fuzzy.  (And half the
> battle is that I don't even know how frame the questions that I should
> be asking, so I don't know even what to ask.)

Well, in general "body" and "bundle" are just two different types of
parsers. They are documented in short here:

http://www.cfengine.org/manuals/cf3-reference.html#Containers

The generalized bundle syntax is:

bundle bundle_type bundle_name
{
 section_name:
      class_expression::
            "promise"
                      option_name => option_value,
                      option_name => option_value;
}

Here bundle_type can be:
- server -- there's only one such bundle, its bundle_name is
access_rules(), and it provides permissions setup for cf-serverd.
- common -- a special kind of bundle which doesn't need to be included
into the bundlesequence 'cause common bundles are read before
bundlesequence starts. Common bundles are read on the server side,
too, so they can be used to declare global variables and classes both
for cf-agent and for cf-serverd.
- agent -- any bundle included into bundlesequence directly (via body
common control) or indirectly (via usebundle in methods).
- edit_line -- a special kind of bundle used to provide bundle parser
for file editing promises.

The following section names apply for bundle agent XXXX:

vars
classes
packages
methods
files
processes
commands
reports

The following section names apply for bundle edit_line XXXX:

vars
classes
delete_lines
insert_lines
field_edits
replace_patterns

The generalized body syntax is:

body body_type body_name
{
  class_expression::
       option_name => option_value;
}

Bodies are used to hide complex details of promises options, except
for control bodies which define execution flow for Cfengine parts. One
special body defines the whole processing flow for cf-agent:

body common control
{
 bundlesequence => { ... };
}

Option names and values depend on the relevant section and/or body
type. If a bundle or a body is called by a promise, the option_name
refers to the bundle or body type (e.g. edit_line or package_method)
and option_value contains its name:

packages:
    "foo"
       package_method => rpm;

Hope, it helps.

>
> The arrival of the "services" concept in cf-3 sounds absolutely right
> and good, and makes better sense, as a higher-level abstraction, in many
> cases than dabbling the a service's underlying processes.   But then the
> documentation leads me to believe that "services" is not available for
> me in the current community edition.
>
> (I'm familiar with some OSS products having commercial siblings, for
> instance CentOS/Redhat sendmail.org/sendmail.com.  And I'm happy with
> that, usually because the commercial one is adding support; and where it
> is adding actual functionality, that tends to be relatively at the edges
> rather than in the core.  In "cfengine" it struck me that this
> potentially excellent "services" concept felt core (hence, OSS).
> especially as it is simply another subpoint in simply another subsection
> of the documentation: Ref Manual 7.15.)
>
> Anyway, I'll see what I can do with processes.  And if there is an RPM
> of the new "process_stop" under "-n" fix, I'll test that.  And I'll try
> to come up with some well-framed questions, and positive suggestions for
> documentation.
>
> Thanks.
>
> --
> David Lee
>
>
> Mark Burgess wrote:
>> David,
>>
>> if by open source you mean "free beer" then, your worst fears are
>> confirmed. There is a paid version of cfengine, and it is better than
>> the free one! (The audacity!) However, it is still apparently free to
>> let off steam, which seems to be your main aim here.
>>
>> In fact services were introduced for the Windows version, and have not
>> yet been implemented on Unix at all (since one has a perfectly good
>> processes abstraction). The error message as such is misleading, since
>> it is the Windows version of Cfengine which is Nova only. I expect you
>> find that more acceptable.
>>
>> Mark
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@cfengine.org
> https://cfengine.org/mailman/listinfo/help-cfengine
>



-- 
SY, Seva Gluschenko.
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to