Install from Source

Build

Download the source tree into a subfolder called opennms-helm-app in Grafana’s plugin directory:

mkdir -p /var/lib/grafana/plugins
cd /var/lib/grafana/plugins
git clone https://github.com/OpenNMS/opennms-helm.git opennms-helm-app

Compile the application:

cd /var/lib/grafana/plugins/opennms-helm-app
npm install
npm run build

Restart Grafana:

systemctl restart grafana-server

Build Docker Image from source

You need to compile the source code as described in the "Build" section. Create a tarball artifact from compiled source code:

mkdir -p ./artifacts
tar --exclude='.git' \
    --exclude='.circleci' \
    --exclude='./artifacts' \
    -czf "./artifacts/opennms-helm.tar.gz" .

Build Docker image and install the plugin from the tarball artifact:

docker build \
    --build-arg GRAFANA_VERSION=latest \
    --build-arg OPENNMS_HELM_VERSION=SNAPSHOT \
    -t myhelm:snapshot .

Run the build Docker image:

docker run -p 3000:3000 myhelm:snapshot

To build the Docker image the following conventions for build arguments are set:

  • GRAFANA_VERSION: The version number of Grafana, default is latest

  • OPENNMS_HELM_VERSION: Used as in label org.opennms.helm.version in the Docker image to identify the running version

Next Steps

See Getting Started with Helm for help in setting up your first dashboard.