Harbormaster Install - (Enterprise:OnPrem Only)

Table of Contents

Harbormaster Platform is accessible in one of two ways:

  1. Directly through a web browser by connecting to an instance of Harbormaster. This is accomplished by connecting to an installed licensed version of Harbormaster (see next section).
  2. Through the Harbormaster Command Line Interface(CLI). The CLI can connect to an installed version of Harbormaster (see next section).

License File

In order to run Harbormaster, a valid non-expired license file is required.   The absolute path of the license file must be provided to Harbormaster at start up for validation and successful application deployment.  A license file is available for a project, line-of-business, or enterprise.  Contact sales@harbormaster.ai for more details.

Install Harbormaster Platform

These instructions will cover installation and access of the Harbormaster Platform via Docker image.

Pre-requisities

In order to run Harbormaster image in a Docker container you’ll need Docker installed.

* [Windows](https://docs.docker.com/windows/started)
* [OS X](https://docs.docker.com/mac/started/)
* [Linux](https://docs.docker.com/linux/started/)

Access

Before using the Harbormaster image, it has to first be pulled by issuing the following command:

docker pull theharbormaster/harbormaster

Usage

  • Run Via Docker Compose

The fastest way to run the Harbormaster along with its dependency on MySQL is to use Docker Compose.  Use this Docker Compile YAML file to run via Docker Compose. 

Note: Be sure to put your harbormaster.license file in the same directory as the docker-compose.yml file 

docker-compose up

  • Run Docker with persistent storage and access to a MYSQL instance

    Note: Be sure to put your harbormaster.license file in the same directory you are issuing the following command from. 
docker run -it -d -p 8080:8080 
-v /usr/harbormaster-data:/harbormaster-data
-v ./:harbormaster_root
-e HARBORMASTER_LICENSE=/harbormaster_root/harbormaster.license_file
-e DATABASE_URL=THE-MYSQL-URL
-e DATABASE_USERNAME=THE-MYSQL-USER-NAME
-e DATABASE_PASSWORD=THE-MYSQL-PASSWORD
theharbormaster/harbormaster:latest

When assigning the DATABASE_URL, it is only necessary to assign the IP address of a MySQL instance. The default port of 3306 is assumed.

Prerequisite

Installation of Docker and optional Docker Compose

Access The Installation

The application should be running and accessible on the exposed port. For example:

http://xxx.xxx.xxx.xxx:8080

where xxx.xxx.xxx.xxx is the IP address to the host server of the application.

Environment Variables

HARBORMASTER_LICENSE - Harbormaster will not run if the harbormaster.license is not discovered or if discovered it has expired.
DATABASE_URL - URL where the MySQL instance is located. Likely of the form xxx.xxx.xxx:3306
DATABASE_USERNAME - User name with read/write privileges
DATABASE_PW - Password for the user name

Volumes

`/user/harbormaster-data` - Optional location on the hosting server where application data will be written to.

Useful Image File Locations

`/usr/local/tomcat` - Root of the Apache Tomcat installation
`/usr/local/tomcat/webapps/ROOT` - Root directory of the Harbormaster installation

Install Harbormaster CLI

The Harbormaster CLI gives full command line access to a Harbormaster platform instance to help manage models, technology stacks and resources to generate, commit, build/test, deploy and archive fully functional DevOps projects.

The Harbormaster CLI is stored as a packaged Node.js application, managed by NPM @ npmjs.com. NPM is distributed with Node.js – which means that when you download Node.js, you automatically get NPM installed on your computer.

Download Node.js and npm

With Node.js and npm installed, you are ready to install the Harbormaster CLI. Issue the following on the command line.

npm install harbormaster-ai
npm link harbormaster-ai    # this command allows the term 'harbormaster' to be issued

Validation

Validate the install by typing

harbormaster

A list of commands and options should appear.

Authentication

harbormaster init [token] [hostUrl]

where token is your unique token assigned when you signed up for an account against a running instance of Harbormaster.  If you are unsure of the token value, it is available to copy under the API Token tab of the User Preferences screen.  The hostUrl is the server and port of a running instance of Harbormaster.  If not provided, localhost:8080 is assumed.