operations center provides a facility to replicate a subset of system configuration information (configuration snippet) to client controllers.
This feature requires the following (or newer) versions of plugins installed in operations center to work:
Operations Center Context 1.6.3
Operations Center Server 1.6.8
Operations Center RBAC 1.6.2
Additionally, each client controller requires Operations Center Context 1.6.3 or newer to receive the configuration.
Creating a configuration snippet replicates that configuration to any client controllers within the same folder hierarchy that have not opted out of receiving shared configuration. This feature is ideal when you have some configuration such as Alerting or E-mail configuration that should be kept in sync on one (or more) client controllers. It is possible to define multiple shared configuration within the same folder as well in any parent folder and the configuration of all of these will be replicated to the client controller.
To create a shared configuration, review the following:
It is first important to work out which of your client controllers you wish to receive the shared configuration so that you can identify the correct folder(s) to create the shared configuration in.
For example, if you have six client controllers (A,B,C,D,E, and F) and you wish five (A,B,C,D and E) of them to have the same e-mail configuration (for example: SMTP server or Jenkins instance e-mail)yet only three of the client controllers (C,D and E) to have the alerting information you will need to create one item to contain the e-mail configuration that is in a folder that is the parent of all of the client controllers, and one item to hold the Alerting information that is in a folder that contains or is a parent of only C, D and E.
Root + Folder One | \ | + Client controller A | + Client controller B | + Folder Two | \ | + Client controller C | - Client controller D | - Client controller E | - Client controller F
In the above hierarchy, the Alerting configuration is created in Folder Two and the e-mail configuration is created in Folder One.
|To obtain the correct hierarchy, you may have to move the client controllers to different folders.|
Once you have identified the correct location for the Shared Configuration, navigate to that folder and choose New Item, provide a name for the configuration, select the type Miscellaneous Configuration Container and then OK.
The subsequent screen allows you to define the type of configuration snippet.
By selecting Add Snippet and choosing the type of configuration you want to add, you can enter the configuration of the item to replicate. A list of supported snippets is available below.
Each snippet is configured as it would be in the main Jenkins Configure System page.
As Jenkins consolidates the configuration in the current folder with the configuration in the parent folders, it is important to know the piece of information within each snippet is the key such that configuration can be overwritten in a child folder. This is done to prevent entering the same key twice by accident. In all cases, when a snippet with the same key is defined in multiple places the one in the folder closest to the folder containing the client controller takes precedence.
|Snippet Type||Key Attribute||Inheritance Behavior|
Snippets with different keys are combined into the configuration.
As there can be only one email configuration the closest to the client controller takes precedence, and others are ignored.
As there can be only one system message, the closest to the controller takes precedence.
Snippets with different keys are combined into the configuration.
|If multiple snippets are are defined with the same key in the same Miscellaneous configuration container, or in a different Miscellaneous configuration container within the same Folder — then the snippet used is non-deterministic and, as such, should be avoided.|
The Tool Installation mechanism allows you to specify tool setup procedures in global configurations and then use them in Jenkins jobs. Various Tool Installation types are provided by Jenkins core and plugins: JDK, Maven, Git, and Docker CLI. Large-scale distributed installations may include dozens of complex tool configurations, hence it is recommended to store them in operations center using this snippet.
Each Tool Installation snippet defines one installation of a tool. It is possible to setup multiple Tool Installations. To do this, do the following:
Create a new Tool Installation snippet.
Select a tool type to snippet.
Configure the tool according to the guidelines available in the built-in help on on plugin Wiki pages.
Installation names should be unique within one tool type
It is possible to set up multiple tool installers for different node labels
The following define function behaviors when using Tool Installer:
When a tool is configured in the Miscellaneous Configuration Container or any part of its configuration (for example: Tool Installer) come from a plugin not installed on a client controller, the configuration for that specific tool won’t be propagated to that client controller. If the missing plugin is installed on the attached client controller, a reconnection of the client controller is required in order to make the Tool Installation be propagated to the client controller.
Tool Installation or Tool Installer configuration forms may provide verification for the configuration entries or contain check buttons (for example: Test Connection). In the case of the Shared Configuration Snippet, all these verification handlers will be launched on the operations center instance instead of the client controllers. It means that the verification result may be false-positive or false-negative, because operations center and client controller environments may differ.
|It is highly recommended to double-check tool configurations on operations center and on client controllers after making changes.|
Tool Installation Snippet has been tested with the following tools:
A correct behavior for other
Tool Installation types is not guaranteed.
If you see any issues with the configuration propagation, please contact the CloudBees Support team.
If your plugins provide their own Tool Installation types, these types automatically appear in the dropdown list.
Due to the specifics of the Tool Installation extension point in the Jenkins core, it’s not guaranteed that the configuration form displays properly.
Missing or duplicated
ToolInstallationProperty entries is one of known issues.
To make your Tool Installation compatible with the configuration snippet, follow examples in Jenkins JDK Tool. Tool Installation snippets for such implementations should work correctly out-of-the-box.
In some cases, you may want a specific client controller to not receive any shared configuration. To do this, opt out of the client controller from shared configuration.
To do this, do the following:
Configure the client controller and choose Disable under the Shared Configuration section.
|If shared configuration is not disabled, then the same section provides information about the client controller’s ability to support this feature.|
It may be useful to opt operations center into the Shared Configuration. For example, where you are customizing tool installer locations on shared agents you will need those tool installers to be configured in operations center to be able to define the location overrides. Additional use cases include:
Configuring common alerts
Ensuring the email notification settings are consistently applied across the entire cluster
Applying a system message to the entire cluster
If you opt-in operations center it will pick up any Shared Configurations defined in the root of operations center.
To enable operations center to consume the shared configuration you must enable the Shared Configuration option from the operations center global configuration.