Multiple Agents on One Machine

    Your query search resulted in no results.

    Install multiple agents on the same machine

    In order to fully utilize your hardware, it is often useful to install multiple agents on a single machine.

    Currently GoCD installers do not support this out of the box. The following sections describe how this can be done manually


    On Windows, multiple GoCD agents can be run in two ways - as Windows service or as a Windows command

    Running as Windows service

    • Install your first agent with the installer to the default location
    • Copy the installation folder (“C:\Program Files\Go Agent”) to “C:\Program Files\Go Agent 2”
    • Delete the file C:\Program Files\Go Agent 2\config\guid.txt
    • Delete the file C:\Program Files\Go Agent 2\.agent-bootstrapper.running
    • Edit wrapper-agent.conf file to customise information related to Go Agent 2 Just after the line #include ../conf/wrapper-license.conf, add
      • set.GO_AGENT_DIR=C:\Program Files\Go Agent 2
    • Run the following command

      sc create GoAgent2 binPath= "\"C:\Program Files\Go Agent 2\cruisewrapper.exe\" -s \"C:\Program Files\Go Agent 2\config\wrapper-agent.conf\""
    • Start “GoAgent2” service

    Running as Windows command

    You should use a VNC application (such as TightVNC) to keep windows user logged in. If the user logs out or the computer restarts, the agents will shutdown.

    Mac OSX

    • Install your first agent with the installer
    • Assuming your first agent in at /Applications/Go, copy that to another location, say /Applications/Go Agent Once you do that, you can start the application like this:
      GO_APPLICATION_NAME="Go Agent 2" open /Applications/Go\ Agent\

    The logs and other files related to the second agent should be available at “/Library/Application Support/Go Agent 2” and the icon in the dock will be called “Go Agent 2” as well.

    It is also possible to edit the file /Applications/Go\ Agent\ to change the CFBundleName property. However, that is not recommended, since it invalidates the signature of the application package, and could cause Apple Gatekeeper to warn you that the new agent is an invalid application.

    Linux (RPM and DEB)

    • Install your first agent with the installer
    • To create a second agent on the same host, run this as root:

      cp /etc/init.d/go-agent /etc/init.d/go-agent-1
      sed -i 's/# Provides: go-agent$/# Provides: go-agent-1/g' /etc/init.d/go-agent-1
      ln -s /usr/share/go-agent /usr/share/go-agent-1
      cp -p /etc/default/go-agent /etc/default/go-agent-1
      mkdir /var/{lib,log}/go-agent-1
      chown go:go /var/{lib,log}/go-agent-1
    • To enable starting the go-agent service during system boot:

      • on Debian:

        insserv go-agent-1
      • on Ubuntu:

        update-rc.d go-agent-1 defaults
      • on Centos and Redhat:

        chkconfig go-agent-1 on
    • You can now start or stop the second agent using /etc/init.d/go-agent-1 (passing it the start or stop) arguments as usual. Logs will be written to /var/log/go-agent-1/.

    • Repeat this process for more agents. Just change the suffix “1” to “2” and so on.

    Linux (non-RPM, non-DEB and other UNIXes)