Installing with the interactive command-line installer

7 minute readReference

The command-line user interface installation method is supported only by Linux platforms. In this mode, additional command line parameters that are listed in CloudBees Analytics Server Silent Unattended Installation Example can be used. The following procedure includes instructions 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, see Installing the CloudBees Analytics Server in Cluster Mode .

Installing on a system 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) see CloudBees Analytics server with other components for details.

Installing the CloudBees Analytics server

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

    chmod +x ./CloudBeesFlowDevOpsInsightServer-x64-<version>
  2. Choose one of the following commands to begin the installation:

    • For installations with root or sudo privileges, enter:

      ./CloudBeesFlowDevOpsInsightServer-x64-<version>

    • For installations with root or sudo privileges and the X Window System, override the installer GUI by entering:

      ./CloudBeesFlowDevOpsInsightServer-x64-<version> --mode console

    • For non-root/non- sudo installations, enter:

      ./CloudBeesFlowDevOpsInsightServer-x64-<version> --mode console --nonRoot

      (After this command, enter Y at the following message:

      Do you want to proceed installation as non-root user? [n/Y] )

      The following prompt appears:

      Logging to "/tmp/ijtmp_00CB8424-9E21-C4E5-3357-0E5B11BADFA6/installer-EFlowReportServ.log"
      Installing temporary...
      Copyright (c) 2006-2018, CloudBees, Inc. All rights reserved.
      
      This will install {SDA-ANALYTICS} Server on your computer.  Continue? [n/Y]
      
      [source,bash]
  3. Continue the installation by entering y.

    The following prompt appears:

    Specify the install directory (for binaries) [/opt/cloudbees/sda]
  4. Press Enter to accept the default installation directory, or enter a new installation directory path for program files and binaries.

    The following prompt appears:

    Specify the data directory (for data files, configurations and logs) [/opt/cloudbees/sda]
  5. Press Enter to accept the default installation directory, or enter a new installation directory path for data files, configurations, and logs.

    The following prompt appears:

    Specify the user the services will run as []
  6. Enter the name of the user who owns the CloudBees Analytics server processes.

    The following prompt appears:

    Specify the group the services will run as [<primary group>]
  7. Enter the name of the group who owns the CloudBees Analytics server processes, or accept the default primary group of the chosen user by pressing Enter.

    The following prompt appears:

    Choose the port which will be used by Elasticsearch [9200]

    The CloudBees Analytics server uses the Elasticsearch search engine and the Logstash data-collection engine to gather data from the CloudBees CD/RO server for use in the CloudBees Analytics dashboards.

  8. If you want to specify a non-default port number, enter that number, or accept the default port number by pressing Enter.

    The following prompt appears:

    Choose the port which will be used by the Elasticsearch service for communication between nodes within the Elasticsearch cluster [9300]

    This port is used for internal communication between nodes within the Elasticsearch cluster.

  9. If you want to specify a non-default port number, enter that number, or accept the default port number by pressing Enter.

    The following prompt appears:

    Choose the port which will be used by Logstash [9500]
  10. If you want to specify a non-default port number, enter that number, or accept the default port number by pressing Enter.

    The following prompt appears:

    Choose the port which will be used by the Logstash service for the Logstash monitoring APIs [9600]

    This port is used by the Logstash monitoring APIs that provide runtime metrics about Logstash.

  11. If you want to specify a non-default port number, enter that number, or accept the default port number by pressing Enter.

    The following prompt appears:

    Do you want to specify additional Elasticsearch cluster mode settings? [y/N] y
  12. (Optional) Enter y if you want to add this system to a CloudBees Analytics server cluster. Otherwise, enter n.

    If you enter y, the following prompt appears:

    Specify the name of the Elasticsearch cluster [elasticsearch]
    The following prompts related to the cluster are skipped if you declined to configure it automatically.
  13. Enter the name of the cluster.

    The following prompt appears:

    Specify comma-delimited list of other nodes in the Elasticsearch cluster that are likely to be live and reachable [127.0.0.1,[::1]]
  14. Enter any additional nodes that are running CloudBees Analytics and can become part of the cluster.

    These can be nodes (whether they are master-eligible or not). You can enter any combination of IP addresses or host names.

    The following prompt appears:

    Specify minimum number of master-eligible nodes that must be visible in order to form an Elasticsearch cluster [1]
  15. Enter the minimum number of master-eligible nodes that must be visible in order to form a cluster.

    For details about how to determine how many master-eligible nodes you need for your cluster, see Installing the CloudBees Analytics Server in Cluster Mode . The master node will be elected from the list of master-eligible nodes.

    For details about master-eligible nodes and master elections, see "Node" and "Zen Discovery" sections in the Elasticsearch Reference on https://www.elastic.co.

    IMPORTANT:

    If you specify 1, you are asked to confirm this number in the following warning:

    The minimum number of master eligible nodes is set to 1. This can result in data loss in case of network failure in a cluster with two or more master eligible nodes.
    Please refer to the {PRODUCT} Installation Guide for more details.
    Please confirm if you would like to proceed. [N/y] n

    To prevent data loss in case of network failure, the minimum number of master-eligible nodes that must be visible in the cluster must be set to a quorum of master-eligible nodes:

    (Number of master-eligible nodes in the cluster / 2) + 1

    For example, in a cluster with three master-eligible nodes, the minimum number of master-eligible nodes should be set to 2.

    The minimum number of master-eligible nodes should be set to 1 only if you intend to run a single-node cluster. For a multi-node cluster, the minimum number of master-eligible nodes must be set to a quorum as described above.

    The following prompt appears:

    Specify the name of this node in the Elasticsearch cluster [loc-10-lin-ub1604-64]
  16. Enter the name of this node in the cluster.

    This serves as a unique identifier and therefore must be a unique name in the cluster.

    The following prompt appears:

    Is this node the first node to be installed in the Elasticsearch cluster? [n/Y] y
  17. If this is the first node that you are adding to the cluster, enter y.

    The following prompts appear:

    The first node will be automatically configured as eligible to be elected as the master node.
    The first node will be automatically configured to hold data and perform data related operations.
    Installer will automatically create a user with user name "reportuser" to connect to Elasticsearch.
    Specify a password for this user []
  18. Enter the password that will be used to access the server. The installer will automatically create a user named reportuser with the password that you provide. If you do not specify a password, the installer generates a default password changeme.

    The installer asks you to confirm the password that you entered. Enter the same password as before.

    The following prompt appears:

    Do you want to provide the certificate file containing a CA-signed certificate for the CloudBees Analytics Server, any intermediate CA certificates and a private key? [y/N]

  19. If you want to use your own certificate file, enter y and then enter the file path at the Specify the PKCS#12 certificate file [] prompt, or enter n.

    You can enter n 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.

    The following prompt appears:

    Specify the directory for data stored by Elasticsearch if the Elasticsearch data should be stored in a different location than the {SDA-ANALYTICS} Server data directory.
  20. If you want specify a non-default directory to contain the Elasticsearch index data, enter that directory path, or accept the default directory by pressing Enter.

    This option is useful if the system lacks enough disk space for the expected growth of data on the volume containing the default data directory.

    The following prompt appears:

    Do you want to specify the remote {PRODUCT} server which will be configured to interact with the services being installed? [n/Y]
  21. Enter y if you want to automatically configure the remote CloudBees CD/RO server to interact with the services being installed.

    The following prompts related to the configuration of the remote CloudBees CD/RO server are skipped if you declined to configure it automatically.

    The following prompt appears:

    Specify the host[:port] of the remote {PRODUCT} server []
  22. Enter the name of the CloudBees CD/RO server that will communicate with this CloudBees Analytics server. If the remote server is using a non-default HTTPS port, you must specify the host name as <host>:<port>. If you do not specify a port, HTTPS port 8443 is assumed (the same as the CloudBees CD/RO server default port).

    The following prompt appears:

    Specify the user name with which to login to "<remote host>" [admin]
  23. Enter the name of a CloudBees CD/RO user on the CloudBees CD/RO server who has sufficient privileges to edit server settings. This field defaults to the CloudBees CD/RO-supplied admin user.

    The following prompt appears:

    Specify the password for "<remote user>" on "<remote host>" []
  24. Enter the password for the CloudBees CD/RO user. The default password for the admin user is changeme.

    The following prompt appears:

    The {SDA-ANALYTICS} Server will be configured on {PRODUCT} server version <version> on <remote host>

    CloudBees CD/RO is installed on the machine. When the installation completes successfully, a message that contains the line Installation complete appears.

Configuring Autostart

For non-root/non-sudo Linux installations, you must configure autostart for the CloudBees Analytics services. For instructions, see Configuring Services 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 ConfigurationsAnalytics server. For details, see 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 getDevOpsInsightServerConfiguration

Following is sample output:

<response requestId="1" nodeId="192.168.5.138">
    <devOpsInsightServerConfiguration>
      <devOpsInsightServerConfigurationId>12642169-71c4-11e7-8a08-0050568f29b0</devOpsInsightServerConfigurationId>
      <createTime>2017-07-26T05:34:19.404Z</createTime>
      <elasticSearchUrl>https://192.168.5.54:9200</elasticSearchUrl>
      <enabled>1</enabled>
      <lastModifiedBy>admin</lastModifiedBy>
      <logStashUrl>https://192.168.5.54:9500</logStashUrl>
      <modifyTime>2017-07-26T05:40:13.458Z</modifyTime>
      <owner>admin</owner>
      <userName>reportuser</userName>
    </devOpsInsightServerConfiguration>
  </response>

For details about the getDevOpsInsightServerConfiguration options, enter

ectool getDevOpsInsightServerConfiguration --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 checkbox on the Administration ConfigurationsAnalytics server select OK.

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

    ectool setDevOpsInsightServerConfiguration --testConnection 1

    For details about the setDevOpsInsightServerConfiguration options, enter

    ectool setDevOpsInsightServerConfiguration --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://192.168.5.54:9500' is denied due to invalid credentials.

    Also, for example, the following response appears if you specify an invalid elasticSearchUrl or logstashUrl :

    ectool error [InvalidUrl]: The url 'https://192.168.5.54:9500' is invalid

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

    ectool setDevOpsInsightServerConfiguration
      --elasticSearchUrl https://192.168.5.54:9200 --testConnection 1