[rudder-users] rudder plugin

Vincent Membré vincent.membre at normation.com
Wed Nov 27 16:24:44 CET 2013


Hello guys,

answers below:

Le 27/11/2013 16:08, Francois a écrit :
> On 27/11/2013 12:06, Joachim.Setzer at t-systems.com wrote:
>>
>> Dear Francoid.
>>
>> Thanks for your response
>>
>> Yes You understand me right (I will try to explain my Ideas a little 
>> bit more below)
>>
>
> Answer in line!
>
>> Kind regards / Mit freundlichen Grüßen
>> Joachim Setzer
>>
>> T*-Systems*International GmbH
>> System Engineer
>> Application Service Center Standard Software Automotive + 
>> Manufacturing Industry Application Service Factory, Technology Line 
>> Standard Software
>>
>> *Von:*Francois Armand [mailto:francois.armand at normation.com]
>> *Gesendet:* Mittwoch, 27. November 2013 11:04
>> *An:* Setzer, Joachim; rudder-users at lists.rudder-project.org
>> *Betreff:* Re: [rudder-users] rudder plugin
>>
>> On 26/11/2013 15:43, Joachim.Setzer at t-systems.com 
>> <mailto:Joachim.Setzer at t-systems.com> wrote:
>>
>>     Hi All,
>>
>>     was anyone a hint (or a tutorial) to extend rudder ?
>>
>>     We need to check that for example oracle client is installed in
>>     the right version
>>
>>     For this fusion-inventory should check if it is installed in the
>>     right version
>>
>>     For this we need to extend fusion-inventory, too
>>
>>     We also want to have an addition collumn / section at the host in
>>     rudder gui where we see the information about
>>
>>     Oracle client installation (path, version, installdate.....)
>>
>>     Can anyone help ?
>>
>>     Kind regards / Mit freundlichen Grüßen
>>     Joachim Setzer
>>
>>
>> Hello Joachim,
>>
>> As I saw your ticket 
>> http://www.rudder-project.org/redmine/issues/4195, you are already 
>> aware of the plugins in Rudder.  And you are right, contrary to new 
>> Techniques, these plugins are intended to extends Rudder web 
>> interface with new functionnality, or view.
>>
>> For the record, the base plugin example to build new UI plugin is 
>> here: https://github.com/Normation/rudder-plugin-helloworld/
>> àI have tried to download and compile it, but it will not work (In 
>> case of this I have opened the redmine ticket)
>> (I hope this was the correct way ?)
>>
>
> We do saw that and it's already corrected in trunk version of each 
> relevant branches. Thnaks for reporting!
>
>>
>> Now, for you case: I f I understand correctly, you wand to:
>>
>> 1.add some more inventory data (oracle client installed version),
>>
>> othat means extending Fusion Inventory
>>
>> àyes, right, I did it successfully with your tips yesterday (thanks 
>> again for the hint)
>>
>
> Great
>
>> 2.store that data in Rudder,
>>
>> othat needs extending the stored inventory information and add the 
>> logic to know how to handle them
>>
>> àI think so, (I will try to understand the code) -- At the moment I'm 
>> new in scala, I nahve perl, bash, C(++) and Java Knowledge (but I try 
>> to learn scala, too J)
>>
>
>
> For now, nothing is built-in for easy extension, so when you feel like 
> you are ready to start that, don't hesitate to ask for help and 
> description of Rudder internals .

Another idea would be to create have a module in fusion inventory that 
add *oracle-client* in the <SOFTWARE> section of the inventory.

Rudder would be able to handle those information directly, so you don't 
have to modify anything in Rudder inventory process.

At the moment we use only 4 fields in that structure (NAME, VERSION, 
COMMENTS, PUBLISHER), that may more limited than what you need.

Maybe you could use comments to store some other information you need.

After that, you would only have to extends the node details to display 
the information about the software you want.

If that approach pleases you, don't hesitate to ask questions :)
>
>
>>
>> 3.be able to query it so that you can know what nodes have an oracle 
>> client installed, and in which version,
>>
>> othat means extendings the data model to know how to handle queries 
>> on Oracle client
>> àI found out that only a few attributes where stored in LDP after 
>> rudder gets them from FusionInventory
>> àI'm looking for a way to extend this, too
>>
>
> Same as the previous point :)
>
>> 4.display that data on node details
>>
>> othat is an UI extension, using the precedent steps
>>
>> àFor this I will need a plugin, is that right ?
>>
>
> Yep.
>
>> Unfortunatly, as of today, the plugins possibility are only on UI 
>> extension and displaying existing datas, not storing new datas along 
>> with other inventory one. Or the data "provisionning" need to be also 
>> handled by the plugin (for example, a plugin building it's own 
>> database from API requests to other software, or whatever).
>> àok I understand
>>
>>
>> So you need implies some modification of Rudder internals, and may be 
>> hard - or at least involves quite a bit of Scala coding, plus 
>> understanding of Rudder internal architecture. If you want to go that 
>> path, we will help you as much as we can, and also try to find way to 
>> have your contributions integrated in Rudder.
>> àthanks for your help, I will try to understand the code first, and 
>> later I hope that I can present a way to fit my requirements
>>
>> As that may seems a little deceptive, I still have a workaround for 
>> your use case. It seems that what you are after (in part, at least) 
>> is checking Oracle client installation compliance with some company 
>> rules. And that clearly looks like a job for Rudder!
>> So, I'm thinking that a first step, far easier and shorter than 
>> building the full "oracle client installation plugin", could be to 
>> build a Technique whose goal would be:
>> àYes, I think so, too
>>
>> ·to check oracle client installation (perhaps configurable 
>> installation parameters, like path, etc)
>>
>> ·to check oracle client version (configurable version)
>>
>> ·optionnally, to correct bad installation or version with a new 
>> installation or update
>>
>> ·optionnaly, well whatever is needed for your teams.
>> àI will try to write the required techniques, Is there an example 
>> too, where I can start
>>
>
> The standard way to build a technique is to look at an existing one 
> similar to you need and start hacking from that base.
> "motd" Technique is what is the more alike an "hello world". For your 
> case, you could also look to a Technique installing a package, like 
> openssh one, to see how it is done, or you could adapt the "install 
> package" (deb or rpm) one to look how the version check could be done.
>
> Finally, that page will give you insight about the "metadata.xml" file 
> content: 
> http://www.rudder-project.org/foswiki/Development/TechniqueXML, but 
> don't hesitate to look to other entries in 
> http://www.rudder-project.org/foswiki/Technique/WebHome
>
> Well, and don't hesitate to ask for help !
>
>
>> Given that Technique, you could create Rules to check that a certain 
>> version of Oracle Client is correctly installed on a given group of 
>> nodes. And the integrated Rudder reporting will display node with 
>> uncorrect installation (and if you want handle the correction 
>> automaticaly).
>>
>> àThat sounds very good
>>
>>
>> Hope it helps and allows to see what alternatives are available!
>> àYes, thanks for your help again
>>
>>
>
>
> No problem, it's cool to see new things being attempted with Rudder!
>
>
>
> -- 
> Francois
>
>
> _______________________________________________
> rudder-users mailing list
> rudder-users at lists.rudder-project.org
> http://www.rudder-project.org/mailman/listinfo/rudder-users


-- 
------------------------------------------------------------------------
*Vincent Membré*
/Ingénieur R&D/
Normation <http://www.normation.com>
------------------------------------------------------------------------
*87 rue de Turbigo, 75003 Paris, France*
Telephone: 	+33 (0)1 84 16 06 00
Mobile: 	+33 (0)6 10 14 76 78
------------------------------------------------------------------------

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


More information about the rudder-users mailing list