Add support for setting system properties via user supplied .properties files

Description

Many system options and features are controlled via system properties, which are found in the following files:

  • bootstrap.properties

  • rrd-configuration.properties

  • libraries.properties

  • opennms.properties

Additionally, system properties may be set via the Java command line in opennms.conf

As these files change between releases, mostly rrd-configuration.properties and opennms.properties, users are forced to merge their configuration files during the upgrade process.

In order to make upgrading, and configuration management easier, I propose the following:

  • Keep the existing property files in place with the recommended defaults

  • Allow users to override the properties set by the distributed via their own property files

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Ronny Trommer December 7, 2015 at 10:27 AM

I've added documentation in the Admin Guide. IMHO it make sense just introducing the opennms.properties.d directory.

Review and ready to be merged: https://github.com/OpenNMS/opennms/pull/439

Jesse White November 5, 2015 at 2:18 PM

Jesse White November 5, 2015 at 2:09 PM
Edited

The precedence of system property variables would be as follows:

  1. From the Java command line, possibly originating from etc/opennms.conf

  2. From etc/opennms.properties.d/*.properties files

    1. Files are ordered in lexicographical order, if a property is defined in multiple files, the last one wins

  3. From etc/opennms.properties

  4. From etc/rrd-configuration.properties

  5. From etc/bootstrap.properties

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created November 5, 2015 at 2:02 PM
Updated December 7, 2015 at 4:11 PM
Resolved December 7, 2015 at 11:11 AM