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

Jean Rémond remond.jean at gmail.com
Tue Nov 25 01:16:25 CET 2014


Hello guys,

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
- 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)
- be careful to any dependency added (rsync for example in the pull
request)
- standardize common flags for each script so external contributions will
be homogeneous (-d for debug, -v for verbose, etc)

Jean


On Fri, Nov 21, 2014 at 11:59 AM, Francois Armand <
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
>       - (I refreigned to use intuitive, but its behavior really must seem
>       natural and logic for any sysadmin used to unix)
>        - we have convention about the behavior of sub-command so that
>       there is little suprise from one to an other (not git like :)
>       - 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:
>       - each command is in its own executable file
>       - the file has the naming scheme: [agent|server]-cmd_name
>       - 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:
>       - "rudder" => display the general info, let know that you can call
>       "rudder [agent|server|help]
>       - "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
> Mobile: +33 (0)6 63 37 60 55
> ------------------------------
>
> _______________________________________________
> rudder-dev mailing list
> rudder-dev at lists.rudder-project.org
> http://www.rudder-project.org/mailman/listinfo/rudder-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-dev/attachments/20141124/f02217ae/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-dev/attachments/20141124/f02217ae/attachment.png>


More information about the rudder-dev mailing list