How to release Horizon Docker Images

From OpenNMS
Jump to: navigation, search

This article describes how the Docker images for OpenNMS Horizon and Minion which are available to the public DockerHub registry.


  • git on your local system
  • Permissions to create branches and commit to docker-horizon-core-web and docker-minion GitHub repository

What is the Tool Chain

The following services and tools are used to build the images:

  • GitHub repository with Docker files and scripts for Horizon and Minion.
  • CircleCI to build and publish the Horizon Docker Images and Docker Minion Images to the DockerHub Image registry
  • DockerHub as Image registry where users can download the Docker Images from
  • Official OpenNMS YUM repository with the RPMS to install Horizon and Minion

For drift and bleeding images, they are schedule triggered in CircleCI and are builds and published every night automatically. The logic how the images are built and published is described in the .circleci/config.yml file.

Horizon and Minion have floating versioning, which means the latest stable release is available as "stable" in YUM. Bleeding edge releases which are the latest successful build from Bamboo in the develop branch can be installed from "develop". As of today, there is no reliable instruction which allows installing a specific version of Horizon from YUM. When a new version of OpenNMS Horizon and Minion have released a build triggering an install from "stable" needs to be released.

The Docker repository for Horizon and Minion use branches to build different Docker Image versions. Changes to the following branches publish Docker Images to DockerHub:

  • master: Changes to master trigger a build which installs from yum develop repository
  • drift: Changes to the drift branch trigger a build which installs from the yum features/branch/drift repository
  • release/*: Any branch with prefix "release/" triggers a build which installs from yum stable repository

Publish a new stable release

We are at Horizon version 21.1.0-1 and the version 22.0.0-1 should be published. These steps trigger a build and push a built Horizon and Minion Docker images to DockerHub.

Step 1

Clone the repository locally and checkout out an existing last stable release

git clone
cd docker-horizon-core-web
git checkout -b release/21.1.0-1 origin/release/21.1.0-1
git clone
cd docker-minion
git checkout -b release/21.1.0-1 origin/release/21.1.0-1
Step 2

Create a new branch for the new stable release version in this example the new release is Horizon 22.0.0-1

cd docker-horizon-core-web

# Verify branch should be release/21.1.0-1
git branch 
* release/21.1.0-1

# Create a new branch 22.0.0-1
git checkout -b release/22.0.0-1
cd docker-minion

# Verify branch should be release/21.1.0-1
git branch 
* release/21.1.0-1

# Create a new branch 22.0.0
git checkout -b release/22.0.0
Step 3

Add in the README the new version for the Docker image tag, it is the same for the Horizon and Minion image.

* 22.0.0-1, latest is a reference to last stable release of Horizon / Minion

git commit -m "Publish 22.0.0-1 version"

# By pushing the branch, the build is triggered
git push --set-upstream origin release/22.0.0-1