Skip to content

Latest commit

 

History

History
110 lines (92 loc) · 4.27 KB

File metadata and controls

110 lines (92 loc) · 4.27 KB

Docker Compose for Harness CD Community Edition

This page contains the instructions to run Harness CD Community Edition using Docker Compose. The steps below use Docker Desktop for simplicity but can be used on any VM running docker and docker-compose.

Pre-requisites

  1. Install Docker and Docker Compose on your laptop or VM.

Hardware requirements

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

Note: Extra memory is required for delegate being setup using minikube which uses a docker driver. We recommend using 6g memory and 4 CPUS

Harness Community CD - Docker Installer

Start Harness CD

  1. If you are running on Windows or Mac, increase Docker Desktop memory and CPU by the numbers listed above. See Docker for Mac or Docker for Windows for details on increasing resources.

  2. Clone this repo.

    git clone https://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 CD.

    docker-compose up -d

    If this is your first time running the above command, then the docker images used in the docker-compose.yml file will now be pulled from DockerHub.

  5. Check status of all the processes using the command given below. Make sure all the services are up and healthy -

    docker-compose ps
  6. Wait for startup to complete.

    docker-compose run --rm proxy wait-for-it.sh ng-manager:7090 -t 180

Use Harness CD

  1. Open http://localhost/#/signup and complete the registration form. Now your Harness CD account along with the first (admin) user is created. If you have already completed this step, then login to Harness CD at http://localhost/#/signin
  2. Follow the Harness CD Community Edition quickstart

Troubleshooting

If you run into issues when installing Harness this section will help identify where the issue is.

View running processes
docker-compose ps
View logs of processes
docker-compose logs -f <NAME>

For example,

docker-compose logs -f manager

Note : For 504 Gateway timeout -> make sure the ng-manager service is healthy.

Support

Join the Harness Community Slack Join the Harness Community Forum

Profiles

Harness CD Community Edition supports multiple hardware profiles. The default profile is laptop for low resource environments. There is also a production profile available 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 CD

docker-compose down

Remove Harness CD

To uninstall your instance of Harness CD run the following command. The -v option deletes the docker volumes where the Harness CD data is stored.

docker-compose down -v

To also remove the Harness docker images from your system run

docker images --filter=reference='harness/*' --quiet | xargs docker rmi

Upgrade Harness CD

  1. Update this repository.
    git pull
  2. Pull any new images that may have been published.
    docker-compose pull
  3. Re-run docker compose.
    docker-compose up -d

Advanced Configuration

How to deploy the Harness to a separate environment

You simply need to 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 for this variable.
Example,

export HARNESS_HOST="192.168.0.1"