Project

General

Profile

« Previous | Next » 

Revision 30eecbde

Added by François ARMAND almost 7 years ago

Fixes #10675: new chapter for Rudder extension and integration

View differences:

30_basic_administration/30_plugins.txt
[[rpkg_plugin_management]]
=== Plugins
Rudder is an extensible software. The *Administration > Plugin Management*
43_advanced_administration/992_inventory.txt
==== Export to a spreadsheet
You can export the list of your nodes to a spreadsheet file (xls format) by using a
You can export the list of your nodes to a spreadsheet file (xls format) by using a
https://github.com/normation/rudder-tools/tree/master/contrib/rudder_nodes_list[tool] available in the rudder-tools repository.
Simple follow the installation instructions, and run it against your Rudder server.
......
You can easily modify the script to add other information.
==== Use the inventory in Rundeck
http://rundeck.org[Rundeck] is a tool that helps automating infrastructures, by
defining jobs that can be run manually or automatically. There is a
http://rundeck.org/plugins/2015/12/02/rudder-nodes.html[plugin] for Rundeck
that allows using Rudder inventory data in Rundeck.
==== Use the inventory in Ansible
There is an https://github.com/ansible/ansible/blob/devel/contrib/inventory/rudder.py[inventory plugin]
for Ansible that makes possible to use Rudder inventory (including groups, nodes,
group ids, node ids, and node properties) as inventory for Ansible, for example
for orchestration tasks on your platform.
==== Rundeck and Ansible
There are plugins for Rundeck and Ansible that can be used with each tool to make
them aware of inventory data from Rudder. For more information, see details in
the <<rudder_integration_in_infrastructure, Third party integration with Rudder>>
paragraph.
80_extension_and_integration/00_intro.txt
[[extending_and_integrating_rudder]]
== Rudder extension and integration with third party software
Rudder was thought from the begining to be a good citizen in you infrastructure.
Part of that good will intent is translated into the fact that everything is done
so that Rudder is able to inter-operate well with the other parts of your
infrastructure.
For that, there is two mains way of integrating Rudder with your
existing infrastructure components: you can either extend Rudder with plugins,
or you can extend your existing tools or process to take advantage of Rudder.
80_extension_and_integration/20_Rudder_plugins.txt
[[extending_rudder_with_plugins]]
=== Extending Rudder with plugins
Rudder can be extended with Plugins so that new features or API endpoints are
available in Rudder web application.
==== Rudder Plugin
A plugin is an archive in the `.rpkg` file format that can be manipulated with the
`rudder-pkg` command (see <<rpkg_plugin_management, Plugins Administration>>)
A Rudder plugin has full access to all Rudder internal APIs, datas, and process.
Its power is very large, but some care must be taken to ensure that the plugin
does not break Rudder main use cases.
That is why we prefer to build smaller plugin, adding only one feature, and
doing it in the least impacting way.
Here come a list of some plugin so that one can grasp the kind of feature that a
plugin can bring to Rudder:
===== Extending API: rudder-plugin-itop
Link: https://github.com/Normation/rudder-plugin-itop
This plugin was used to add new API endpoint dedicated to the integration with
https://www.combodo.com/itop-193[iTop CMDB software].
As of Rudder 4.0, the plugin is superseeded by Rudder Compliance API.
===== Adding information to node details: rudder-plugin-external-node-information
Link: https://github.com/Normation/rudder-plugin-external-node-information
This plugin allows to add new tabs in Rudder "node details" page and display
node specific files, stored in node-dedicated places. It also use a
self-managed and hot-reloading configuration of its properties.
===== Providing new authentication methods
Rudder plugins can be used to provide new authentication methods. There is no
open source version of such module, but at least a Radius Authentication Plugin
exists.
===== Providing a full new feature: rudder-plugin-datasources
Link: https://github.com/Normation/rudder-plugin-datasources
As we said, Rudder plugins can be quite powerful. For example, the "Data sources
Plugin" brings a completely new feature to Rudder by allowing to configure external
API data sources from which Rudder will get node properties. The plugin set-up
its own data base table, comes with its own UI (available in Rudder "administration"
page), and interacts with node properties.
==== Building your own plugins
As of Rudder 4.1, there is no dedicated, frozen plugin API for plugins. A plugin
is built in Scala, and the normal starting point is to clone and study the
template plugin project,
https://github.com/Normation/rudder-plugin-helloworld[rudder-plugin-helloworld].
The project code source is documented to be didactic and provides:
- an example of the packaging resources needed to build a ".rpkg" package,
- example of configuration file for the plugin,
- plugin definition and plugin registration when Rudder starts,
- how to interact with Rudder internal services,
- how to define new APIs.
Of course, you can look to the other open source plugins listed above to get
other, more involved example about how to do things.
You also can interact with Rudder developpers throught the
https://www.rudder-project.org/site/community/mailing-lists/[community] regular
communication channels.
80_extension_and_integration/40_Rudder_Integration.txt
[[rudder_integration_in_infrastructure]]
=== Rudder integration in your infrastructure
The other mains way to integrate Rudder into an existing infrastructure is
by making existing process or software take advantage of Rudder.
==== Existing third party integration
==== Rundeck
http://rundeck.org[Rundeck] is a tool that helps automating infrastructures, by
defining jobs that can be run manually or automatically. There is a
https://github.com/Normation/rundeck-plugin-rudder[plugin] for Rundeck
that allows using Rudder inventory data in Rundeck.
With that plugin, you can execute commands on node registered in Rudder, taking
advantage of the groups defined for you policies.
==== Ansible
There is an https://github.com/ansible/ansible/blob/devel/contrib/inventory/rudder.py[inventory plugin]
for Ansible that makes possible to use Rudder inventory (including groups, nodes,
group ids, node ids, and node properties) as inventory for Ansible, for example
for orchestration tasks on your platform.
It is part of Ansible as of version 2.0.
===== iTop
https://www.combodo.com/itop-193[iTop] is an Open Source CMDB solution. It allows
to describe you IT services and analyse impact of problems.
There is a prototype integration of iTop and Rudder which allows iTop to Rudder
as a source of information about the server content (inventory) and current
compliance level. With that integration, you can see in real time in your CMDB when
a server managed by Rudder is drifting away from its expecting configuration, and
use iTop to understand the impact of such a drift for your IT services.
==== Integrate Rudder thanks to its APIs
All the above plugins are using http://www.rudder-project.org/rudder-api-doc/[Rudder APIs]
under the hood to operate or get data from Rudders. Rudder APIs are as powerful
as the UI, and anything that can be done throught the main graphical interface
can also be scripted away with the APIs.
The documentation provided on APIs is exhaustive, but here comes a summary of
what can be done with them:
- accept, delete a node and manage its parameters,
- get information with a parametrable depth about node inventories,
- search for nodes,
- manage (create, update, delete) groups, directives, rules and parameters,
- interact with the Techniques library,
- get compliance details about a node or a rule, with a parameterized depth of
information,
- manage change requests.
And of course, any plugin can provide new API endpoints, as is doing the
data source plugin.
These API can also be used to automate Rudder action, like node acceptation or compliance
export and archiving for nodes.

Also available in: Unified diff