[rudder-users] Class definition

Francois Armand francois.armand at normation.com
Thu Mar 20 15:25:56 CET 2014


On 17/03/2014 23:51, Chris wrote:
>
>>> I'm a bit stuck trying to see if I can migrate our current cfengine
>>> classes to rudder.  Right now with cfengine, I can define classes
>>> based on arbitrary commands.  For instance, because of
>>> https://cfengine.com/dev/issues/3420, I have to use a module to
>>> define classes based on network location.  This is quite useful. 
>>> While I know rudder will let you run a command to set variables, I'm
>>> not exactly sure how I would use this to define classes.  Is there
>>> any way to make a dynamic group based on the output of a command?
>
>> For you specific use case about network, you can create group based on
>> network interface (we use inventory information returned by Fusion
>> Inventory, hence we are not suffering from the CFEngine bug you list).
>>
>> On the more general use case, you can create groups based on
>> environment variables within Rudder. So you could have environnement
>> variables defined ad hoc for your needs, and use them to create groups
>>
>> does it help ?
>
> 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.

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 ?



>
> 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.

Thanks,


-- 
------------------------------------------------------------------------
*François ARMAND*
/Directeur de la R&D/
Normation <http://www.normation.com>
------------------------------------------------------------------------
*87 rue de Turbigo, 75003 Paris, France*
Telephone: 	+33 (0)1 83 62 99 23
Mobile: 	+33 (0)6 63 37 60 55
------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20140320/f064284f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sig-normation-logo-square.png
Type: image/png
Size: 3503 bytes
Desc: not available
URL: <http://www.rudder-project.org/pipermail/rudder-users/attachments/20140320/f064284f/attachment.png>


More information about the rudder-users mailing list