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.
 
 
 
 
 
 
Igor Kulikov 9409acfe44
Merge pull request #3939 from Dmitriymush/fix/docker_haproxy
5 years ago
..
haproxy/config fix additions 5 years ago
tb-node/conf Fixed Docker Compose 6 years ago
tb-transports Update license header - set 2021 year 5 years ago
.env Revert "[3.2.1] Develop/lwm2m (#3547)" 5 years ago
.gitignore Add external config and log volumes for transport microservices. 7 years ago
README.md Improvements 5 years ago
compose-utils.sh Update license header - set 2021 year 5 years ago
docker-compose.aws-sqs.yml Update license header - set 2021 year 5 years ago
docker-compose.confluent.yml Update license header - set 2021 year 5 years ago
docker-compose.hybrid.yml Update license header - set 2021 year 5 years ago
docker-compose.kafka.yml Update license header - set 2021 year 5 years ago
docker-compose.postgres.volumes.yml Update license header - set 2021 year 5 years ago
docker-compose.postgres.yml Update license header - set 2021 year 5 years ago
docker-compose.pubsub.yml Update license header - set 2021 year 5 years ago
docker-compose.rabbitmq.yml Update license header - set 2021 year 5 years ago
docker-compose.service-bus.yml Update license header - set 2021 year 5 years ago
docker-compose.yml Update license header - set 2021 year 5 years ago
docker-create-log-folders.sh Update license header - set 2021 year 5 years ago
docker-install-tb.sh Update license header - set 2021 year 5 years ago
docker-remove-services.sh Update license header - set 2021 year 5 years ago
docker-start-services.sh Update license header - set 2021 year 5 years ago
docker-stop-services.sh Update license header - set 2021 year 5 years ago
docker-update-service.sh Update license header - set 2021 year 5 years ago
docker-upgrade-tb.sh Update license header - set 2021 year 5 years ago
kafka.env Updated the number of partitions in docker scripts 6 years ago
queue-aws-sqs.env refactored 6 years ago
queue-confluent.env Develop/2.5.3 confluent cloud (#3259) 6 years ago
queue-kafka.env added new line 5 years ago
queue-pubsub.env refactored 6 years ago
queue-rabbitmq.env added docker-compose and environment for queues 6 years ago
queue-service-bus.env refactored 6 years ago
tb-coap-transport.env added docker-compose and environment for queues 6 years ago
tb-http-transport.env added docker-compose and environment for queues 6 years ago
tb-js-executor.env added docker-compose and environment for queues 6 years ago
tb-mqtt-transport.env added docker-compose and environment for queues 6 years ago
tb-node.env added docker-compose and environment for queues 6 years ago
tb-node.hybrid.env Add hybrid mode for docker-compose. Update postgreSQL version to 11. 6 years ago
tb-node.postgres.env Add hybrid mode for docker-compose. Update postgreSQL version to 11. 6 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).

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.