help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: server iteration


From: Tim Nelson
Subject: Re: server iteration
Date: Thu, 26 May 2005 11:52:11 +1000 (EST)

On Wed, 25 May 2005, Tod Oace wrote:

On May 24, 2005, at 21:01, Tim Nelson wrote:

An interesting idea, but I would still have to double my quantity of copy statements, yes? One set for the primary server and a second for the alternate. Or am I misunderstanding?

    That's why we need Templating in the next version of cfengine:
http://cfwiki.org/cfwiki/index.php/Templating_Ideas

    Warning; the above documents a number of different templating ideas.

Soooo... This seems like it could be a useful short-cut for defining copy attributes, but I'm not seeing how it would handle failover. The way copy works today I have to define a second copy action for each copy triggered by a failover= class. Would copy templates do all that? And define AddInstallable if that's still needed?

It still seems useful even if it doesn't address my failover problem, although I think I would be equally happy with a DefaultServer global variable. I specify "server=${server}" for all but a couple of my copy statements. And I really don't mind making owner=, group= and mode= very explicit with each file/directory.

Oh, I think template= is more Cfengine-like than use_template=.
Like filter=.

        That one's not my idea, but I think it'd go like this:

Current setup:
------------------------------
copy:
        whatever::
                /filename
                        dest=/filename
                        mode=1234
                        owner=smurf
                        group=nonsmurf
                        define=foofoo

        whatever.foofoo::
                /filename
                        dest=/filename
                        mode=1234
                        owner=smurf
                        group=nonsmurf
------------------------------

Template setup:
------------------------------
copy:
        any::
                template_name=my_template
                        dest=/filename
                        mode=1234
                        owner=smurf
                        group=nonsmurf

        whatever::
                use_template=my_template
                        define=foofoo

        whatever.foofoo::
                use_template=my_template
------------------------------

        Supposedly simpler.

Naturally, I like the Action Templating one, as that's my idea :).

This seems...tricky. But potentially very powerful.

I'm essentially using Action Templating now, but I only have Post-Editing templating going now (that's even before Pre-copy). It was my solution to defining multiple almost-identical copy statements. I've basically packaged that up in cfengine-masterconf.

So I'll add one other idea to the pile.

What if you could embed Cfengine class rules and variables in the source file being copied? This seems very Cfengine-like. Describe what you want and Cfengine takes care of the rest. (It would still need to address the checksum problem.)

Hmm. Well, that sounds like a job for an improved Editfiles. You can find the Wiki page on that below:
http://cfwiki.org/cfwiki/index.php/Editfiles

Both the Templating and Editfiles pages are linked to from the Wishlist on the Wiki.

My basic approach is that I want lots of flexibility out of the system, and my approaches to both the Templating stuff and to Editfiles give that. I don't know how cfenginely they are, but Editfiles always seemed a bit different than the rest of cfengine, and my suggestion separates it from cfengine, while still allowing the same actions that are currently possible.

        :)

--
Tim Nelson
Server Administrator
WebAlive Technologies Global
Level 1 Innovation Building, Digital Harbour
1010 LaTrobe Street
Docklands, Melbourne, Vic, 3008
Phone: +61 3 9934 0812
Fax: +61 3 9934 0899
E-mail: address@hidden
http://www.webalive.biz/

"Your Business, Your Web, Your Control"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]