appagile-grafana

Deploy Grafana on AppAgile

Version: appagile-grafana, Grafana Version 4.1.2

This deployment supports the ephemeral storage model.

Prerequisites

Templates

|Name |Description

|appagile-grafana-template
|Template to create an ephemeral Grafana Instance

|appagile-grafana-dockerbuild-template
|Template to build the Grafana Docker image via S2I Dockerbuild and create an ephemeral Grafana instance

Add templates to be used later. These Templates can be found at https://gitlabappadev.tsi-af.de/OSE3/appagile-grafana/tree/master/ose-artefacts. Put them into namespace openshift, so that they can be accessed from every project.

$ oc create -f ose-artefacts/appagile-grafana-template.json -n openshift

$ oc create -f ose-artefacts/appagile-grafana-dockerbuild-template.json -n openshift

 

Deploying Grafana with ephemeral storage.

oc process appagile-grafana-template -v DOCKER_IMAGE=vmapgmucrep01.appacd.tsi-af.de:5000/public/appagile-grafana:1.0.0,HOSTNAME_HTTP=grafana.yourproject.appad3.tsi-af.de | oc create -f -
  • The Grafana UI will be accessible via the HOSTNAME_HTTP path.
  • A GRAFANA_ADMIN_USER and GRAFANA_ADMIN_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. These credentials are required when logging into the Grafana UI.

Building and Deploying Grafana with ephemeral storage.

oc process appagile-grafana-dockerbuild-template -v SOURCE_SECRET=my-github-secret,HOSTNAME_HTTP=grafana.yourproject.appad3.tsi-af.de,SOURCE_REPOSITORY_URL=https://gitlabappadev.tsi-af.de/OSE3/appagile-grafana.git | oc create -f -
  • The SOURCE_SECRET should refer to the name of the secret that allows access to the private source repository
  • The Grafana UI will be accessible via the HOSTNAME_HTTP path.
  • GRAFANA_ADMIN_USER and GRAFANA_ADMIN_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. These credentials are required when logging into the Grafana UI.
  • SOURCE_REPOSITORY_REF can be optionally provided if the build should use other than the default branch.
  • CONTEXT_DIR may be provided if it is not supposed to be the root of the repository. The default is image.
  • GITHUB_WEBHOOK_SECRET will be generated if not provided to allow the configuration of a webhook.

To tweak the default configuration of Grafana, edit the link:https://gitlabappadev.tsi-af.de/OSE3/appagile-grafana/blob/master/image/conf/grafana.ini.tmp[image/conf/grafana.ini.tmp] before building.

Connecting Grafana to InfluxDB

After successful login into the Grafana UI, an InfluxDB with data from Telegraf can be configured as a data source using the following settings:

|Name |Description

|Type
|InfluxDB

|Url
|http://influxdb:8086 (given that a service named ‘influxdb’ is accessible) / influxdb.yourproject.appad3.tsi-af.de (given that such a route exists)

|Access
|proxy / direct (if InfluxDB is accessible directly from the users browser via a route)

|Database
|telegraf

|User
|if set on the database

|Password
|if set on the database