Advanced command-line installation (agent-only installer)

6 minute readReferenceExtensibility

This page covers how to install CloudBees CD/RO agents using the CLI-based Advanced agent option of the Linux agent installer.

The Advanced agent option installs the following CloudBees CD/RO components on the host machine:

  • Agent

  • CloudBees CD/RO tools

Before you start

The following are important knowledge prerequisites to review before starting this procedure:

Perform an Advanced Agent installation

  1. If you have not already done so, download the agent-only installer file. To download this version, select your required installer:

  2. Start the installer:

    1. Enter the following command to make the installer file executable:

      Command
      Current version
      chmod +x CloudBeesFlowAgent-x64-<version>
      chmod +x CloudBeesFlowAgent-x64-2024.12.0.177508
    2. Start the installation:

      For more information about required user privileges, refer to Linux services user permissions.
      • For root or sudo installations, run:

        Root or sudo procedures
        Command
        Current version
        ./CloudBeesFlowAgent-x64-<version>
        ./CloudBeesFlowAgent-x64-2024.12.0.177508
        • For root or sudo installations on Linux systems with a graphical interface installed, run:

          Command
          Current version
          ./CloudBeesFlowAgent-x64-<version> --mode console
          ./CloudBeesFlowAgent-x64-2024.12.0.177508 --mode console
      • For non-root/non-sudo installations, run:

        Non-root/non-sudo procedures
        Command
        Current version
        ./CloudBeesFlowAgent-x64-<version> --nonRoot
        ./CloudBeesFlowAgent-x64-2024.12.0.177508 --nonRoot
        • For non-root/non-sudo installations on Linux systems with a graphical interface installed, run:

          Command
          Current version
          ./CloudBeesFlowAgent-x64-<version> \ --mode console \ --nonRoot
          ./CloudBeesFlowAgent-x64-2024.12.0.177508 \ --mode console \ --nonRoot

        A warning about automatic server start-up with non-root/non- sudo installations appears. Enter Yes to dismiss the warning.

  3. The installer launch prompt appears. Enter Y to continue.

  4. The following prompt appears:

    Specify the type of setup you would like to perform: expressAgent or advanced. [expressAgent]
    1. Enter advanced.

  5. The following prompt appears:

    Specify the installation directory for program files and binaries. [/opt/cloudbees/sda]
    1. Press Enter to use the default /opt/cloudbees/sda, or provide a custom path.

  6. The following prompt appears:

    Specify the data directory for data files, configurations, and logs. [/opt/cloudbees/sda]
    1. Press Enter to use the default /opt/cloudbees/sda, or provide a custom path.

  7. The following prompt appears:

    Specify the agent port. [7800]
    1. Press Enter to use the default port. If required, enter a different port to eliminate conflicts with your existing system configuration.

  8. The following prompt appears:

    Specify the agent local port. [6800]
    1. Press Enter to use the default port. If required, enter a different port to eliminate conflicts with the agent HTTP communication on the localhost network interface.

  9. The following prompt appears:

    Discover the plugins directory from a remote CloudBees CD/RO server? [n/Y]
    1. Enter y if you want the agent machine to have access to the plugins directory. You should allow access to the plugins directory so agents have access to collections of features, third-party integrations, or third-party tools.

      The plugins directory on the CloudBees CD/RO server must be “shared” before the agent machine can use “discover” to find the directory. For more information, refer to Configure universal access to the plugins directory.
  10. The following prompt appears:

    Create a resource for the installed agent on a remote ClouBees CD/RO server? [n/Y]
    1. Enter y to create a resource for the agent on the remote CloudBees CD/RO server. Enter N to skip this step, and set up the agent resource later.

      CloudBees suggests entering Y to automatically create a resource for the agent on your remote CloudBees CD/RO server. This option saves time later configuring new resources on the CloudBees CD/RO server.

  11. The following prompt appears:

    Register as trusted agent? [y/N]

    Making an agent trusted restricts the agent to one CloudBees CD/RO server. The agent will not respond to incoming communication from any other CloudBees CD/RO server. This is useful when you want to create a secure production environment, but generally not needed for test or development environments.

    You can run gateways without trusted agents. However, you should use gateways with trusted agents to prevent security issues in the firewall between zones connected by a gateway.

    There are exceptions to using gateways without trusted agents:

    • The firewall between two zones is not required in your environment or is needed only to protect the CloudBees CD/RO server.

    • There is a specific reason to use gateways without trusted agents, such as a requirement to prevent unauthorized users from accessing your network. All incoming traffic from the internet is routed to a data center through a load balancer, and the load balancer routes the traffic to the appropriate machine in your network.

      1. Choose one of the following options:

        • If there is no gateway between the agent and CloudBees CD/RO server, enter n.

          If you deviated from the recommended agent options, you will see variations in the installation options that appear on your system.
        • If a gateway is used to communicate with the CloudBees CD/RO server, you must select y. This option allows you to create a trusted network connection between the agent and server under the same certificate authority. This will allow the agent and the CloudBees CD/RO server to communicate across the network.

  12. The following prompt appears:

    Create agent in the default zone? [n/Y]
    1. Enter Y to create the agent in the default zone. Enter N to create a new zone.

  13. The following prompt appears:

    Specify the host:port of a remote CloudBees CD/RO server the agent being installed can link to. The port is only required if it is not the default(8000)
    1. Provide the URL of the CloudBees CD/RO server you want the agent to connect with.

  14. The following prompt appears:

    Specify the CloudBees CD/RO Agent username for logging into "<CDRO-server>". [admin]
    1. Press Enter to use admin. If using a different user, enter the username of the CloudBees CD/RO user to register the agent.

      This user must have sufficient permissions to create the agent resources on your CloudBees CD/RO server.

  15. The following prompt appears:

    Specify the password for "<username>" on "<CDRO-server>". []
    1. Press Enter to use admin. If using a different user, enter the username of the CloudBees CD/RO user to register the agent.

  16. The following prompt appears:

    Specify the name of the resource to create on "<CDRO-server>". []
    1. Press Enter to use your default machine name. If needed, provide a new name for the resource.

  17. The following prompt appears:

    Specify the hostname of the installed agent to create a new resource. []
    1. Press Enter to use your default machine name. If needed, provide a new name for the hostname.

  18. The following prompt appears:

    Specify the name of the default workspace for the new resource "<resource-name>". []
    1. Provide a default workspace name for the jobs in the resource.

  19. The following prompt appears:

    Specify the URL for the agent gateway in the format 'https://ipOrHostname:port' []
    1. Provide the URL for the agent gateway.

  20. The following prompt appears:

    Specify the URL for the agent gateway in the format 'https://ipOrHostname:port' []
    1. Provide the URL for the agent gateway.

  21. If you select not to create the agent in the default zone, the following prompt appears:

    Specify the zone name for the agent and/or repository. []
    1. Specify a zone name for the agent.

  22. The following prompt appears:

    Specify the system user the agent will run as []
    1. Provide the system user to use when running agent services.

      If you specify root as the agent service user, the following prompt appears:

      For security reasons, CloudBees strongly recommends NOT using the 'root' user to run agent processes in production environments. For more information, refer to: https://docs.cloudbees.com/docs/cloudbees-cd/latest/install-trad/agent-config-recommendations Do you still want to continue using the 'root' user to run agent processes? [y/N]

      CloudBees strongly recommends not running the agent services as a root user. This can pose significant security risks if the agent becomes compromised.

      To accept these security risk and run the agent as root, enter Y.

  23. The following prompt appears:

    Specify the system group the agent will run as []
    1. Provide the system group of the user being used to run the agent services.

The CloudBees CD/RO agent installation starts. A success prompt is shown when the installation is complete.

Configure autostart for non-root environments

For installations performed as a Windows Administrator or with Linux root or sudo privileges, CloudBees CD/RO components start automatically upon completing the installation and during system boot. However, for non-root/non-sudo Linux installations CloudBees CD/RO components do not have the permissions to start automatically.

To configure autostart for non-root or non-sudo Linux installations of CloudBees CD/RO components, refer to Configure autostart for non-root/non-sudo Linux installations.