[rudder-dev] A command to manage rudder agent (and then server)

Benoit Peccatte benoit.peccatte at normation.com
Tue Nov 25 10:19:42 CET 2014


Le 25/11/2014 01:16, Jean Rémond a écrit :
> Hello guys,
Hello Jean,

> Here are my 2 cents for the command-line :
> - make the help available from any argument and coherent, ex : "rudder
> agent help" and "rudder help agent" should return the same information

Already done :)

> - standardize debug flag (-d and/or --debug  for example) and make it
> applicable through all levels (any nested script should respect debug
> flag)
> - it does exist so : do NOT use information from headers inside the
> script, it mixes comments and code logic (see Debian apache2 modules
> dependencies or LSB init script)

We use them for documentation, like a lot of language do with
annotations This is useful to keep the help data on the sub-command side
without having to run them all the time. 


> - be careful to any dependency added (rsync for example in the pull
> request)

Well spotted, we try to add as few dependencies as possible on the
client side, we will replace rsync with something else.


> - standardize common flags for each script so external contributions
> will be homogeneous (-d for debug, -v for verbose, etc)

I agree that it is a good thing to standardize the meaning of some flag.
However, I think it's too burdensome to guarantee their existence on
every sub-command.


>
> Jean

Benoît

>
>
> On Fri, Nov 21, 2014 at 11:59 AM, Francois Armand
> <francois.armand at normation.com <mailto:francois.armand at normation.com>>
> wrote:
>
>     Hello guys,
>
>     In Rudder 3.0, we want to add a command to manage Rudder Agent.
>     The main idea is to let the user have an unique entry point to do
>     all the common stuff (running the agent now, in debug, updating
>     its policies, sending an inventory, etc) with a sensical and
>     harmonized naming scheme.
>
>     So, that's for the big picture, now for some more ideas we wanted
>     to share to get feedback early, because, well, we really want to
>     make the Rudder user life easier, so it seems to make sense to ask
>     what they are thinking about that :)
>
>
>     *Main goals for now:*
>
>       * we have a main command with (at least) two sub-context (agent
>         and server) allowing to interact with these components
>       * the main cli must be an an extensible command wrapper so that
>         it is esay to add new command
>       * each command should be writtable in any language (shell and
>         python come to mind)
>       * the commands should be discoverable from the cli without any
>         other reference outside
>           o (I refreigned to use intuitive, but its behavior really
>             must seem natural and logic for any sysadmin used to unix)
>           o we have convention about the behavior of sub-command so
>             that there is little suprise from one to an other (not git
>             like :)
>           o each sub-command embed a description of its goal so that
>             it's easy to display a summary at the top level
>
>
>
>     *Current state and technical details:*
>
>     We have a proto working for the agent and a very little subset of
>     commands. The code will be available in repo
>     https://github.com/Normation/rudder-agent (you can already look at
>     the Pull Request: https://github.com/Normation/rudder-agent/pull/1)
>
>     There is two main items:
>
>       * a directory (/opt/rudder/share/commands) containing individual
>         commands, organized as follow:
>           o each command is in its own executable file
>           o the file has the naming scheme: [agent|server]-cmd_name
>           o the file contains an header with the command description
>       * the (python) "rudder" command, that will be located in
>         "/opt/rudder/bin/rudder", and is just a wrapper with the
>         following behaviour:
>           o "rudder" => display the general info, let know that you
>             can call "rudder [agent|server|help]
>           o "rudder agent" or "rudder server": list all commands in
>             /opt/rudder/share/cli with the correct prefix and for each
>             of them, display its description.
>
>
>     The current implemented commands are only on rudder agent for now:
>
>       * rudder agent enable / disable
>       * rudder agent reinit
>       * rudder agent reset
>       * rudder agent inventory
>       * rudder agent run
>       * rudder agent update
>
>     Hopefully, others will follow - and any feedback on that is
>     warmlly welcomed !
>
>     Cheers,
>
>     -- 
>     ------------------------------------------------------------------------
>     *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
>     <tel:%2B33%20%280%291%2083%2062%2099%2023>
>     Mobile: 	+33 (0)6 63 37 60 55
>     <tel:%2B33%20%280%296%2063%2037%2060%2055>
>     ------------------------------------------------------------------------
>
>
>     _______________________________________________
>     rudder-dev mailing list
>     rudder-dev at lists.rudder-project.org
>     <mailto:rudder-dev at lists.rudder-project.org>
>     http://www.rudder-project.org/mailman/listinfo/rudder-dev
>
>
>
>
> _______________________________________________
> rudder-dev mailing list
> rudder-dev at lists.rudder-project.org
> http://www.rudder-project.org/mailman/listinfo/rudder-dev


-- 
------------------------------------------------------------------------
*Benoît PECCATTE*
/Responsable cloud development/
Normation <http://www.normation.com>
------------------------------------------------------------------------
*87, Rue de Turbigo, 75003 Paris, France*
Phone: 	+33 (0)1 85 08 48 96
------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-dev/attachments/20141125/574bbaaf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 3503 bytes
Desc: not available
URL: <http://www.rudder-project.org/pipermail/rudder-dev/attachments/20141125/574bbaaf/attachment-0002.png>
-------------- 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-dev/attachments/20141125/574bbaaf/attachment-0003.png>


More information about the rudder-dev mailing list