KBEC-00201 - Installing multiple web servers for CloudBees CD (CloudBees Flow) on the same machine

Article ID:360032829872
2 minute readKnowledge base
On this page


Is it possible to install more than one instance of the CloudBees CD (CloudBees Flow) server and/or web server on the same machine?

Use case as described by the customer:

Today we have a single CloudBees CD (CloudBees Flow) server that is front-ended by a set of CloudBees CD (CloudBees Flow) web servers spread around the world. We are contemplating adding a second CloudBees CD (CloudBees Flow) server to the mix and would like to run multiple CloudBees CD (CloudBees Flow) web servers on the same machines that are running a single CloudBees CD (CloudBees Flow) web server today because those machines are very lightly utilized (as compared to the CloudBees CD (CloudBees Flow) server itself).

Put another way, this is a scalability issue. We need to add a new CloudBees CD (CloudBees Flow) server due to the utilization of the current one. But deploying new machines for the CloudBees CD (CloudBees Flow) web servers appears to be "way overkill" due to their current utilization.


If you launch the installer from the command-line with the flag --parallelInstallName=Alternate, then you can run a second instance of CloudBees CD (CloudBees Flow) on a given machine. Some details/limitations:

  • You can still use the GUI installer, but launch it from the command line with --parallelInstallName set.

  • On Windows, if you use a parallel install name, it will not be registered in the registry, hence there will be no uninstall entry.

  • Upgrades will not work.
    This should not be a big issue for a web server-only installation though because it is easy to uninstall/reinstall.

  • The parallel install name will be embedded in the service name on Windows and the name of the init.d script on Linux so there is no collision in that name space.

How to perform the install:

  • Install a CloudBees CD (CloudBees Flow) agent only on the machine

  • For each desired web server, run a procedure that prompts for the following:

    • parallelName - should be unique for each installation

    • httpPort - the HTTP port for the web server

    • httpsPort - the HTTPS port for the web server

    • installerPath - a path to the installer being run

    • serverName - the host for the remote CloudBees CD (CloudBees Flow) server

  • The procedure must run as root (using impersonation)

  • The procedure should have a step whose command is similar to the following shell script on Linux (see example below).
    Writing a Windows version should be similar.


Adjust parameters as needed, for example, note the hard-coded user and group.


if [ -e /opt/electriccloud/electriccommander-$[parallelName]/uninstall ] ; then
    /opt/electriccloud/electriccommander-$[parallelName]/uninstall --mode silent
    rm -rf /opt/electriccloud/electriccommander-$[parallelName]

$[installerPath] --mode silent \
    --parallelInstallName $[parallelName] \
    --installWeb \
    --installDirectory "/opt/electriccloud/electriccommander-$[parallelName]" \
    --dataDirectory "/opt/electriccloud/electriccommander-$[parallelName]" \
    --webHttpPort $[httpPort] \
    --webHttpsPort $[httpsPort] \
    --unixServerUser build \
    --unixServerGroup build \
    --remoteServer $[serverName] \

It may be worth having a wrapper procedure that calls this procedure multiple times, once for each web server that must be installed across all of the designated machines. Because the uninstaller is run if it exists, this same procedure can be run again to upgrade the web servers.