Here is a semi-related thought.
Without regard for memory consumption, but rather due to the notion that
system-wide, manageable, canonical mechanisms are better than
app-specific mechanisms, I would prefer that Puppet did not have a
daemon mode, scheduler, sleep-N-minutes mechanism etc., at all; but
rather that the Puppet install process set it up in cron. Of course I
can set it up that way myself, but what I wish was that Puppet didn't
carry the burden of its own mechanism: no code for it, no command line
options, no init.d script, no wiki pages about it, no discussion of it, etc.
(I'm sure there is a good reason it made sense at the time, and
nonetheless I like Puppet a lot, I continue to be a fan of Puppet!)
--
Kyle Cordes
http://kylecordes.com
Ohad, I have been doing some thinking about this as well. I can
definitely see situations where I need a "cap shell" type of approach
to push a single change or something else, but usually those are for
administration needs.
Now feel free to correct me if I am wrong, but puppet's whole goal is
to alleviate you from having to perform those mundane tasks. Again as
I see it, if you cant wait a few minutes for changes to go out, then
well, its obviously an emergency and usually the best route is direct
access.
My next question is, is there a way you can enable listen on the
clients, define a schedule that keeps puppet from running (hack hack
hack) and then cron/schedue things on the puppetmaster side to do
puppetrun against "groups" of clients you have in a classification
tool or something.
Anyway, food for thought.
Also, whatever happened to that cobbler/puppet related tool you were
talking about a few months back?
for hosts in `puppetca --list --all | grep ^+ | cut -d ' ' -f 2`
do
ssh $hosts sudo puppetd -vt
done
but a push architecture is significantly more security vulnerable...
on the bright side though, if your central configuration host is
compromised, it being able to ssh to hosts is the least of your
worries (why attack individual hosts if you have the master key?)
> sure, I know / do this, but I though that one of the goals of puppet
> is to avoid ssh and a for loop.... but seriously, what happens if ssh
> doesn't work? ( I mean, usually you need push when something is
> broken)
>
> or you need to deploy something only on a subset of machines, restart
> a service, or whatever?
dsh -- http://www.netfort.gr.jp/~dancer/software/dsh.html
Granted, it only works if ssh does, but it does let you shell to
pre-defined groups of systems, arbitrary lists of machines, and
optionally run them concurrently.
Some sharper person than me might work up a clean way of managing the
dsh configuration files with exported resources -- one file containing
all machines managed by puppet in /etc/dsh/machines.list and/or
/etc/dsh/group/all, another file per group of systems identified by
hostgroup (
http://reductivelabs.com/trac/puppet/wiki/Recipes/HostgroupFact ) into
/etc/dsh/group/${group}, etc.
--
Mike Renfro / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- ren...@tntech.edu
I'll go a little deeper than before i think:
Push vs pull - push requires each host to be accessible to a central
service. The connection from each host will likely need to pass
through multiple barriers such as network firewalls, on host
firewalls, hosts allow (if tcpwrapped). There are also issues of
multiple security zones. One might argue that a centralized
configuration management host should be isolated and of the highest
security. Alas the powers that be have been known to keep this host(s)
on unfirewalled networks with unpatched on host firewalls.
Push is undesirable because the high cost to deploy, each firewall,
each host need to be configured to allow the connection. Which means
any migration (software or IP) may entail serious effort just for
access rights. Also push means that even though as Ohad pointed out
the manifest is the thing that will / can compromise each host, a pull
can be scheduled. Most people probably run hourly cycles. Maybe
offsetting production and development hosts (do you want a change to
appear quicker or slower on a prod host?) or having tiered solutions
with a puppet server for prod and another for dev. Regardless, pull
does give the illusion of control because each client needs to ask for
the change. So if you are diligent your entire range of hosts won't go
down the drain in one go. (we interpret cf in cfengine as cluster f**k
for a reason).
Push on the other hand implies each host gets the same change at the
same time. And even if you're tiered you can still do a lot of damage.
So i suggest this: given your need to be able affect each host
instantaneously,
1) why not have a second instance of puppet (i don't know if you can
run two on the same host though) for urgent things only, and query the
different instances at different intervals.
2) have a fact that based on time sets the urgency of your modules, so
your regular modules only trip every hour, and your urgent ones
straight away. So say have the fact check the time, and if it's 30
past the hour it does the regular changes, every minute does urgent
and every (seventh) day at midnight does the ultra rare?
regardless, tune your updates to happen every minute. The minutely
urgent modules should run quickly and all the other ones that evaluate
your fact as meaning they don't need to run should be fast, so your
urgent change should probably run alone, and after 10 minutes you just
change the urgency. I'd probably have a central file that sets the
urgency value for each module, so making the change, updating the
variable in the central file and a daemon restart later you have 1
minute to pray you didn't screw up what you're meaning to fix :).
Heck, you could even have a clever cronjob that runs on the
puppetmaster that checks the file for urgency variables, and 3 minutes
after having been touched it replaces it with the non-emergency one
and restarts puppetmaster if needed...
But implementing push ... you're playing with fire mate :)
What xinetd version?
-L
--
Larry Ludwig
Reductive Labs
What xinetd version?
That would be great.
Helmut
--
-------------------------------------------------------------------------
Helmut Lichtenberg <Helmut.Li...@fli.bund.de> Tel.: 05034/871-128
Institut für Nutztiergenetik (FLI) 31535 Neustadt Germany
-------------------------------------------------------------------------
> I think I'll enhanced my mini puppet listener script and post it if anyone
> would be interested...
that would be great. Maybe it's even something for the contrib directory?
cheers pete
cheers,
Ohad
>
> Ohad Levy wrote:
>> puppetrun, and as we don't run puppetd as a daemon (running it from
>> cron
>> due to large memory consumption while idle), I went forward and
>
> Here is a semi-related thought.
>
> Without regard for memory consumption, but rather due to the notion
> that
> system-wide, manageable, canonical mechanisms are better than
> app-specific mechanisms, I would prefer that Puppet did not have a
> daemon mode, scheduler, sleep-N-minutes mechanism etc., at all; but
> rather that the Puppet install process set it up in cron. Of course I
> can set it up that way myself, but what I wish was that Puppet didn't
> carry the burden of its own mechanism: no code for it, no command line
> options, no init.d script, no wiki pages about it, no discussion of
> it, etc.
The code around being a daemon is a very, very small amount of code,
especially given that the server needs to be a daemon anyway.
And I have to admit that the reasons for puppetd being a daemon are
less valid than I'd hoped - in particular, the 'resource' API is
powerful and potentially really useful, with the right central tools.
I do hope we'll be making them more valid and more useful in the next
year or so, but I have lots of hopes and not enough time for them all.
In the meantime, it's easy enough to skip the daemon mode.
--
The hypothalamus is one of the most important parts of the brain,
involved in many kinds of motivation, among other functions. The
hypothalamus controls the "Four F's": 1. fighting; 2. fleeing;
3. feeding; and 4. mating.
-- Psychology professor in neuropsychology intro course
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com
Maybe I'll do that next time I repackage a new version.
(Or maybe, and this is a dream rather than a request, the good folks
working on the official Debian packaging will decide that running it in
cron via a file in /etc/cron.whatever is more genuinely Debianish, and
they'll set it up that way.)
I'd much prefer you cron folks keep configuring it manually :-P I
*like* Puppet as a daemon, leave the Debian package alone!
(only half kidding)
--Paul