...
|
...
|
@@ -2,24 +2,63 @@ |
2
|
2
|
|
3
|
3
|
This folder containing scripts and Docker Compose configurations to run ThingsBoard in Microservices mode.
|
4
|
4
|
|
|
5
|
+## Prerequisites
|
|
6
|
+
|
|
7
|
+ThingsBoard Microservices are running in dockerized environment.
|
|
8
|
+Before starting please make sure [Docker CE](https://docs.docker.com/install/) and [Docker Compose](https://docs.docker.com/compose/install/) are installed in your system.
|
|
9
|
+
|
5
|
10
|
## Installation
|
6
|
11
|
|
7
|
|
-Execute the following command to run DataBase installation:
|
|
12
|
+Before performing initial installation you can configure the type of database to be used with ThinsBoard.
|
|
13
|
+In order to set database type change the value of `DATABASE` variable in `.env` file to one of the following:
|
|
14
|
+
|
|
15
|
+- `local` - use local embedded HSQLDB database;
|
|
16
|
+- `postgres` - use PostgreSQL database;
|
|
17
|
+- `cassandra` - use Cassandra database;
|
|
18
|
+
|
|
19
|
+**NOTE**: In case of `postgres` or `cassandra` corresponding docker service will be deployed (see `docker-compose.postgres.yml`, `docker-compose.cassandra.yml` for details).
|
|
20
|
+
|
|
21
|
+Execute the following command to run installation:
|
8
|
22
|
|
9
|
23
|
`
|
10
|
24
|
$ ./docker-install-tb.sh --loadDemo
|
11
|
25
|
`
|
12
|
26
|
|
13
|
|
-- `--loadDemo` - optional argument. Whether to load additional demo data.
|
|
27
|
+Where:
|
|
28
|
+
|
|
29
|
+- `--loadDemo` - optional argument. Whether to load additional demo data.
|
14
|
30
|
|
15
|
31
|
## Running
|
16
|
32
|
|
17
|
|
-Execute the following command to run services:
|
|
33
|
+Execute the following command to start services:
|
18
|
34
|
|
19
|
35
|
`
|
20
|
36
|
$ ./docker-start-services.sh
|
21
|
37
|
`
|
22
|
38
|
|
|
39
|
+After a while when all services will be successfully started you can open `http://{yor-host-ip}` in you browser (for ex. `http://localhost`).
|
|
40
|
+You should see ThingsBoard login page.
|
|
41
|
+
|
|
42
|
+Use the following default credentials:
|
|
43
|
+
|
|
44
|
+- **Systen Administrator**: sysadmin@thingsboard.org / sysadmin
|
|
45
|
+
|
|
46
|
+If you installed DataBase with demo data (using `--loadDemo` flag) you can also use the following credentials:
|
|
47
|
+
|
|
48
|
+- **Tenant Administrator**: tenant@thingsboard.org / tenant
|
|
49
|
+- **Customer User**: customer@thingsboard.org / customer
|
|
50
|
+
|
|
51
|
+In case of any issues you can examine service logs for errors.
|
|
52
|
+For example to see ThingsBoard node logs execute the following command:
|
|
53
|
+
|
|
54
|
+`
|
|
55
|
+$ docker-compose logs -f tb
|
|
56
|
+`
|
|
57
|
+
|
|
58
|
+Or use `docker-compose ps` to see the state of all the containers.
|
|
59
|
+Use `docker-compose logs --f` to inspect the logs of all running services.
|
|
60
|
+See [docker-compose logs](https://docs.docker.com/compose/reference/logs/) command reference for details.
|
|
61
|
+
|
23
|
62
|
Execute the following command to stop services:
|
24
|
63
|
|
25
|
64
|
`
|
...
|
...
|
@@ -32,12 +71,16 @@ Execute the following command to stop and completely remove deployed docker cont |
32
|
71
|
$ ./docker-remove-services.sh
|
33
|
72
|
`
|
34
|
73
|
|
35
|
|
-Execute the following command to update particular services (pull newer docker image and rebuild container):
|
|
74
|
+Execute the following command to update particular or all services (pull newer docker image and rebuild container):
|
36
|
75
|
|
37
|
76
|
`
|
38
|
77
|
$ ./docker-update-service.sh [SERVICE...]
|
39
|
78
|
`
|
40
|
79
|
|
|
80
|
+Where:
|
|
81
|
+
|
|
82
|
+- `[SERVICE...]` - list of services to update (defined in docker-compose configurations). If not specified all services will be updated.
|
|
83
|
+
|
41
|
84
|
## Upgrading
|
42
|
85
|
|
43
|
86
|
In case when database upgrade is needed, execute the following commands:
|
...
|
...
|
@@ -48,4 +91,6 @@ $ ./docker-upgrade-tb.sh --fromVersion=[FROM_VERSION] |
48
|
91
|
$ ./docker-start-services.sh
|
49
|
92
|
```
|
50
|
93
|
|
51
|
|
-- `FROM_VERSION` - from which version upgrade should be started. |
|
94
|
+Where:
|
|
95
|
+
|
|
96
|
+- `FROM_VERSION` - from which version upgrade should be started. See [Upgrade Instructions](https://thingsboard.io/docs/user-guide/install/upgrade-instructions) for valid `fromVersion` values. |
...
|
...
|
|