Nothing Special   »   [go: up one dir, main page]

Portainer Templates

Influxdb

Database

InfluxDB is an open source time series database for recording metrics, events, and analytics.

Type Kubernetes Platform linux Sourced Repo

Services

influxdb

Image influxdb:latest Ports

8086:8086

Volumes

/var/lib/influxdb2 : /portainer/Files/AppData/Config/influxdb2

Env Vars

Pulls: 1.1B
Stars: 2k
User: library
Created: May 12, 2016
Updated: 5 days ago
Status: active

influxdb_cli

Image influxdb:latest Volumes

/var/lib/influxdb2 : /portainer/Files/AppData/Config/influxdb2 /etc/ssl/influxdb-selfsigned.crt : /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.crt /etc/ssl/influxdb-selfsigned.key : /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.key

Restart Policy on-failure:10 Entrypoint ./entrypoint.sh Env Vars

DOCKER_INFLUXDB_INIT_MODE=setupDOCKER_INFLUXDB_INIT_USERNAME=myusernameDOCKER_INFLUXDB_INIT_PASSWORD=passwordpasswordpasswordDOCKER_INFLUXDB_INIT_ORG=myorgDOCKER_INFLUXDB_INIT_BUCKET=mybucketDOCKER_INFLUXDB_INIT_ADMIN_TOKEN=mytokenINFLUXD_TLS_CERT=/etc/ssl/influxdb-selfsigned.crtINFLUXD_TLS_KEY=/etc/ssl/influxdb-selfsigned.key

Pulls: 1.1B
Stars: 2k
User: library
Created: May 12, 2016
Updated: 5 days ago
Status: active

Installation

Via Portainer

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select the app you wish to deploy, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo

Via Docker Run

Service #1 - influxdb

docker run --name influxdb -d \
 -p 8086:8086 \
 -v /portainer/Files/AppData/Config/influxdb2:/var/lib/influxdb2 \
 influxdb:latest

Service #2 - influxdb_cli

docker run --name influxdb_cli -d \
 -e "setup" \
 -e "myusername" \
 -e "passwordpasswordpassword" \
 -e "myorg" \
 -e "mybucket" \
 -e "mytoken" \
 -e "/etc/ssl/influxdb-selfsigned.crt" \
 -e "/etc/ssl/influxdb-selfsigned.key" \
 -v /portainer/Files/AppData/Config/influxdb2:/var/lib/influxdb2 \
 -v /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.crt:/etc/ssl/influxdb-selfsigned.crt \
 -v /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.key:/etc/ssl/influxdb-selfsigned.key \
 --restart=on-failure:10 \
 influxdb:latest

Via Docker Compose

Save this file as docker-compose.yml and run docker-compose up -d
Use this only as a guide.

- name: influxdb
  image: influxdb:latest
  ports:
    - '8086:8086'
  volumes:
    - bind: /portainer/Files/AppData/Config/influxdb2
      container: /var/lib/influxdb2
  env: []
- name: influxdb_cli
  image: influxdb:latest
  entrypoint:
    - ./entrypoint.sh
  volumes:
    - bind: /portainer/Files/AppData/Config/influxdb2
      container: /var/lib/influxdb2
    - bind: /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.crt
      container: /etc/ssl/influxdb-selfsigned.crt
    - bind: /portainer/Files/AppData/Config/influxdb2/ssl/influxdb-selfsigned.key
      container: /etc/ssl/influxdb-selfsigned.key
  restart_policy: on-failure:10
  env:
    - name: DOCKER_INFLUXDB_INIT_MODE
      value: setup
    - name: DOCKER_INFLUXDB_INIT_USERNAME
      value: myusername
    - name: DOCKER_INFLUXDB_INIT_PASSWORD
      value: passwordpasswordpassword
    - name: DOCKER_INFLUXDB_INIT_ORG
      value: myorg
    - name: DOCKER_INFLUXDB_INIT_BUCKET
      value: mybucket
    - name: DOCKER_INFLUXDB_INIT_ADMIN_TOKEN
      value: mytoken
    - name: INFLUXD_TLS_CERT
      value: /etc/ssl/influxdb-selfsigned.crt
    - name: INFLUXD_TLS_KEY
      value: /etc/ssl/influxdb-selfsigned.key

Alternative Methods

For more installation options, see the Documentation in the GitHub repo

Container Documentation

influxdb Documentation

InfluxDB is the open source time series database built for real-time analytic workloads.

influxdb_cli Documentation

InfluxDB is the open source time series database built for real-time analytic workloads.