RUDDER 4.3 – focus on the ‘properties by inventory extension’ feature

Rudder directives management can be quite complex when dealing with heterogeneous nodes, needing different configurations. In order to limit the multiplication of directives we could use variables or node properties to pass different parameters and try to factorize some code.

The 4.3 release comes with a new feature to expand the node inventory with arbitrary data, which will also define new nodes properties to help dealing with configuration management.

We can now add arbitrary data to the node inventory making it more easily maintainable and reusable.

Note that this is designed to add information to the inventory, which goal is to describe almost immutable parameters (or at least evolving slowly). Those special node properties will be permanent on the node configuration but could always be overridden by a new inventory.
This way, if the inventory hooks were missing in a policy generation, already defined properties will not be affected. The cost of it is that you will not be able to remove a node property defined by inventory extension, but you will still be able to change its value.

Keep in mind that whenever you are adding properties by extending the inventory you are adding new fields to the rudder inventory and not just passing arguments to a configuration.

This is done by placing a hook (bash or C script outputting raw Json) in the folder /var/rudder/hooks.d on the agent side and make it executable. Each hook can define only one node property, which will be the first Key of the resulting Json/

Example of hook to define a “management” node property:

#!/bin/sh
 echo '{
 "management": {
 "location": "Paris",
 "admin": "Pascal",
 "groups": ["test_group1", "test_group2"]
 }
 }'

 

To take the changement into account, send a fresh inventory from the node by executing on the node:

rudder agent inventory

On the server the next rudder execution will parse the received inventory and make it usable.
You can force the Rudder execution on the server by executing the following command on it:

rudder agent run

 

The web interface should now show up the new node property on the web interface:

 

image3

 

Node properties can be used as criteria for Rudder Group creation, managing node properties to defined groups may now be more automatised with dynamic Rudder groups and defining some dedicated hooks.
For instance, if we want to define a Rudder group to describe all ours nodes located in Paris we will distribute hook files containing our “location” key in a node property to the given node and create the appropriate group matching rule.

 

image2

 

The newly defined node properties can also be used as parameters in directives or in your mustache templates:

Node properties are accessible in any directives by the following syntax:

${node.properties[property_name][key_one][key_two]}

You can also use them in your mustache templates like this:

${node.properties.property_name.key_one.key_two}

 

In our example we could use the previously defined node properties in a templating directive:

 

image1

 

Note that in this case, lines using the “directives” syntax will be interpreted on the server side, at policy generation and those using the “mustache” syntax will be interpreted at agent execution on the node side.

You can find in the 4.3 user manual the complete documentation about:

Check it out!

Rudder 4.3 is available now!

Here are a few easy ways to try it out:

  • Online demo: You can see a demo version of Rudder on http://demo.rudder-project.org/
  • Vagrant: Just want to test Rudder without worrying about a full installation, but with real virtual machines so that you can actually configure and test things, unlike the demo? We provide a Vagrant set-up. See Rudder Vagrant for getting started with Rudder on Vagrant.
  • Linux server packages: The easiest way to test and use Rudder for prototyping or production is to install it from the provided Linux packages. For the server, the main current .rpm-based (RedHat, CentOS, SLES) and .deb-based (Debian, Ubuntu) distributions are supported. See https://www.rudder-project.org/site/get-rudder/downloads/ for details about repository and available versions.
  • Come and participate in a one-day discovery workshop; this is called the Rudder Introduction Days, and the next one will take place at Normation’s in Paris on September 20th;
  • Come and discuss and ask any questions you may have directly to the development team and the Rudder community via email, IRC or Twitter.

What’s next?

RUDDER 4.3 brings the last consolidations on the features that version 4.0 brought. Feedbacks received allowed us to enrich and perfect them over 3 versions while working on the big novelties to appear soon in RUDDER 5.

Indeed, the next version is going to be a major release, which will bring many changes both inside and outside Rudder, including :

  • a reporting plugin to extract historical compliance reports
  • numerous integrations with other tools:
    • Centreon
    • Slack
    • iTop
    • and so on

Because of the new regulation about personal data, we invite you to subscribe to our anglophone newsletter .
To join the francophone newsletter, click here instead: http://eepurl.com/b-_wK9

If you already signed up in the past long ago, fill up and submit the form once again to confirm you want to be kept informed about RUDDER news. If you don’t there is a chance for you to be removed from our database because of the new data retention period legislation.