Configure universal access to the plugins directory

3 minute readReferenceExtensibility

A plugin is a collection of one or more features, third-party integrations, or tools that can be added to CloudBees CD/RO. The CloudBees CD/RO server installs all plugins into a configurable plugins directory (Administration  Server settings  System settings  Plugins directory).

To share the plugin directory, it must be readable by the web server. There are two ways to make the plugins directory readable by the web server, by either:

Setting up shared filesystems for the plugins directory

This section explains how your plugins directories can be shared in several CloudBees CD/RO configurations to promote high availability. These configurations include:

The information below applies to traditional installations of CloudBees CD/RO only. For Kubernetes installations, shared plugin are handled in the server Helm chart by sharedPluginsEnabled: true. However, you must have shared storage configured with adequate values for your shared plugins. For more information, refer to Kubernetes cluster and storage requirements.

Plugin directory for non-clustered deployments

If your CloudBees CD/RO server is:

  • Not clustered,

  • Using its local plugins directory configured in Administration  Server settings  System settings  Plugins directory, and

  • All required components have at least read access to the configured plugin directory,

it is not necessary to make any changes. This is the default location (DATA_DIR/plugins) used by the CloudBees CD/RO server when plugins are installed.

Plugin directory for clustered deployments

If your CloudBees CD/RO server is clustered, you can set the plugin directory with the CloudBees CD/RO UI or CLI:

  • To add your plugin directory using the UI, navigate to Administration  Server settings  System settings and configure the Plugins directory field.

  • To add your plugin directory using the CLI, run:

    ectool setProperty /server/settings/pluginsDirectory /mymountpoint/plugins

Ensure all require components have at least read access to the configured plugin directory. For more information, refer to Sharing network plugins between servers and web servers.

Sharing network plugins between servers and web servers

If you want your local or remote web server to use the same network plugins share as the CloudBees CD/RO server, follow the instructions below for your CloudBees CD/RO web server(s) to update DATA_DIR/apache/conf/httpd.conf.

Linux web servers

If you are using Linux CloudBees CD/RO web servers, you can directly mount the network plugins share to the DATA_DIR/plugins directory. If this is not an option, to set the plugins directory:

On Linux, changes to the CloudBees CD/RO web server using ecconfigure should be run using sudo privileges, which trigger a web server restart automatically. However, if the commands are not run with sudo privileges, or you have --skipServiceRestart configured, you must restart each CloudBees CD/RO web server where you use these commands.
  1. Run:

    ecconfigure --webPluginsDirectory PLUGINS_SHARE_FOLDER

    For example:

    ecconfigure --webPluginsDirectory /mymountpoint/plugins
  2. Ensure your web server is restarted. To manually restart your web server, run:

    • For root users, run

      /etc/init.d/commanderApache restart
    • If you are using systemd, run

      sudo systemctl reload-or-restart commanderApache

Windows web servers

If you are using CloudBees CD/RO web servers are on Windows, you must use the UNC path for your plugin directory. To set the plugin directory:

  1. Run:

    ecconfigure --webPluginsDirectory \\servername\path

    For example:

    ecconfigure --webPluginsDirectory \\f2\scratch\chronic3plugins
  2. Ensure your CloudBees CD/RO web server is restarted.

Replicating the plugin directory on remote systems

Use this procedure to keep the plugins directory in its default server location and replicate the contents to web servers.

This approach requires you to manage multiple plugin directories. Every time a new plugin is installed on the CloudBees CD/RO server, you must synchronize the changes across all remote copies of the directory. Only replicate the plugins directory if you cannot use or configure a central network location.

To implement this method, you must:

  1. Navigate to Administration  Server settings  System settings and configure the Plugins directory field.

  2. Using any file copy mechanism, copy the configured plugins directory into a plugins subdirectory of the data directory for your remote web server(s).

  3. Ensure the copied plugins directories is readable by only the remote web server(s).

  4. Every time the CloudBees CD/RO server plugins directory is updated, you must synchronize the changes across all remote copies.