-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'ce/master'
- Loading branch information
Showing
181 changed files
with
3,334 additions
and
3,256 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
...cation/src/main/data/json/edge/install_instructions/docker/localhost_warning.md
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
application/src/main/data/json/edge/instructions/upgrade/centos/instructions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#### Upgrading to ${TB_EDGE_VERSION}EDGE | ||
|
||
**ThingsBoard Edge package download:** | ||
```bash | ||
wget https://github.com/thingsboard/thingsboard-edge/releases/download/v${TB_EDGE_TAG}/tb-edge-${TB_EDGE_TAG}.rpm | ||
{:copy-code} | ||
``` | ||
##### ThingsBoard Edge service upgrade | ||
|
||
Install package: | ||
```bash | ||
sudo rpm -Uvh tb-edge-${TB_EDGE_TAG}.rpm | ||
{:copy-code} | ||
``` | ||
${UPGRADE_DB} |
10 changes: 10 additions & 0 deletions
10
application/src/main/data/json/edge/instructions/upgrade/docker/instructions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#### Upgrading to ${TB_EDGE_VERSION} | ||
|
||
Execute the following command to pull **${TB_EDGE_VERSION}** image: | ||
|
||
```bash | ||
docker pull thingsboard/tb-edge:${TB_EDGE_VERSION} | ||
{:copy-code} | ||
``` | ||
|
||
${UPGRADE_DB} |
23 changes: 23 additions & 0 deletions
23
application/src/main/data/json/edge/instructions/upgrade/docker/start_service.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Modify ‘main’ docker compose (`docker-compose.yml`) file for ThingsBoard Edge and update version of the image: | ||
```bash | ||
nano docker-compose.yml | ||
{:copy-code} | ||
``` | ||
|
||
```text | ||
version: '3.8' | ||
services: | ||
mytbedge: | ||
restart: always | ||
image: "thingsboard/tb-edge:${TB_EDGE_VERSION}" | ||
... | ||
``` | ||
|
||
Make sure your image is the set to **tb-edge-${TB_EDGE_VERSION}**. | ||
Execute the following commands to up this docker compose directly: | ||
|
||
```bash | ||
docker compose up -d | ||
docker compose logs -f mytbedge | ||
{:copy-code} | ||
``` |
61 changes: 61 additions & 0 deletions
61
application/src/main/data/json/edge/instructions/upgrade/docker/upgrade_db.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Create docker compose file for ThingsBoard Edge upgrade process: | ||
|
||
```bash | ||
> docker-compose-upgrade.yml && nano docker-compose-upgrade.yml | ||
{:copy-code} | ||
``` | ||
|
||
Add the following lines to the yml file: | ||
|
||
```bash | ||
version: '3.8' | ||
services: | ||
mytbedge: | ||
restart: on-failure | ||
image: "thingsboard/tb-edge:${TB_EDGE_VERSION}" | ||
environment: | ||
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tb-edge | ||
volumes: | ||
- tb-edge-data:/data | ||
- tb-edge-logs:/var/log/tb-edge | ||
entrypoint: upgrade-tb-edge.sh | ||
postgres: | ||
restart: always | ||
image: "postgres:15" | ||
ports: | ||
- "5432" | ||
environment: | ||
POSTGRES_DB: tb-edge | ||
POSTGRES_PASSWORD: postgres | ||
volumes: | ||
- tb-edge-postgres-data:/var/lib/postgresql/data | ||
|
||
volumes: | ||
tb-edge-data: | ||
name: tb-edge-data | ||
tb-edge-logs: | ||
name: tb-edge-logs | ||
tb-edge-postgres-data: | ||
name: tb-edge-postgres-data | ||
{:copy-code} | ||
``` | ||
|
||
Execute the following command to start upgrade process: | ||
|
||
```bash | ||
docker compose -f docker-compose-upgrade.yml up | ||
{:copy-code} | ||
``` | ||
|
||
Once upgrade process successfully completed, exit from the docker-compose shell by this combination: | ||
|
||
```text | ||
Ctrl + C | ||
``` | ||
|
||
Execute the following command to stop TB Edge upgrade container: | ||
|
||
```bash | ||
docker compose -f docker-compose-upgrade.yml stop | ||
{:copy-code} | ||
``` |
83 changes: 83 additions & 0 deletions
83
...cation/src/main/data/json/edge/instructions/upgrade/docker/upgrade_preparing.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
Here is the list of commands, that can be used to quickly upgrade ThingsBoard Edge on Docker (Linux or MacOS). | ||
|
||
#### Prepare for upgrading ThingsBoard Edge | ||
Set the terminal in the directory which contains the `docker-compose.yml` file and execute the following command | ||
to stop and remove currently running TB Edge container: | ||
|
||
```bash | ||
docker compose stop | ||
docker compose rm mytbedge | ||
{:copy-code} | ||
``` | ||
|
||
**OPTIONAL:** If you still rely on Docker Compose as docker-compose (with a hyphen) here is the list of the above commands: | ||
```text | ||
docker-compose stop | ||
docker-compose rm mytbedge | ||
``` | ||
|
||
##### Migrating Data from Docker Bind Mount Folders to Docker Volumes | ||
Starting with the **3.6.2** release, the ThingsBoard team has transitioned from using Docker bind mount folders to Docker volumes. | ||
This change aims to enhance security and efficiency in storing data for Docker containers and to mitigate permission issues across various environments. | ||
|
||
To migrate from Docker bind mounts to Docker volumes, please execute the following commands: | ||
|
||
```bash | ||
docker run --rm -v tb-edge-data:/volume -v ~/.mytb-edge-data:/backup busybox sh -c "cp -a /backup/. /volume" | ||
docker run --rm -v tb-edge-logs:/volume -v ~/.mytb-edge-logs:/backup busybox sh -c "cp -a /backup/. /volume" | ||
docker run --rm -v tb-edge-postgres-data:/volume -v ~/.mytb-edge-data/db:/backup busybox sh -c "cp -a /backup/. /volume" | ||
{:copy-code} | ||
``` | ||
|
||
After completing the data migration to the newly created Docker volumes, you'll need to update the volume mounts in your Docker Compose configuration. | ||
Modify the `docker-compose.yml` file for ThingsBoard Edge to update the volume settings. | ||
|
||
First, please update docker compose file version. Find next snippet: | ||
```text | ||
version: '3.0' | ||
... | ||
``` | ||
|
||
And replace it with: | ||
```text | ||
version: '3.8' | ||
... | ||
``` | ||
|
||
Then update volume mounts. Locate the following snippet: | ||
```text | ||
volumes: | ||
- ~/.mytb-edge-data:/data | ||
- ~/.mytb-edge-logs:/var/log/tb-edge | ||
... | ||
``` | ||
|
||
And replace it with: | ||
```text | ||
volumes: | ||
- tb-edge-data:/data | ||
- tb-edge-logs:/var/log/tb-edge | ||
... | ||
``` | ||
|
||
Apply a similar update for the PostgreSQL service. Find the section: | ||
```text | ||
volumes: | ||
- ~/.mytb-edge-data/db:/var/lib/postgresql/data | ||
... | ||
``` | ||
|
||
And replace it with: | ||
```text | ||
volumes: | ||
- tb-edge-postgres-data/:/var/lib/postgresql/data | ||
... | ||
``` | ||
|
||
##### Backup Database | ||
Make a copy of the database volume before upgrading: | ||
|
||
```bash | ||
docker run --rm -v tb-edge-postgres-data:/source -v tb-edge-postgres-data-backup:/backup busybox sh -c "cp -a /source/. /backup" | ||
{:copy-code} | ||
``` |
6 changes: 6 additions & 0 deletions
6
application/src/main/data/json/edge/instructions/upgrade/start_service.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Start the service | ||
|
||
```bash | ||
sudo systemctl tb-edge start | ||
{:copy-code} | ||
``` |
15 changes: 15 additions & 0 deletions
15
application/src/main/data/json/edge/instructions/upgrade/ubuntu/instructions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#### Upgrading to ${TB_EDGE_VERSION}EDGE | ||
|
||
**ThingsBoard Edge package download:** | ||
```bash | ||
wget https://github.com/thingsboard/thingsboard-edge/releases/download/v${TB_EDGE_TAG}/tb-edge-${TB_EDGE_TAG}.deb | ||
{:copy-code} | ||
``` | ||
##### ThingsBoard Edge service upgrade | ||
|
||
Install package: | ||
```bash | ||
sudo dpkg -i tb-edge-${TB_EDGE_TAG}.deb | ||
{:copy-code} | ||
``` | ||
${UPGRADE_DB} |
8 changes: 8 additions & 0 deletions
8
application/src/main/data/json/edge/instructions/upgrade/upgrade_db.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
**NOTE**: Package installer may ask you to merge your tb-edge configuration. It is preferred to use **merge option** to make sure that all your previous parameters will not be overwritten. | ||
|
||
Execute regular upgrade script: | ||
|
||
```bash | ||
sudo /usr/share/tb-edge/bin/install/upgrade.sh --fromVersion=${FROM_TB_EDGE_VERSION} | ||
{:copy-code} | ||
``` |
Oops, something went wrong.