Harbormaster Platform is accessible in one of three ways:
- Directly through a web browser by connecting to an instance of Harbormaster. This is accomplished by either using the SaaS version of Harbormaster or connecting to an installed version of Harbormaster (see next section).
- Through the Harbormaster Command Line Interface(CLI). The CLI can connect to the SaaS version of Harbormaster (default) or to an installed version of Harbormaster (see next section).
- This 3rd option requires no installation and allows you to leverage the power of a CI platform with a preconfigured YAML to automatically download an run the Harbormaster CLI. Learn more about this technique and supported CI platforms.
Install Harbormaster Platform
These instructions will cover installation and access of the Harbormaster Platform via Docker image.
In order to run Harbormaster image in a Docker container you’ll need Docker installed.
* [OS X](https://docs.docker.com/mac/started/)
Before using the Harbormaster image, it has to first be pulled by issuing the following command:
docker pull theharbormaster/harbormaster
- 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:
- Run as Default
By default, the image will attempt to to run against a remote MySQL-8 instance hosted by Harbormaster, but there is no guarantee of its uptime. However, accessing this instance will give you access to all the latest publicly available techstacks and models. Likewise, it will expose all your publicly defined techstacks and models to the community.
To run the image with its defaults, issue the following command:
docker run -it -d -p 8080:8080 theharbormaster/harbormaster:latest
- Run with data storage to a local volume
To run the image using a local volume on the hosting server, issue the following command:
docker run -it -d -p 8080:8080 -v /usr/harbormaster-data:/harbormaster-data theharbormaster/harbormaster:latest
Directory /usr/harbormaster-data must exist for this command to execute successfully.
- Run using a specific MySQL instance
If you would like to store data to a separate MySQL-8 instance, you need to provide the connection parameters to the instance.
docker run -it -d -p 8080:8080
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.
Installation of Docker Compose
Access The Installation
The application should be running and accessible on the exposed port. For example:
where xxx.xxx.xxx.xxx is the IP address to the host server of the application.
Optional Environment Variables
Only required when connecting to a separate MySQL-8 instance.
`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
`/user/realmethods-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
Validate the install by typing
A list of commands and options should appear.
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.