Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.

Data sources plugin 4.1-0.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@fanf fanf released this 03 Feb 16:38
· 41 commits to branches/rudder/4.1 since this release

Rudder data sources plugin for Rudder 4.1~beta2 and up

This is a release for Rudder 4.1~beta2 and up of the Rudder data sources plugin.

This plugin allows to automatically fetch external information from third party REST API and use them as node properties. Fetching data can be done periodically and/or on triggers (node accepted, policy generation started).

Documentation

Documentation on data sources can be find here: http://www.rudder-project.org/doc-4.1/node-properties-data-sources.html#node-properties-data-sources

Build

To build that package, you need a working installation of maven (version 3.x) and JDK 8 or up.

First, clone the repository and build the plugin:

git clone https://github.com/Normation/rudder-plugin-datasources.git
cd rudder-plugin-datasources
mvn -Dmaven.test.skip=true clean package
.......
  [INFO] Building jar: /home/fanf/java/workspaces/rudder-project/rudder-plugin-datasources/target/datasources-4.1-0.1-plugin-with-own-dependencies.jar

The tests can't be build for now due to issue https://www.rudder-project.org/redmine/issues/10135

To proceed to installation, you will need that jar and file "src/main/resources/datasource-schema.sql".

Installation

Install the plugin by copying the jar in /opt/rudder/share/rudder-plugins/ on your Rudder root server and the file datasource-schema.sql, then execute:

# create table for Rudder data sources plugin:
psql -U rudder -h localhost -d rudder -f /path/to/datasource-schema.sql

# declare plugin use: 
/opt/rudder/bin/rudder-plugin register datasources-4.1-0.1-plugin-with-own-dependencies
Rudder plugin handling utility.
INFO: Plugin found in /opt/rudder/share/rudder-plugins.
INFO: Registering plugin datasources-4.1.0~beta2-SNAPSHOT-plugin-with-own-dependencies...

# then restart Rudder:
/etc/init.d/rudder-jetty restart

If everything is OK, you will see in Rudder log (/var/log/rudder/webapp/YYYY_MM_DD.stderrout.log) the following INFO line:

[2017-02-01 09:35:21] INFO  application - Initializing plugin 'data sources' [com.normation.plugins.datasources.DataSourcesPluginDef]
[2017-02-01 09:35:21] INFO  application.plugin - loading 'datasources' plugin

You should also see in Rudder administration screen, in the plugin list, data sources plugin and a new menu entry "Data sources".