Harness Disconnected On-Prem Setup

Updated 2 weeks ago by Michael Cretzman

This document describes the process for setting up the trial version of Harness Disconnected On-Prem. For more information, contact Harness at harness.io/contact.

Harness Disconnected On-Prem is run entirely within your enterprise network (on-premises), as opposed to Harness SaaS, which is the Harness cloud offering, and Harness Connected On-Prem, which runs in your cloud environment.

In this topic:

For more information, see Kubernetes Connected On-Prem Setup, Docker Connected On-Prem Setup, On-Prem Overview, and Harness Architecture.

Intended Audience

  • System Administrators
  • Network Administrators
  • DevOps

Installation Overview

The Harness platform comprises 5 micro-services:

  • Harness Manager
  • Machine Learning Engine
  • Database
  • Nginx Proxy

Each micro-service is containerized and is deployed on the physical machine where you install Harness.

Before You Begin

Setting up Harness Disconnected On-Prem requires the following:

  • Recommended server specification for Harness: 16 cores, 32GB Memory, 250GB Disk.
  • Packages: Docker, cURL, sed.
  • Default settings on the Linux machine(s) where you run the installer (for example, 0022 unmask).

Set Up Harness Disconnected On-Prem

The following procedure sets up Harness on one physical server.

To set up Harness Disconnected On-Prem, do the following:

  1. Start Docker. The Docker daemon must be running before you begin Harness installation.
  2. Obtain the Set Up Harness Disconnected On-Prem tar file from Harness. It is named harness_installer_version.tar.gz. Contact Harness via the Web at harness.io/contact.
    The tar file contains the following:
    • The harness_installer folder.
    • Harness Disconnected On-Prem.
    • The install_harness.sh and stop_harness.sh scripts.
    • MongoDB.
  3. Extract the Set Up Harness Disconnected On-Prem tar file (tar -xvf harness_installer_version.tar.gz). The harness_installer folder appears.
  4. Open a terminal and navigate to the harness_installer folder.
  5. In the folder you will see several files, such as accountdetails.properties. You will need to edit these files before running the Harness installer.
  6. Open accountdetails.properties in a text editor, and edit the following settings.

    Setting

    Description

    AccountName

    Enter a name for your Harness account.

    CompanyName

    Enter your company's name.

    AdminEmail

    Enter the email address of the person in your company that will act as the Harness administrator. The email address must be in lowercase.

  7. Open inframapping.properties in a text editor, and edit the HOST1_IP_ADDRESS property. Enter the external, public IP address of the host that will run Harness.
  8. Open config.properties in a text editor.
  9. For runtime_dir, enter the absolute path where Harness will store its local files. For example, /home/johndoe/Desktop/Harness.
  10. In a terminal, run install_harness.sh as sudo. You can pass in the runtime directory as an argument to set where Harness is installed. Without the argument, the script defaults to the $HOME directory and Harness is installed in $HOME/harness_runtime.

    This script populates the server with Harness and MongoDB. The script will output a URL using the public IP address you provided in inframapping.properties.
  11. Navigate to the printed URL. This is the Harness Manager log in.
  12. Log into Harness using the email address you entered in accountdetails.properties in AdminEmail. The default password for the account is admin.
  13. Start setting up Harness by downloading and installing a Harness Delegate as described in Delegate Installation.

Upgrade Harness Disconnected On-Prem

Do not delete the existing runtime directory of Harness before upgrading. The runtime directory is used to upgrade.

To upgrade your Harness Disconnected On-Prem installation, do the following:

  1. When you receive an upgrade to Harness Disconnected On-Prem, extract the harness_installer_version.tar.gz file.
  2. Open the harness_installer folder in a terminal.
  3. Run the install_harness.sh script as sudo.

    If you specified a runtime directory when you first installed Harness, ensure you use the same runtime directory as an argument when running install_harness.sh.

    If no argument was provided during the first time installation, there is no need to pass an argument while upgrading. The installer will use the default runtime directory location of $HOME/harness_runtime where it was first installed.
  4. Navigate to the URL printed by the script. This is the Harness Manager log in.
  5. Log in to Harness.
You do not need to download and install a new Delegate. Any existing Delegates will upgrade and locate the upgraded Harness.

Adding a New License

To add a new license to your Harness Disconnected On-Prem, do the following:

  1. Request a new license key from your Harness Sales Engineer or Customer Success contact.
  2. In your Harness installation directory, open config.properties.
  3. Replace the licenseInfo with the new license key.
  4. Run the following: install_harness.sh <YOUR RUNTIME DIRECTORY>
You can omit <YOUR RUNTIME DIRECTORY> if you have the runtime directory as $HOME/harness_runtime.

The command will restart Harness with the new license key.

Enabling a Feature Flag

In some cases, Harness will have a new feature that may only be enabled via a feature flag.

To turn on the feature flag for a feature, do the following:

  1. Navigate to the $INSTALLER_DIRECTORY/config_template/manager/manager.properties file.
  2. Add <Feature_Name> to FEATURES.
  3. Run the Harness install again with the runtime directory if needed.

Troubleshooting

The following troubleshooting steps will help you diagnose and fix problems you might encounter.

Port Errors

The default port for Harness Disconnected On-Prem is 7143. Some deployment environments, such as AWS EC2, might require you to open inbound port 7143 manually, or even a TCP port range such as 7143 through 7153, to enable traffic to Harness Disconnected On-Prem.

Run Harness Disconnected On-Prem on Different Port

The default port for Harness Disconnected On-Prem is 7143. If you would like to run Harness Disconnected On-Prem on a different port, do the following:

  1. Extract the harness_installer_version.tar.gz file (tar -xvf harness_installer_version.tar.gz).
  2. Navigate to the file config_template/proxy/proxyconfig.properties.
  3. Change the proxy_port=7143 to the new port.
  4. Rerun the installation.
To keep using the new port after each upgrade, the steps above must be performed each time you upgrade.

Docker is Not Running on the Server

The Docker daemon must be running on the server for the installation and running of Harness Disconnected On-Prem. For information on running the Docker daemon, see Configure and troubleshoot the Docker daemon from Docker.

Add Custom Load Balancer In Front Proxy

If you want to use a custom load balancer in front of the proxy server, do the following:

  1. Open the install_harness.sh script in a text editor.
  2. Locate the string, LOAD_BALANCER_URL=http://$host1:$proxyPort. It is around line 200 in the setupManager() function.
  3. Change the LOAD_BALANCER_URL value to the load balancer URL.
  4. Ensure that the load balancer is routing requests to port 7143 on the installation machine.
  5. Clean up the Harness runtime directory. The runtime directory is set in the config.properties file.
  6. Rerun the installation.

Docker CE Cannot be Installed on RedHat 7.x

If you wish to run Harness Disconnected On-Prem on RedHat (RHEL) 7.x, see the article Docker Tip #39: Installing Docker CE on RedHat (RHEL) 7.x.

Cannot Log Into Harness after Installation

Check if the AdminEmail value in the accountdetails.properties file contains any uppercase characters. It may only contain lowercase characters.


How did we do?