Thingsboard catalog file
This commit is contained in:
parent
9aabfd44bb
commit
c123263867
11
templates/thingsboard/0/README.md
Normal file
11
templates/thingsboard/0/README.md
Normal file
@ -0,0 +1,11 @@
|
||||
## What is inside Thingsboard Stack?
|
||||
* Thingsboard application
|
||||
* PostgresSQL or Cassandra
|
||||
|
||||
## External Requirments
|
||||
* Zookeeper service(available in community catalog)
|
||||
|
||||
## Info
|
||||
* Thingsboard is an open-source IoT platform that enables rapid development, management and scaling of IoT projects. See [Thingsboard Architecture](https://thingsboard.io/docs/reference/architecture/) for more details.
|
||||
* You can choose from two storage backends: postgres, cassandra
|
||||
* You will need a Zookeeper service up and running before running this catalog
|
56
templates/thingsboard/0/docker-compose.yml.tpl
Normal file
56
templates/thingsboard/0/docker-compose.yml.tpl
Normal file
@ -0,0 +1,56 @@
|
||||
version: '2'
|
||||
services:
|
||||
tb:
|
||||
image: "thingsboard/application:1.2.4"
|
||||
ports:
|
||||
- "${http_public_port}:8080"
|
||||
- "${mqtt_public_port}:1883"
|
||||
- "${coap_public_port}:5683/udp"
|
||||
environment:
|
||||
- MQTT_BIND_ADDRESS=0.0.0.0
|
||||
- MQTT_BIND_PORT=1883
|
||||
- COAP_BIND_ADDRESS=0.0.0.0
|
||||
- COAP_BIND_PORT=5683
|
||||
- ZOOKEEPER_URL=zk:2181
|
||||
- DATABASE_TYPE=${database_type}
|
||||
- CASSANDRA_URL=cassandra:9042
|
||||
- CASSANDRA_HOST=cassandra
|
||||
- CASSANDRA_PORT=9042
|
||||
- POSTGRES_HOST=postgres
|
||||
- POSTGRES_PORT=5432
|
||||
- ADD_SCHEMA_AND_SYSTEM_DATA=${add_schema_and_system_data}
|
||||
- ADD_DEMO_DATA=${add_demo_data}
|
||||
volumes:
|
||||
- hsqldb_data_dir:/usr/share/thingsboard/data/sql
|
||||
depends_on:
|
||||
{{- if eq .Values.database_type "cassandra" }}
|
||||
- cassandra
|
||||
{{- else }}
|
||||
- postgres
|
||||
{{- end }}
|
||||
external_links:
|
||||
- ${zookeeper_service}:zk
|
||||
entrypoint: /run-application.sh
|
||||
{{- if eq .Values.database_type "cassandra" }}
|
||||
cassandra:
|
||||
image: "cassandra:3"
|
||||
volumes:
|
||||
- cassandra_data_dir:/var/lib/cassandra
|
||||
{{- else }}
|
||||
postgres:
|
||||
image: "postgres:9.6"
|
||||
environment:
|
||||
- POSTGRES_DB=${postgres_db}
|
||||
volumes:
|
||||
- postgres_data_dir:/var/lib/postgresql/data
|
||||
{{- end }}
|
||||
volumes:
|
||||
hsqldb_data_dir:
|
||||
driver: ${volume_driver}
|
||||
{{- if eq .Values.database_type "cassandra" }}
|
||||
cassandra_data_dir:
|
||||
driver: ${volume_driver}
|
||||
{{- else }}
|
||||
postgres_data_dir:
|
||||
driver: ${volume_driver}
|
||||
{{ - end }}
|
80
templates/thingsboard/0/rancher-compose.yml
Normal file
80
templates/thingsboard/0/rancher-compose.yml
Normal file
@ -0,0 +1,80 @@
|
||||
version: '2'
|
||||
catalog:
|
||||
name: "Thingsboard"
|
||||
version: "v0.1"
|
||||
description: "An open source IoT platform"
|
||||
uuid: Thingsboard-1
|
||||
questions:
|
||||
- variable: http_public_port
|
||||
description: "Thingsboard dashboard published port"
|
||||
label: "Http public port"
|
||||
required: true
|
||||
default: "8080"
|
||||
type: int
|
||||
- variable: mqtt_public_port
|
||||
description: "MQTT published port"
|
||||
label: "MQTT public port"
|
||||
required: true
|
||||
default: "1883"
|
||||
type: int
|
||||
- variable: coap_public_port
|
||||
description: "COAP published port"
|
||||
label: "COAP public port"
|
||||
required: true
|
||||
default: "5683"
|
||||
type: int
|
||||
- variable: database_type
|
||||
description: "Choose database type to use: sql or cassandra"
|
||||
label: "Database type"
|
||||
required: true
|
||||
default: "sql"
|
||||
type: enum
|
||||
options:
|
||||
- sql
|
||||
- cassandra
|
||||
- variable: add_schema_and_system_data
|
||||
description: "Whether to init scheme and system data"
|
||||
label: "Add schemma and system data"
|
||||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
- variable: add_demo_data
|
||||
description: "Whether to insert demo data"
|
||||
label: "Add demo data"
|
||||
required: true
|
||||
default: true
|
||||
type: boolean
|
||||
- variable: zookeeper_service
|
||||
description: "Zookeeper service stack"
|
||||
label: "Zookeeper service"
|
||||
required: true
|
||||
default: "zookeeper/zk"
|
||||
type: "service"
|
||||
- variable: postgres_db
|
||||
description: "Database name in postgresdb"
|
||||
label: "postgres dbname"
|
||||
required: true
|
||||
default: "thingsboard"
|
||||
type: string
|
||||
- variable: volume_driver
|
||||
description: "Volume driver to use with this service"
|
||||
label: "Volume driver"
|
||||
required: true
|
||||
default: "local"
|
||||
type: enum
|
||||
options:
|
||||
- local
|
||||
- rancher-nfs
|
||||
- rancher-efs
|
||||
- rancher-ebs
|
||||
services:
|
||||
tb:
|
||||
scale: 1
|
||||
retain_ip: true
|
||||
health_check:
|
||||
port: 8080
|
||||
interval: 5000
|
||||
unhealthy_threshold: 3
|
||||
request_line: 'GET / HTTP/1.0'
|
||||
healthy_threshold: 2
|
||||
response_timeout: 5000
|
5
templates/thingsboard/config.yml
Normal file
5
templates/thingsboard/config.yml
Normal file
@ -0,0 +1,5 @@
|
||||
name: Thingsboard
|
||||
description: |
|
||||
An open source IoT platform
|
||||
version: v0.1
|
||||
category: IoT
|
Loading…
x
Reference in New Issue
Block a user