名称 最后更新
..
haproxy/config 正在载入提交数据...
tb-node/conf 正在载入提交数据...
tb-transports 正在载入提交数据...
.env 正在载入提交数据...
.gitignore 正在载入提交数据...
README.md 正在载入提交数据...
compose-utils.sh 正在载入提交数据...
docker-compose.aws-sqs.yml 正在载入提交数据...
docker-compose.hybrid.yml 正在载入提交数据...
docker-compose.kafka.yml 正在载入提交数据...
docker-compose.postgres.volumes.yml 正在载入提交数据...
docker-compose.postgres.yml 正在载入提交数据...
docker-compose.pubsub.yml 正在载入提交数据...
docker-compose.rabbitmq.yml 正在载入提交数据...
docker-compose.service-bus.yml 正在载入提交数据...
docker-compose.yml 正在载入提交数据...
docker-create-log-folders.sh 正在载入提交数据...
docker-install-tb.sh 正在载入提交数据...
docker-remove-services.sh 正在载入提交数据...
docker-start-services.sh 正在载入提交数据...
docker-stop-services.sh 正在载入提交数据...
docker-update-service.sh 正在载入提交数据...
docker-upgrade-tb.sh 正在载入提交数据...
kafka.env 正在载入提交数据...
queue-aws-sqs.env 正在载入提交数据...
queue-kafka.env 正在载入提交数据...
queue-pubsub.env 正在载入提交数据...
queue-rabbitmq.env 正在载入提交数据...
queue-service-bus.env 正在载入提交数据...
tb-coap-transport.env 正在载入提交数据...
tb-http-transport.env 正在载入提交数据...
tb-js-executor.env 正在载入提交数据...
tb-mqtt-transport.env 正在载入提交数据...
tb-node.env 正在载入提交数据...
tb-node.hybrid.env 正在载入提交数据...
tb-node.postgres.env 正在载入提交数据...
tb-web-ui.env 正在载入提交数据...

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:

  • System Administrator: sysadmin@thingsboard.org / sysadmin

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

  • Tenant Administrator: tenant@thingsboard.org / tenant
  • Customer User: customer@thingsboard.org / customer

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-rule-engine1

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.