Universal Access to the plugins directory

4 minute readReferenceExtensibility

A plugin is a collection of one or more features, or a third-party integration or tool that can be added to CloudBees CD/RO. The CloudBees CD/RO server installs all plugins into a configurable location named the plugins directory. This directory must be readable by the web server.

There are two ways to make the plugins directory readable by the web server. You can configure the CloudBees CD/RO server, and web servers to point to a central network location, or you can replicate the contents of the plugins directory on remote web servers.

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 remote agents and 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.
  • Copy the plugins directory to remote web servers using any file copy mechanism.

  • The copied plugins directories must be readable by only the remote web servers.

  • Plugins should be copied to a plugins subdirectory within the data directory for each remote web server.

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

Mounting network plugin share files

This section explains how to mount network plugins share files when you are setting up CloudBees CD/RO components for high availability. This section contains the steps to set up a CloudBees CD/RO server cluster (two load-balanced CloudBees CD/RO servers and two load-balanced CloudBees CD/RO web servers) sharing the same plugin folders (a “network plugins share”).

This setup consists of the following main steps:

Using the Remote Plugins Folder

This section describes how to make the CloudBees CD/RO components (CloudBees CD/RO server, CloudBees CD/RO web server, and agent) use the remote mymountpoint/plugins as the plugins folder.

The Plugins directory in the Automation Platform Administration > Server > Settings page (such as C:/ProgramData/Electric Cloud/CloudBees CD/RO Automation Platform/plugins on Windows or /opt/cloudbees/sda/plugins on Linux) need not be changed if the CloudBees CD/RO server is standalone and is using its local plugins folder. This the default location where the plugins are installed by the CloudBees CD/RO server (the DATA_DIR/plugins folder by default).

If the CloudBees CD/RO server is clustered, you should use the plugins directory from a network plugins share and copy the contents of the DATA_DIR/plugins folder (and subfolders) from the CloudBees CD/RO node 1 to this network plugins share. As an example on Windows, define the network plugins share from a network UNC path //f2/scratch/chronic3plugins.

You can also set this network plugins share using the following ectool commands (after logging in via ectool ):

ectool --server FLOW_SERVER_LOAD_BALANCER {PRODUCT} serverlogin admin changeme ectool setProperty "/server/settings/pluginsDirectory" "/mymountpoint/plugins"

If the clustered CloudBees CD/RO server is on Linux, you can just mount the plugins NFS share (for example, NFS_HOST:/EF/Plugins ) to the DATA_DIR/plugins in /etc/fstab and avoid changing /server/settings/pluginsDirectory :f

Using the same network plugins share

If the local or remote web server use the same network plugins share as the CloudBees CD/RO server, then run the command described below on the web server.

The web server can be local or remote to the CloudBees CD/RO server. This updates the DATA_DIR/apache/conf/httpd.conf file (for example, on Linux, it is /opt/cloudbees/sda/apache/conf/httpd.conf by default).

Linux Web Servers

ecconfigure --webPluginsDirectory PLUGINS_SHARE_FOLDER

For example:

ecconfigure --webPluginsDirectory /mymountpoint/plugins

Otherwise, if you are using Linux CloudBees CD/RO web servers, you can just mount the network plugins share to the DATA_DIR/plugins folder. Then you do not need to run the ecconfigure –webPluginsDirectory command.

Windows Web Servers

If the CloudBees CD/RO web servers are on Windows, you must use the UNC path. For example:

ecconfigure --webPluginsDirectory //f2/scratch/chronic3plugins

Running the ecconfigure –webPluginsDirectory command updates the DATA_DIR/apache/conf/httpd.conf.

The ecconfigure --agentPluginsDirectory command updates the DATA_DIR/conf/agent.conf file and the DATA_DIR/conf/agent/agent.properties file. But note that these entries are no longer used for most plugins.

Specifying the Network Plugins Directory

Linux CloudBees CD/RO Servers

If the CloudBees CD/RO server is on Linux, run the following command to specify a network plugins directory, for the agent on the same machine as the CloudBees CD/RO server. This updates the /opt/cloudbees/sda/conf/agent.conf file:

ecconfigure --agentPluginsDirectory /mymountpoint/plugins

Windows CloudBees CD/RO Servers

If the CloudBees CD/RO server is on Windows, run the following command to specify a network plugins directory, for the agent on the same machine as the CloudBees CD/RO server. This updates the DATA_DIR/conf/agent.conf file:

ecconfigure --agentPluginsDirectory //f2/scratch/chronic3plugins

Run the following command if you will install remote Windows agents or web servers. That is, not on the same machine as the CloudBees CD/RO server. (For the web server or agent on the same machine as the CloudBees CD/RO server, this property is not used):

ectool --server localhost setProperty "/server/Electric Cloud/windowsPluginsShare" //winhost/mymountpoint/plugins

Installing Remote Linux Agents

Run the following command if you install remote Linux agents or web servers. That is, not on the same machine as the CloudBees CD/RO server. For the web server or agent on the same machine as the CloudBees CD/RO server, this property is not used:

ectool --server localhost setProperty "/server/Electric Cloud/unixPluginsShare" /mymountpoint/plugins

You can see these updates in the Automation Platform UI on the Administration > Server > Custom Server Properties > Electric Cloud page. You can simply use the data directory, because then the network plugins share is relative to the data directory (DATA_DIR/plugins):

Restarting the CloudBees CD/RO Web Server

On each CloudBees CD/RO web server, if you run any of the above ecconfigure commands, you must restart it as sudo using:

sudo /etc/init.d/commanderApache restart

Running commanderApache using sudo does not change the permissions of the files in DATA_DIR/apache/logs such as the access.log, error.log, and httpd.pid files to root. They will still be owned by the user specified in the --unixServerUser option (the service user) used when the web server was installed.