Unattended (Silent) Installation Method for UNIX or macOS Agents

2 minute read

The agent software must be installed on each machine you intend to use with CloudBees CD. An agent is a CloudBees CD component that runs on a machine resource. The agent executes CloudBees CD job steps, monitors step progress, and records job completion information.

This section describes how to install agents and tools silently on UNIX (not Linux or Windows) machines. These include Solaris, HP-UX, macOS, and AIX machines. Agent upgrades are not supported on these platforms.

You can install agents using any of the following accounts:

  • root

  • Any account with sudo privileges

  • (UNIX or macOS only) Any non-root account without sudo privileges

Silent Installation Command Arguments

The following table lists the available arguments.

ArgumentDescription

-q

Runs the installer in silent mode. The default installation options are used unless you override them on the command line or in an installation configuration file.

--nonRoot

(UNIX or macOS only) Runs the installer using a non-root account without sudo privileges. The agent service will run as the user that performed the installation.

Agents installed by root or using sudo can be upgraded only by root or using sudo. You cannot use --nonRoot to upgrade such agents.

-f

Removes and replaces any existing files in the destination directory. This argument completely removes the directory but does not uninstall the previous version. For details about upgrades, see Roadmap to Upgrade CloudBees CD .

--config

Specifies a file containing installation parameters and values.

Running a Silent Installation

Running the installer without root or sudo privileges is not recommended. When run without root or sudo privileges, the installer cannot install the files that provide automatic start for the agent services, so you must configure automatic restart manually.

To run a silent UNIX or macOS agent installation:

  1. Obtain the UNIX or macOS installer file for your agent platform as described in Non-Server Platform UNIX Agent Installation Method .

  2. If you are not installing as a non-root user without sudo privileges, log in as root or as a user with sudo privileges.

  3. Run chmod +x ./commander_<OStype>.bin to ensure that the installer is executable.

  4. Run commander_<OStype>.bin -q <arguments>.

    where <OStype> is the agent platform. For example:

    commander_powerpc_AIX71.bin -q -f --config myconfig

    For installation using a non-root account without sudo privileges, you must include the --nonRoot argument. Failure to do so causes the following error:

    This installer must be invoked in a root context.
    
    ERROR: Install failed. Exiting installer.

Example Parameters in an Installation Configuration File

Following is an example of parameters in a configuration file for silent installation of agents using root or an account with sudo privileges:

ec_INSTALL_TYPE=agent
DESTINATION_DIR="/opt"
AGENT_USER_TO_RUN_AS="bill jones"
AGENT_GROUP_TO_RUN_AS=engineering
EC_AGENT_PORT=7800
EC_AGENT_LOCAL_PORT=6800

Following is an example of parameters in a configuration file for silent installation of tools using root or an account with sudo privileges:

ec_INSTALL_TYPE=tools
DESTINATION_DIR="/opt"
USER_TO_RUN_AS=sally
GROUP_TO_RUN_AS=engineering