Skip to content

Latest commit

 

History

History
81 lines (70 loc) · 3.1 KB

File metadata and controls

81 lines (70 loc) · 3.1 KB

Harness Community Edition - Docker Compose

This page contains the instructions necessary to run Harness CE using Docker Compose.

Pre-requisites

  1. Install Docker and Docker Compose on your system

Hardware requirements

  • 4 CPUs or more
  • 4GB of free memory
  • 20GB of free disk space
  • Internet connection

Installing Harness

  1. Increase Docker Desktop memory to 4GB and CPU to 4
    For Docker Desktop, see Docker for Mac or Docker for Windows for details on increasing resources
  2. Clone this repo
    git clone git@github.com:harness/harness-cd-community.git
    cd harness-cd-community/docker-compose/harness
  3. If you are running Docker Desktop on Windows or Mac skip this step. If you are running on Linux or wish to run a production install then please see Advanced Configuration to set the hostname of your machine.
  4. Start harness
    docker-compose up -d
  5. Wait for startup to complete
    docker-compose run --rm proxy wait-for-it.sh ng-manager:7090 -t 180

Using Harness

  1. Open http://localhost/#/signup
  2. Complete the signup form
  3. You need to install a Harness delegate before you can run pipelines, see Install a Docker Delegate
  4. For help with getting started, read the Harness documentation

Profiles

Harness supports multiple hardware profiles the default profile being laptop for low resource environments and production for use in more demanding environments.

To run the production profile use this startup command

docker-compose -f docker-compose.yml -f profile-production.yml up -d

Stop Harness

docker-compose down

Remove Harness

docker-compose down -v

Upgrading an existing Harness Installation

  1. Update this repository
    git pull
  2. Re-run docker compose
    docker compose up -d

Advanced Configuration

How to deploy the Harness Delegate to a separate environment

You simply need to set the HARNESS_HOST environment variable, see Set hostname environment variable below.

Set hostname environment variable

  1. Set the HARNESS_HOST environment variable, this should be the IP address or hostname of the machine where you are deploying Harness. You cannot use localhost.
    Example,
    export HARNESS_HOST="192.168.0.1"

Airgapped installation

The above scripts will require connectivity to Dockerhub. In case connectivity to Dockerhub is not available, you can follow the steps as below

  1. Use the script download_images.sh to download the docker images.
  2. You can then tar this entire folder and copy it to the target VM
  3. Use the script unpack_images.sh to load the images onto the VM.
  4. Use the start.sh script to start Harness.