appagile-influxdb

Deploy InfluxDB on AppAgile

Version: appagile-influxdb, InfluxDB Version 1.2.0

This deployment supports the ephemeral and persistent storage models.

Prerequisites

Templates

|Name |Description

|appagile-influxdb-ephemeral-template
|Template to create an ephemeral InfluxDB instance.

|appagile-influxdb-ephemeral-dockerbuild-template
|Template to build the InfluxDB Docker image via S2I Dockerbuild and create an ephemeral InfluxDB instance.

|appagile-influxdb-persistent-template
|Template to create a persistent InfluxDB instance.

|appagile-influxdb-persistent-dockerbuild-template
|Template to build the InfluxDB Docker image via S2I Dockerbuild and create a persistent InfluxDB instance.

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

$ oc create -f ose-artefacts/appagile-influxdb-ephemeral-template.json -n openshift
 $ oc create -f ose-artefacts/appagile-influxdb-ephemeral-dockerbuild-template.json -n openshift
 $ oc create -f ose-artefacts/appagile-influxdb-persistent-template.json -n openshift
$ oc create -f ose-artefacts/appagile-influxdb-persistent-dockerbuild-template.json -n openshift

 

Deploying InfluxDB with ephemeral storage.

oc process appagile-influxdb-ephemeral-template -v DOCKER_IMAGE=vmapgmucrep01.appacd.tsi-af.de:5000/public/appagile-influxdb:1.0.0,HOSTNAME_HTTP=influxdb.customurl.appad3.tsi-af.de,INFLUXDB_DB_NAME=myinfluxdb | oc create -f -
  • InfluxDB will be accessible externally via the HOSTNAME_HTTP path.
  • A name for the database that will be created on container startup can be provided via INFLUXDB_DB_NAME. Otherwise the default is myinfluxdb.
  • An INFLUXDB_DB_USER and INFLUXDB_DB_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. A user will be created on container startup with all privileges granted regarding the database named by INFLUXDB_DB_NAME.
  • An INFLUXDB_ADMIN_USER and INFLUXDB_ADMIN_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. An admin user will be created on container startup with all privileges granted.

 

Building and Deploying InfluxDB with ephemeral storage.

oc process appagile-infuxdb-ephemeral-dockerbuild-template -v SOURCE_SECRET=my-github-secret,HOSTNAME_HTTP=influxdb.customurl.appad3.tsi-af.de,INFLUXDB_DB_NAME=myinfluxdb,SOURCE_REPOSITORY_URL=https://gitlabappadev.tsi-af.de/OSE3/appagile-influxdb.git | oc create -f -
  • The SOURCE_SECRET should refer to the name of the secret that allows access to the private source repository
  • The InfluxDB will be accessible externally via the HOSTNAME_HTTP path.
  • 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.
  • A name for the database that will be created on container startup can be provided via INFLUXDB_DB_NAME. Otherwise the default is myinfluxdb.
  • An INFLUXDB_DB_USER and INFLUXDB_DB_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. A user will be created on container startup with all privileges granted regarding the database named by INFLUXDB_DB_NAME.
  • An INFLUXDB_ADMIN_USER and INFLUXDB_ADMIN_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. An admin user will be created on container startup with all privileges granted.

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

 

Deploying InfluxDB with persistent storage.

oc process appagile-influxdb-persistent-template -v DOCKER_IMAGE=vmapgmucrep01.appacd.tsi-af.de:5000/public/appagile-influxdb:1.0.0,HOSTNAME_HTTP=influxdb.customurl.appad3.tsi-af.de,INFLUXDB_DB_NAME=myinfluxdb | oc create -f -
  • InfluxDB will be accessible externally via the HOSTNAME_HTTP path.
  • A name for the database that will be created on container startup can be provided via INFLUXDB_DB_NAME. Otherwise the default is myinfluxdb.
  • An INFLUXDB_DB_USER and INFLUXDB_DB_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. A user will be created on container startup with all privileges granted regarding the database named by INFLUXDB_DB_NAME.
  • An INFLUXDB_ADMIN_USER and INFLUXDB_ADMIN_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. An admin user will be created on container startup with all privileges granted.
  • The size of the volume claim can be defined via PERSISTENT_VOLUME_CLAIM_SIZE. The default is 5Gi.

 

Building and Deploying InfluxDB with persistent storage.

oc process appagile-infuxdb-persistent-dockerbuild-template -v SOURCE_SECRET=my-github-secret,HOSTNAME_HTTP=influxdb.customurl.appad3.tsi-af.de,INFLUXDB_DB_NAME=myinfluxdb,SOURCE_REPOSITORY_URL=https://gitlabappadev.tsi-af.de/OSE3/appagile-influxdb.git | oc create -f -
  • The SOURCE_SECRET should refer to the name of the secret that allows access to the private source repository
  • The InfluxDB will be accessible externally via the HOSTNAME_HTTP path.
  • 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.
  • A name for the database that will be created on container startup can be provided via INFLUXDB_DB_NAME. Otherwise the default is myinfluxdb.
  • An INFLUXDB_DB_USER and INFLUXDB_DB_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. A user will be created on container startup with all privileges granted regarding the database named by INFLUXDB_DB_NAME.
  • An INFLUXDB_ADMIN_USER and INFLUXDB_ADMIN_PASSWORD can be optionally provided as further environment variables. Otherwise they will be generated and can be retrieved from the resulting deployment config. An admin user will be created on container startup with all privileges granted.
  • The size of the volume claim can be defined via PERSISTENT_VOLUME_CLAIM_SIZE. The default is 5Gi.

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