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

Francois Armand francois.armand at normation.com
Fri Nov 21 17:59:36 CET 2014


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
Mobile: 	+33 (0)6 63 37 60 55
------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rudder-project.org/pipermail/rudder-dev/attachments/20141121/a82dd145/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/20141121/a82dd145/attachment.png>


More information about the rudder-dev mailing list