Containerized Deployment
If your organization uses Kubernetes or Red Hat OpenShift, OpenNMS makes a Helm chart available to simplify Horizon deployment. For information on deploying in a Docker environment, see the Docker tabs in installation and configuration.
The OpenNMS Helm Chart is based and tested against the latest Horizon. The minimum version available is Horizon 32.x.
Before you begin
You must have a deep understanding of containerized environments (Kubernetes, Red Hat OpenShift) and Helm, which is the package manager for Kubernetes.
You should also be familiar with Horizon, its components, and how the environment works.
Requirements
External dependencies
Horizon requires the following as part of its monitoring environment. Make sure to set them up, with SSL enabled, before deploying Horizon.
-
PostgreSQL server as the central database for OpenNMS and Grafana.
-
For Google Cloud, the solution was tested using Google SQL for PostgreSQL with SSL and a private IP.
-
-
Elasticsearch cluster for flow persistence
-
Grafana Loki server for log aggregation
-
logcli helps extract OpenNMS logs from the command line for troubleshooting purposes.
-
-
cert-manager to provide HTTPS/TLS support to the web-based services the ingress controller manages.
-
A
ClusterIssuer
to use it across multiple independent Horizon installations.
-
-
Nginx Ingress Controller, as the solution has not been tested with other Ingress implementations.
Deployment on Kubernetes
Once you have set up Helm properly, use the following commands to deploy Horizon on Kubernetes:
helm repo add opennms https://opennms.github.io/helm-charts
helm install monms opennms/horizon --set domain=domain1.com --create-namespace
Update configuration values in the values.yml
file, as required, for your environment.
These values include various passwords (Kafka, database, PostgreSQL), timezone, CPU limits, and so on.
For a list of values and their defaults, see Values in the project’s readme file on GitHub.
Installation on OpenShift
There are a few known issues and limitations with installation on OpenShift:
-
Removing
CAP_NET_RAW
capability or setting allowPrivilegeEscalation to false will impact ICMP and auto discovery features.-
WORKAROUND: Use a Minion that is located outside of the OpenShift cluster.
-
-
By default, OpenNMS will create a ClusterRole, ClusterRoleBinding, Route, SecurityContextConstraints, and ServiceAccount. The user used to install OpenNMS must have the required permissions to make these modifications the OpenShift Cluster, including admin access. There are options to disable the creation of these elements, but if you do so, you will need to figure out a way to get the pods to work.
To install Horizon on OpenShift, follow these steps:
-
Log in to OpenShift and switch to Developer view.
-
Create a project with a unique name.
-
Go to the Helm section.
-
In the Create drop-down menu, select Repository.
-
In the Create Repository page,
-
Add a unique name and display name.
-
Use https://opennms.github.io/helm-charts/ for the URL.
-
Save the changes.
-
-
In the Create drop-down menu, select Helm Release.
-
Under Repository, select the newly created repository entry.
-
Click on Horizon.
-
Make sure that the project name matches the name you set in step 2.
-
Skip this step if you are setting “CreateNamespace” option to true.
-
-
Make the required modifications (for example, set the PostgreSQL information).
-
Click Create.
-
Wait for the pods to come up. This may take a few minutes.
The process to install the Minion is similar. |