A configuration bundle is a zip archive containing one or more configuration fragments as YAML files, each containing a single YAML document. Individual configuration fragments are combined and normalized by Rhino during a declarative import. The content of an individual configuration fragment does not need to be structurally complete, however the combination of all configuration fragments in a configuration bundle must be both structurally valid and free from contradictory configuration settings.

Configuration fragment YAML files within a configuration bundle must have a .yaml filename extension, but other than this the names of these YAML files and any directory structure imposed on them within a configuration bundle are immaterial. Rhino will scan a configuration bundle and consider only *.yaml files as part of the desired configuration. This means it’s possible to include other content, such as documentation, in a configuration bundle using files with other filename extensions without interfering with the validity of the configuration bundle. Collectively, the configuration YAML files in a configuration bundle must adhere to the configuration bundle schema.

A configuration bundle must include a YAML document which contains a top-level object with the following structure:

Note The examples given here assume the content is given in a single configuration fragment, however as previously stated, it is possible for this content to be split across configuration fragments within a configuration bundle.
rhino-config:config-bundle:

  format: complete

  schema-version: '1.0'

The schema version defines the structure of the configuration fragment documents. Currently only one schema version is supported and this field must be set to 1.0.

Rhino supports two types of configuration bundles - complete and partial.

  • A complete configuration bundle includes everything that needs to be configured for the deployed application to function, including profiles, resource adaptor entities, tracer configuration, usage parameter sets and desired activation states for the SLEE, services and resource adaptor entities.

  • A partial configuration bundle only includes configuration for some aspects of some of these. For example, it might create a resource adaptor entity link name and set the level for a tracer for a service to FINEST.

Complete Configuration Bundles

A complete configuration bundle includes all intended configuration states for the deployed application. Anything already present in a Rhino instance that is not specifically included in a complete configuration bundle when it’s imported will either be removed from Rhino if it’s removable, or be reverted to a default state otherwise.

The table below illustrates the effect a complete configuration import would have on state not defined in the configuration bundle:

State type Effect of non-declaration in complete configuration bundle

Profile table

Removed

Profile

Removed

Usage parameter set

Removed

Tracer level

Removed

SBB environment entry

Reverts to default value as defined in the SBB’s deployment descriptor.

Per-node desired state

Removed

Default desired state

Reverts to the unconfigured default state – STOPPED for SLEE state and INACTIVE for services and resource adaptor entities.

Resource adaptor entity

Removed

Resource adaptor entity configuration property

Reverts to the default value as defined in the resource adaptor’s deployment descriptor.

Security permission specification

Reverts to the default permissions as defined in the component’s component jar.

Partial Configuration Bundles

A partial configuration bundle includes a subset of the configuration state for the deployed application. Configuration not described in the partial configuration bundle will not be modified. In a partial configuration bundle, configuration that is to be removed is marked with the attribute present: false. It is not possible to remove the default desired state for a component.

Importing a Configuration Bundle

Two user interfaces are provided for importing configuration bundles. Both use the same underlying method. A Java Management Bean method - ConfigManagementMBean.importConfiguration() and rhino-console command - importdeclarativeconfig.

When a configuration is imported, Rhino returns a JSON document describing the changes that will be made to the state of the system or a list of validation errors that prevented the import from succeeding. If using rhino-console, the document is parsed and a human-readable status output is printed. You can also save the returned document to a file using the –o <output.json> command parameter.

Note

Version control of configuration bundles imported into Rhino simplifies change management and rollback.

Previous page Next page
Rhino Version 3.0.0