Open-source IoT Platform - Device management, data collection, processing and visualization.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Sergey Matvienko b50a4599ec move bitnami to bitnamilegacy - docker compose 4 months ago
..
haproxy/config updated haproxy configuration for /.well-known/... apis 2 years ago
monitoring Merge branch 'rc' 8 months ago
tb-edqs/conf Fix EDQS logback config 9 months ago
tb-node/conf remove all references of not supported queue providers 7 months ago
tb-transports remove all references of not supported queue providers 7 months ago
tb-vc-executor/conf remove all references of not supported queue providers 7 months ago
.env fix typo 7 months ago
.gitignore redis to valkey 7 months ago
README.md renamed env variables and docker related items from redis to valkey 7 months ago
cache-valkey-cluster.env redis to valkey 7 months ago
cache-valkey-sentinel.env redis to valkey 7 months ago
cache-valkey.env redis to valkey 7 months ago
compose-utils.sh Merge branch 'master' into feature/valkey 7 months ago
docker-check-log-folders.sh add exitcode for check folder script 10 months ago
docker-compose.cassandra.volumes.yml removed version property from docker-compose 5 months ago
docker-compose.confluent.yml removed version property from docker-compose 5 months ago
docker-compose.edqs.volumes.yml removed version property from docker-compose 5 months ago
docker-compose.edqs.yml removed version property from docker-compose 5 months ago
docker-compose.hybrid.yml removed version property from docker-compose 5 months ago
docker-compose.kafka.yml move bitnami to bitnamilegacy - docker compose 4 months ago
docker-compose.postgres.volumes.yml removed version property from docker-compose 5 months ago
docker-compose.postgres.yml removed version property from docker-compose 5 months ago
docker-compose.prometheus-grafana.yml removed version property from docker-compose 5 months ago
docker-compose.valkey-cluster.volumes.yml removed version property from docker-compose 5 months ago
docker-compose.valkey-cluster.yml move bitnami to bitnamilegacy - docker compose 4 months ago
docker-compose.valkey-sentinel.volumes.yml removed version property from docker-compose 5 months ago
docker-compose.valkey-sentinel.yml move bitnami to bitnamilegacy - docker compose 4 months ago
docker-compose.valkey.volumes.yml removed version property from docker-compose 5 months ago
docker-compose.valkey.yml move bitnami to bitnamilegacy - docker compose 4 months ago
docker-compose.volumes.yml removed version property from docker-compose 5 months ago
docker-compose.yml removed version property from docker-compose 5 months ago
docker-create-log-folders.sh rewrite volume check/create scripts 10 months ago
docker-install-tb.sh fix newlines missing '\' in compose scripts 8 months ago
docker-remove-services.sh merged with edqs branch 10 months ago
docker-start-services.sh Merge branch 'master' into fix-chown-for-docker-desktop 9 months ago
docker-stop-services.sh merged with edqs branch 10 months ago
docker-update-service.sh fix newlines missing '\' in compose scripts 8 months ago
docker-upgrade-tb.sh fix newlines missing '\' in compose scripts 8 months ago
kafka.env KAFKA_CFG_SEGMENT_BYTES 25MB for docker compose 7 months ago
queue-confluent.env Confluent TB_QUEUE_KAFKA_JE_TOPIC_PROPERTIES retention 1 day 8 months ago
queue-kafka.env added new line 5 years ago
tb-coap-transport.env msa black box tests: redis-cluster test implemented with mvn -DblackBoxTests.redisCluster=true 4 years ago
tb-core-edqs.env EDQS: introduce API auto-enable option 10 months ago
tb-edqs.env renamed edqs service to tb-edqs 9 months ago
tb-http-transport.env msa black box tests: redis-cluster test implemented with mvn -DblackBoxTests.redisCluster=true 4 years ago
tb-js-executor.env added nodejs memory leak workaround 3 years ago
tb-lwm2m-transport.env fix bug: lwm2m tests dif Port 5 2 years ago
tb-mqtt-transport.env msa black box tests: redis-cluster test implemented with mvn -DblackBoxTests.redisCluster=true 4 years ago
tb-node.env fixed docker-compose.edqs.yml 10 months ago
tb-node.hybrid.env PSQL annotation and dialect cleanup. 4 years ago
tb-node.postgres.env PSQL annotation and dialect cleanup. 4 years ago
tb-rule-engine-edqs.env fixed docker-compose.edqs.yml 10 months ago
tb-snmp-transport.env Add ports configs for SNMP transport to Docker scripts 2 years ago
tb-vc-executor.env Docker compose scripts for TB Version Control Executor 4 years ago
tb-web-ui.env Improve static resources and API requests loadbalancing. 7 years ago

README.md

Docker configuration for ThingsBoard Microservices

This folder containing scripts and Docker Compose configurations to run ThingsBoard in Microservices mode.

Prerequisites

ThingsBoard Microservices are running in dockerized environment. Before starting please make sure Docker CE and Docker Compose are installed in your system.

Installation

Before performing initial installation you can configure the type of database to be used with ThingsBoard. In order to set database type change the value of DATABASE variable in .env file to one of the following:

  • postgres - use PostgreSQL database;
  • hybrid - use PostgreSQL for entities database and Cassandra for timeseries database;

NOTE: According to the database type corresponding docker service will be deployed (see docker-compose.postgres.yml, docker-compose.hybrid.yml for details).

In order to set cache type change the value of CACHE variable in .env file to one of the following:

  • valkey - use Valkey standalone cache (1 node - 1 primary);
  • valkey-cluster - use Valkey cluster cache (6 nodes - 3 primaries, 3 replicas);
  • valkey-sentinel - use Valkey sentinel cache (3 nodes - 1 primary, 1 replica, 1 sentinel)

NOTE: According to the cache type corresponding docker service will be deployed (see docker-compose.valkey.yml, docker-compose.valkey-cluster.yml, docker-compose.valkey-sentinel.yml for details).

Execute the following command to create log folders for the services and chown of these folders to the docker container users. To be able to change user, chown command is used, which requires sudo permissions (script will request password for a sudo access):

$ ./docker-create-log-folders.sh

Execute the following command to run installation:

$ ./docker-install-tb.sh --loadDemo

Where:

  • --loadDemo - optional argument. Whether to load additional demo data.

Running

Execute the following command to start services:

$ ./docker-start-services.sh

After a while when all services will be successfully started you can open http://{your-host-ip} in you browser (for ex. http://localhost). You should see ThingsBoard login page.

Use the following default credentials:

If you installed DataBase with demo data (using --loadDemo flag) you can also use the following credentials:

In case of any issues you can examine service logs for errors. For example to see ThingsBoard node logs execute the following command:

$ docker-compose logs -f tb-core1 tb-core2 tb-rule-engine1 tb-rule-engine2 tb-mqtt-transport1 tb-mqtt-transport2

Or use docker-compose ps to see the state of all the containers. Use docker-compose logs --f to inspect the logs of all running services. See docker-compose logs command reference for details.

Execute the following command to stop services:

$ ./docker-stop-services.sh

Execute the following command to stop and completely remove deployed docker containers:

$ ./docker-remove-services.sh

Execute the following command to update particular or all services (pull newer docker image and rebuild container):

$ ./docker-update-service.sh [SERVICE...]

Where:

  • [SERVICE...] - list of services to update (defined in docker-compose configurations). If not specified all services will be updated.

Upgrading

In case when database upgrade is needed, execute the following commands:

$ ./docker-stop-services.sh
$ ./docker-upgrade-tb.sh --fromVersion=[FROM_VERSION]
$ ./docker-start-services.sh

Where:

  • FROM_VERSION - from which version upgrade should be started. See Upgrade Instructions for valid fromVersion values.

Monitoring

If you want to enable monitoring with Prometheus and Grafana you need to set MONITORING_ENABLED environment variable to true. After this Prometheus and Grafana containers will be deployed. You can reach Prometheus at http://localhost:9090 and Grafana at http://localhost:3000 (default login is admin and password foobar). To change Grafana password you need to update GF_SECURITY_ADMIN_PASSWORD environment variable at ./monitoring/grafana/config.monitoring file. Dashboards are loaded from ./monitoring/grafana/provisioning/dashboards directory.

If you want to add new monitoring jobs for Prometheus update ./monitoring/prometheus/prometheus.yml file.