[rudder-users] Class definition
Chris
lists at deksai.com
Tue Mar 25 02:27:07 CET 2014
> >
> > Yes, I think I could work around quite a few things with environment
> > variables. If I were to get really desparate though, do you have a
> > rough idea of how much work it would be to add hooks to inject generic
> > information to the inventory? I see that I'd either have to add to
> > the ldap schema or abuse other generic attributes, and add methods to
> > the "addInformationsToInventory" bundle. It looks like I'd have to
> > work on endpoint/upload, but haven't made it any further than that.
> > This would allow someone to emulate defining classes inside cfengine,
> > and emulate the resulting cf-hub knowledge that came from it.
>
> Your need seems to be a quite relevant one, and if you like to, I would
> be really happy to help you design and implement something around that.
>
> Moreover, it seems to be a really neet feature for "cloud-init like"
> need. If we are able to put somewhere in the node some JSON file (for
> example, or simple key=value property like file), grab it in the
> inventory, use some of the key=value in the json to add the node to
> groups, that would be great !
>
> Could you open a ticket on that, assigning Jon (our product owner :) ?
> The goal would be to reach a least use cases and what is wanted in the
> ticket.
>
No problem. http://www.rudder-project.org/redmine/issues/4670
> On the other hand, I'm not sure what you mean by " This would allow
> someone to emulate defining classes inside cfengine etc". Do you mean
> that you want to somehow have these information translated into cfengine
> classes ? Or something else ?
>
If the information were used in the inventory and used to select which
rules to run, it wouldn't really need to translate into classes. What I
was after was something like what you can do in cfengine by
defining classes dynamically. Say you have something that looks at a
file, and defines a class based on what was in there. Then you could
later use that class to decide whether a promise applied to the box.
It is basically a way to group servers.
> >
> > Another question is how to trigger rules based on the outcome of other
> > rules. Perhaps I haven't looked closely enough, but is this possible
> > out of the box or does that require something custom to glue things
> > together?
> Do you have an example of what you need ? I'm not sure I understand what
> you need here.
I suppose it would map directly to something like 'classes => if_ok("no_problem")'.
It would be different than what I explained above because it wouldn't be
information you would want in inventory, and could change very quickly.
So a simple example would be restarting a service based on file changes.
As I understand it, a directive would need built in support to run
something after a change. I was wondering if there were a more free form way
to define dependencies.
More information about the rudder-users
mailing list