CloudBees Analytics server unattended installation

6 minute readAutomation

You can run the CloudBees Analytics server installer in unattended (silent) mode with no user interface on either Windows or Linux. This section includes information for adding a system to a CloudBees Analytics cluster during installation.

For details about the overall steps for installing CloudBees Analytics on a group of servers to create a CloudBees Analytics server cluster, refer to Installing the CloudBees Analytics Server in Cluster Mode.

Installation with other CloudBees CD/RO components

For a production environment, CloudBees recommends that you install the CloudBees Analytics server on a system other than systems running other CloudBees CD/RO components (such as the CloudBees CD/RO server, web server, repository server, or agent). If you must install it on the same system (such as for testing or other non-production or trial-basis situations), refer to CloudBees Analytics server with other components for details.

Silent installation arguments

The following argument table is an excerpt from the installer help text. You can view the full installer help by entering CloudBeesSDAAnalyticsServer-x64-<version> --help.

Argument Description

--dataDirectory <arguments>

Directory used to store binaries

Default value on Linux: /opt/cloudbees/sda.

Default value on Windows: %ProgramFiles%\CloudBees\Software Delivery Automation (usually: C:\Program Files\CloudBees\Software Delivery Automation)

--serverDisableSSL

Do not configure the CloudBees Analytics service to use SSL connections and authentication

Using this option is not recommended in production environments.

The CloudBees Analytics server uses the OpenSearch search engine to gather and store data from the CloudBees CD/RO server for use in the Deployments, Releases, and Release Command Center dashboards.

--serverDataDirectory < directory >

Path to the directory for data stored by CloudBees Analytics

  • New installations — The CloudBees Analytics server data directory will be used by default.

  • Upgrades—The existing directory will continue to be used by default.

--serverIndexNumberOfShards <arguments>

Number of primary shards that an index should have. Default value: 2

--serverInternalPort <arguments>

Port number used for internal communication between nodes within the CloudBees Analytics cluster. Default value: 9301

--serverMemoryMB <arguments>

Heap size in MB for the CloudBees Analytics service. Default value: 2048

--serverPort <arguments>

Port number to be used by the CloudBees Analytics service. Default value: 9201

--serverRegenerateCertificates

During the update, regenerate the certificates that are used by the CloudBees Analytics service

--serverPreferIPv4Stack <Yes or No>

If Yes, only IPv4 sockets can be used by the OpenSearch service, and communication with IPv6-only hosts is not possible. Default value: No

--serverPreferIPv6Addresses <Yes or No>

If Yes, the OpenSearch service uses IPv6 sockets where possible and IPv4 sockets where no IPv6 sockets are available. Default value: No

--serverUserPassword <arguments>

Password to use for regular access to the CloudBees Analytics server services. The installer automatically creates a user with the user name reportuser. This parameter lets you specify a password for this user. CloudBees recommends that you change the default password

If you do specify a password, the installer will generate a default password changeme.

--help

Display the information in this table

--hostName <arguments>

Host name or IP address to be used by the remote CloudBees CD/RO server to communicate with the CloudBees Analytics server. The default value is the current host name of the machine.

IPv6 addresses are only supported for Kubernetes platforms. If using an IPv6 address, enclose the address in square brackets. Example: [<IPv6-ADDRESS>].

--installDirectory <arguments>

Directory used to store binaries

Default value on Linux: /opt/cloudbees/sda

Default value on Windows: %ProgramFiles%\CloudBees\Software Delivery Automation (usually: C:\Program Files\CloudBees\Software Delivery Automation)

--mode <arguments>

Set the installer mode

Available values on Linux: console, silent or standard

Available values on Windows: silent or standard

--nonRoot

(Linux installations) Install as a non-root user or a user without sudo privileges. You cannot use this argument when logged in as the root user.

--remoteServer <arguments>

` <host>[:<port>]` of the remote CloudBees CD/RO server

--remoteServerPassword <arguments>

Password to use when logging in to the remote CloudBees CD/RO server

--remoteServerUser <arguments>

User name to use when logging in to the remote CloudBees CD/RO server

--temp <arguments>

Set the temporary directory used by this program

--unixServerGroup <arguments>

(Linux only) Group name that the CloudBees Analytics server services run as

This is required for silent installation on Linux.

--unixServerUser <arguments>

(Linux only) User name that the CloudBees Analytics server services run as

This is required for silent installation on Linux.

--version

Display installer version information

--windowsServerDomain <arguments>

(Windows only) Domain of the account the CloudBees Analytics server services will run as on Windows

Do not use this parameter if a local account used.

--windowsServerLocalSystem

(Windows only) Run the CloudBees Analytics server services as the local system account

--windowsServerPassword <arguments>

(Windows only) Password of the account that the CloudBees Analytics server services will run as

This is required for silent installation on Windows if the --windowsServerLocalSystem option is not specified.

--windowsServerUser <arguments>

User name of the account the CloudBees Analytics server services will run as on Windows

This is required for silent installation on Windows if the --windowsServerLocalSystem option is not specified.

Additional silent arguments for clustered installations

The following argument table is an excerpt from the installer help text. You can view the full installer help by entering CloudBeesSDAAnalyticsServer-x64-<version> --help.

Argument Description

--serverClusterDiscoveryHosts <list>

Comma-delimited list of other nodes in the CloudBees Analytics cluster that are likely to be live and reachable. The default is 127.0.0.1,[::1].

--serverClusterName <name>

The name of the CloudBees Analytics cluster. The default is analytics.

--serverClusterInitialMasterNodes <number>

Comma-delimited list of the master-eligible node names whose votes should be counted in the very first election to form an CloudBees Analytics cluster.

--serverNodeAdditional

This node is not the first node to be installed in the CloudBees Analytics cluster.

--serverNodeData <boolean>

This node holds data and performs data -related operations such as CRUD, search, and aggregations. The default is true.

--serverNodeIngest <boolean>

This node is able to apply an ingest pipeline to a document in order to transform and enrich the document before indexing. The default is true.

--serverNodeMaster <boolean>

This node is eligible to be elected as the master node, which controls the CloudBees Analytics cluster. The default is true.

--serverNodeName <name>

The name of this node in the CloudBees Analytics cluster. The default is the actual hostname.

--serverPublishHost <host>

The single interface that the CloudBees Analytics node advertises to other nodes in the cluster, so that those nodes can connect to it. The default is the value set by the --hostName argument.

--serverCACertificateFile <file>

The PKCS#12 file containing a CA-signed certificate for the CloudBees Analytics Server, any intermediate CA certificates and a private key.

You can omit this option for a new installation in non-clustered mode or for the first node in clustered mode. In this case, the installer will generate a new self-signed certificate and will use it to sign other TLS certificates.

Installing the CloudBees Analytics server

Enter one of the following commands from a command line.

  • Linux: sudo ./CloudBeesSDAAnalyticsServer-x64-<version> --mode silent <arguments>

  • Windows: CloudBeesSDAAnalyticsServer-x64-<version>.exe --mode silent <arguments>

where:

  • <version> is your CloudBees Analytics server version number.

  • <arguments> represents any additional silent install arguments.

For a successful installation in this mode, you must specify the following:

  • Linux: Use the --unixServerUser and --unixServerGroup options to specify the user name and group that the CloudBees Analytics server service runs as.

  • Windows: Use the --windowsServerUser, --windowsServerPassword, and --WindowsServerDomain options to specify the user name, password, and domain (if the account is not local) of the account the CloudBees Analytics server service runs as or the --windowsServerLocalSystem option to use the local system account.

Configuring autostart

For non-root/non- sudo Linux installations, you must configure autostart for the CloudBees Analytics services. For instructions, refer to Configure autostart for non-root/non-sudo Linux installations.

Configuring the CloudBees Analytics server

If you chose to skip the option to configure the remote CloudBees CD/RO server during the installation or upgrade of the CloudBees Analytics server, you must do so afterward to ensure connectivity and authentication between the CloudBees Analytics server and the CloudBees CD/RO server. To do this, navigate to Administration  Configurations  Analytics server. For details, refer to Configuring the CloudBees Analytics server.

Checking the CloudBees Analytics server configuration

You can confirm the correct CloudBees Analytics server settings by entering the following ectool command on the CloudBees CD/RO server command line:

ectool getAnalyticsServerConfiguration

Following is sample output:

<response requestId="1" nodeId="10.30.176.76"> <analyticsServerConfiguration> <analyticsServerConfigurationId>fd48b25e-e74a-11ee-9cbf-02425ed14558</analyticsServerConfigurationId> <analyticsServerUrl>https://prodhost.internal:9201</analyticsServerUrl> <createTime>2024-03-21T06:19:35.801Z</createTime> <enabled>1</enabled> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2024-03-21T06:20:21.521Z</modifyTime> <owner>admin</owner> <userName>reportuser</userName> </analyticsServerConfiguration> </response>

For details about the getAnalyticsServerConfiguration options, enter

ectool getAnalyticsServerConfiguration --help

Testing connectivity

After you enable connectivity and authentication between the CloudBees Analytics server and the CloudBees CD/RO server, you can perform a test by using one of the following methods:

  • Check the Test Connection option on the Administration  Configurations  Analytics server, then select Save.

  • Enter the following ectool command on the CloudBees CD/RO server command line:

    ectool setAnalyticsServerConfiguration --testConnection 1

    For details about the setAnalyticsServerConfiguration options, enter

    ectool setAnalyticsServerConfiguration --help

    For example, the following response appears if the user name or password is incorrect:

    ectool error [InvalidCredentials]: HTTP/1.1 401 Unauthorized: Access to 'https://prodserver.internal:9201' is denied due to invalid credentials.

    Also, for example, the following response appears if you specify an invalid analyticsServerUrl:

    ectool error [ConnectException]: HTTP/1.1 404 Not Found: Failed to connect to server on 'https://localhost:9201'.

    The following example shows the response when a valid analyticsServerUrl is used:

    ectool setAnalyticsServerConfiguration --analyticsServerUrl https://prodserver.internal:9201 --testConnection 1 <response requestId="1" nodeId="10.30.176.76"> <analyticsServerConfiguration> <analyticsServerConfigurationId>fd48b25e-e74a-11ee-9cbf-02425ed14558</analyticsServerConfigurationId> <analyticsServerUrl>https://prodserver.internal:9201</analyticsServerUrl> <createTime>2024-03-21T06:19:35.801Z</createTime> <enabled>1</enabled> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2024-03-21T06:20:21.521Z</modifyTime> <owner>admin</owner> <userName>reportuser</userName> </analyticsServerConfiguration> </response>