diff --git a/_config.yml b/_config.yml index 228c239cc4..3fc9f74542 100644 --- a/_config.yml +++ b/_config.yml @@ -102,4 +102,4 @@ release: pe_dart_client_ver: 4.0.0 broker_full_ver: 2.2.0 broker_branch: release-2.2.0 - trendz_ver: 1.14.0 + trendz_ver: 1.15.0 diff --git a/_data/installation-options/installation-options-trendz.yml b/_data/installation-options/installation-options-trendz.yml index 0f4013fbae..7583b1fadc 100644 --- a/_data/installation-options/installation-options-trendz.yml +++ b/_data/installation-options/installation-options-trendz.yml @@ -19,7 +19,7 @@ trendz: imageHeight: 36 2: title: Ubuntu Server - description: This guide describes how to install Trendz Analytics on Ubuntu 18.04 LTS / Ubuntu 20.04 LTS. + description: This guide describes how to install Trendz Analytics on Ubuntu 22.04 LTS / Ubuntu 24.04 LTS. link: /docs/trendz/install/ubuntu/ icon: /images/install/platform/ubuntu.svg alt: Ubuntu logo @@ -28,7 +28,7 @@ trendz: imageHeight: 36 3: title: CentOS/RHEL Server - description: This guide describes how to install Trendz Analytics on RHEL/CentOS 7/8. + description: This guide describes how to install Trendz Analytics on RHEL/CentOS 8/9. link: /docs/trendz/install/rhel/ icon: /images/install/platform/centos-redhat.svg alt: CentOS and Red Hat logos @@ -45,12 +45,12 @@ trendz: imageWidth: 35 imageHeight: 36 5: - title: Trendz Cloud - description: Activate Trendz Analytics Cloud with your account to explore powerful data visualization and analytics. + title: Cloud + description: Activate Trendz Analytics with your ThingsBoard Cloud account. link: /docs/trendz/install/cloud/ icon: /images/install/platform/trendz-cloud.svg - alt: Trendz Cloud logo - imageTitleAttribute: Activate Trendz Analytics Cloud + alt: ThingsBoard Cloud logo + imageTitleAttribute: Activate Trendz Analytics on ThingsBoard Cloud imageWidth: 58 imageHeight: 36 6: diff --git a/_data/pages_info.yml b/_data/pages_info.yml index 723be6e45d..d660763bfd 100644 --- a/_data/pages_info.yml +++ b/_data/pages_info.yml @@ -4690,11 +4690,8 @@ "/docs/trendz/install/kubernetes/": url: "/docs/trendz/install/kubernetes/" redirect_from: [] -"/docs/trendz/install/python-executor-configuration-linux/": - url: "/docs/trendz/install/python-executor-configuration-linux/" - redirect_from: [] -"/docs/trendz/install/python-executor-configuration-windows/": - url: "/docs/trendz/install/python-executor-configuration-windows/" +"/docs/trendz/install/python-executor-configuration/": + url: "/docs/trendz/install/python-executor-configuration/" redirect_from: [] "/docs/trendz/install/rhel/": url: "/docs/trendz/install/rhel/" diff --git a/_data/trendz/docs-home.yml b/_data/trendz/docs-home.yml index 4031ff0fc0..87e216aada 100644 --- a/_data/trendz/docs-home.yml +++ b/_data/trendz/docs-home.yml @@ -99,7 +99,7 @@ toc: section: - title: Trendz AI Assistant path: /docs/trendz/ai-assistance-overview/ - - title: AI Assistant Widget + - title: Advanced analytics Chat Assistant widget path: /docs/trendz/ai-assistance-widget/ - title: AI Widget Summary path: /docs/trendz/ai-widget-summary/ @@ -109,7 +109,7 @@ toc: path: /docs/trendz/custom-ai-model-configuration/ - title: Share views section: - - title: Trendz widget bundle + - title: Advanced analytics Bundle path: /docs/trendz/trendz-bundle/ - title: Add on dashboard path: /docs/trendz/embed-visuals/ diff --git a/_data/trendz/globals.yml b/_data/trendz/globals.yml index 9ae07b638a..cdde660efa 100644 --- a/_data/trendz/globals.yml +++ b/_data/trendz/globals.yml @@ -3,6 +3,7 @@ tocs: - getting-started - guides - installation +- how-to-activate-trendz docs-header: - toc: getting-started title: Getting Started @@ -11,4 +12,6 @@ docs-header: - toc: guides title: Guides - toc: installation - title: Installation \ No newline at end of file + title: Installation +- toc: how-to-activate-trendz + title: How To Activate Trendz diff --git a/_data/trendz/how-to-activate-trendz.yml b/_data/trendz/how-to-activate-trendz.yml new file mode 100644 index 0000000000..2c28f0dae2 --- /dev/null +++ b/_data/trendz/how-to-activate-trendz.yml @@ -0,0 +1,11 @@ +bigheader: "How to Activate Trendz" +abstract: "Guide how to activate Trendz Analytics" +toc: +- title: How to Activate Trendz + path: /docs/trendz/activation/how-to/ +- title: ThingsBoard Cloud + path: /docs/trendz/activation/public-cloud/ +- title: ThingsBoard Private Cloud + path: /docs/trendz/activation/private-cloud/ +- title: Self-Hosted ThingsBoard (PE) + path: /docs/trendz/activation/self-hosted/ diff --git a/_data/trendz/installation.yml b/_data/trendz/installation.yml index e9637c1c3e..32f443a365 100644 --- a/_data/trendz/installation.yml +++ b/_data/trendz/installation.yml @@ -3,7 +3,7 @@ abstract: "Documentation for installation and configuration of Trendz Analytics. toc: - title: Installation options path: /docs/trendz/install/installation-options/ -- title: Trendz Cloud +- title: Cloud path: /docs/trendz/install/cloud/ - title: On-premises section: @@ -26,14 +26,6 @@ toc: - title: Kubernetes path: /docs/trendz/install/trndz-upgrade-instructions-kubernetes/ - title: Python Executor Configuration - section: - - title: Windows - path: /docs/trendz/install/python-executor-configuration-windows/ - - title: Linux or Mac OS - path: /docs/trendz/install/python-executor-configuration-linux/ -- title: Connect Trendz to Thingsboard - path: /docs/trendz/connect-thingsboard/ + path: /docs/trendz/install/python-executor-configuration/ - title: Configuration properties path: /docs/trendz/configuration-properties/ -- title: Post-installation steps - path: /docs/trendz/post-installation-steps/ diff --git a/_includes/docs/pe/user-guide/install/trendz-ad.md b/_includes/docs/pe/user-guide/install/trendz-ad.md new file mode 100644 index 0000000000..cc53edbb64 --- /dev/null +++ b/_includes/docs/pe/user-guide/install/trendz-ad.md @@ -0,0 +1,8 @@ +{% capture trendz-ad %} +Note: from ThingsBoard version 4.3.0 **Trendz Analytics** became ThingsBoard addon. The Trendz home page will appear in the left ThingsBoard menu after the upgrade. +
+You can find out how to read more what is **Trendz Analytics** and how it complements the ThingsBoard analytics functionality [here](/docs/trendz/what-is-trendz/). +
+You can find out how to install Trendz Analytics [here](/docs/trendz/install/installation-options/). +{% endcapture %} +{% include templates/info-banner.md content=trendz-ad %} diff --git a/_includes/templates/trendz/install/authentication.md b/_includes/templates/trendz/install/authentication.md new file mode 100644 index 0000000000..a096c0704e --- /dev/null +++ b/_includes/templates/trendz/install/authentication.md @@ -0,0 +1,9 @@ +You can access Trendz UI by default at http://localhost:8888 + +For first authentication, you need to use **Tenant Administrator** credentials from your **ThingsBoard**. + +Trendz uses ThingsBoard as an authentication service. During first sign in ThingsBoard service should be also available +to validate credentials. + +After the first login to Trendz, you need to discover topology to allow Trendz to know about assets, devices, their profiles and relations. +You could read more about how Trendz uses this topology [here](/docs/trendz/business-entities). diff --git a/_includes/templates/trendz/install/docker-compose-separate-file-linux.md b/_includes/templates/trendz/install/docker-compose-separate-file-linux.md new file mode 100644 index 0000000000..f0294443be --- /dev/null +++ b/_includes/templates/trendz/install/docker-compose-separate-file-linux.md @@ -0,0 +1,10 @@ +Create a docker compose file for Trendz Analytics service: + +```text +sudo nano docker-compose.yml +``` +{: .copy-code} + +Add the following configuration to the YAML file. + +{% include templates/trendz/install/docker-compose.md %} diff --git a/_includes/templates/trendz/install/docker-compose-separate-file-windows.md b/_includes/templates/trendz/install/docker-compose-separate-file-windows.md new file mode 100644 index 0000000000..120bb66c8c --- /dev/null +++ b/_includes/templates/trendz/install/docker-compose-separate-file-windows.md @@ -0,0 +1,10 @@ +Create a docker compose file for Trendz Analytics service: + +```text +docker-compose.yml +``` +{: .copy-code} + +Add the following configuration to the YAML file. + +{% include templates/trendz/install/docker-compose.md %} diff --git a/_includes/templates/trendz/install/docker-compose-the-same-file-linux.md b/_includes/templates/trendz/install/docker-compose-the-same-file-linux.md new file mode 100644 index 0000000000..cd4bd7456a --- /dev/null +++ b/_includes/templates/trendz/install/docker-compose-the-same-file-linux.md @@ -0,0 +1,24 @@ +Open the Docker Compose file with ThingsBoard services: + +```text +sudo nano docker-compose.yml +``` + +{: .copy-code} + +Make sure that: + +* the following services are present in the file: + * trendz + * trendz-python-executor + * trendz-postgres +* the following volumes are present in the file: + * trendz-conf + * trendz-data + * trendz-python-executor-conf + * trendz-python-executor-data + * trendz-postgres-data + +If any of them are missing, update your Docker Compose file according to the [ThingsBoard Docker installation instructions](/docs/user-guide/install/pe/docker#step-2-choose-thingsboard-queue-service). + +Your Docker Compose file should be similar to the one shown in the instructions. diff --git a/_includes/templates/trendz/install/docker-compose-the-same-file-windows.md b/_includes/templates/trendz/install/docker-compose-the-same-file-windows.md new file mode 100644 index 0000000000..4545661f1b --- /dev/null +++ b/_includes/templates/trendz/install/docker-compose-the-same-file-windows.md @@ -0,0 +1,23 @@ +Open the Docker Compose file with ThingsBoard services: + +```text +docker-compose.yml +``` +{: .copy-code} + +Make sure that: + +* the following services are present in the file: + * trendz + * trendz-python-executor + * trendz-postgres +* the following volumes are present in the file: + * trendz-conf + * trendz-data + * trendz-python-executor-conf + * trendz-python-executor-data + * trendz-postgres-data + +If any of them are missing, update your Docker Compose file according to the [ThingsBoard Docker installation instructions](/docs/user-guide/install/pe/docker-windows#step-2-choose-thingsboard-queue-service). + +Your Docker Compose file should be similar to the one shown in the instructions. diff --git a/_includes/templates/trendz/install/docker-compose.md b/_includes/templates/trendz/install/docker-compose.md new file mode 100644 index 0000000000..b194a98d09 --- /dev/null +++ b/_includes/templates/trendz/install/docker-compose.md @@ -0,0 +1,75 @@ +```yml +services: + trendz: + profiles: ['trendz'] + restart: always + image: "thingsboard/trendz:1.14.0" + ports: + - "8888:8888" + environment: + SPRING_DATASOURCE_URL: jdbc:postgresql://trendz-postgres:5432/trendz + SPRING_DATASOURCE_USERNAME: postgres + SPRING_DATASOURCE_PASSWORD: postgres + SCRIPT_ENGINE_DOCKER_PROVIDER_URL: trendz-python-executor:8181 + SCRIPT_ENGINE_TIMEOUT: 30000 + volumes: + - trendz-conf:/trendz-config-files + - trendz-data:/data + depends_on: + - trendz-postgres + trendz-python-executor: + profiles: ['trendz'] + restart: always + image: "thingsboard/trendz-python-executor:1.14.0" + ports: + - "8181:8181" + environment: + EXECUTOR_MANAGER: 1 + EXECUTOR_SCRIPT_ENGINE: 6 + THROTTLING_QUEUE_CAPACITY: 10 + THROTTLING_THREAD_POOL_SIZE: 6 + NETWORK_BUFFER_SIZE: 5242880 + volumes: + - trendz-python-executor-conf:/python-executor-config-files + - trendz-python-executor-data:/data + trendz-postgres: + profiles: ['trendz'] + restart: always + image: "postgres:16" + ports: + - "5432:5432" + environment: + POSTGRES_DB: trendz + POSTGRES_PASSWORD: postgres + volumes: + - trendz-postgres-data:/var/lib/postgresql/data +volumes: + trendz-conf: + name: trendz-conf + driver: local + trendz-data: + name: trendz-data + driver: local + trendz-python-executor-conf: + name: trendz-python-executor-conf + driver: local + trendz-python-executor-data: + name: trendz-python-executor-data + driver: local + trendz-postgres-data: + name: trendz-postgres-data + driver: local +``` +{: .copy-code} + +Where: + +- `8888:8888` - connect local port 8888 to exposed internal HTTP port 8888 +- `trendz-conf:/trendz-config-files` - mounts the volume `trendz-conf` to Trendz directory with the configuration files +- `trendz-data:/data` - mounts the volume `trendz-data` to Trendz data directory +- `trendz-postgres-data:/var/lib/postgresql/data` - mounts the volume `trendz-postgres-data` to Postgres data directory +- `trendz` - name of the Trendz Docker service +- `--restart always` - automatically start Trendz in case of system reboot and restart in case of failure. +- `thingsboard/trendz:{{ site.release.trendz_ver }}` - Trendz docker image +- `thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}` - Trendz python script executor docker image +- `SCRIPT_ENGINE_TIMEOUT` - Python script execution timeout diff --git a/_includes/templates/trendz/install/docker-detach-stop-start-commands.md b/_includes/templates/trendz/install/docker-detach-stop-start-commands.md new file mode 100644 index 0000000000..3ccc4cd7b7 --- /dev/null +++ b/_includes/templates/trendz/install/docker-detach-stop-start-commands.md @@ -0,0 +1,23 @@ +You can detach from session terminal using `Ctrl-p` `Ctrl-q` key sequence - the container will keep running in the background. + +In case of any issues, you can examine service logs for errors. +For example, to see Trendz container logs, execute the following command: + +``` +docker compose logs -f trendz +``` +{: .copy-code} + +To stop the container: + +``` +docker compose stop trendz +``` +{: .copy-code} + +To start the container: + +``` +docker compose start trendz +``` +{: .copy-code} diff --git a/_includes/templates/trendz/install/docker-requirements-linux.md b/_includes/templates/trendz/install/docker-requirements-linux.md new file mode 100644 index 0000000000..ad55638d56 --- /dev/null +++ b/_includes/templates/trendz/install/docker-requirements-linux.md @@ -0,0 +1,2 @@ +* **Have Docker CE**. You can find out how to install it [here](https://docs.docker.com/engine/installation/) +* **Have Docker Compose**. You can find out how to install it [here](https://docs.docker.com/compose/install/) diff --git a/_includes/templates/trendz/install/docker-requirements-windows.md b/_includes/templates/trendz/install/docker-requirements-windows.md new file mode 100644 index 0000000000..f1f4d09cba --- /dev/null +++ b/_includes/templates/trendz/install/docker-requirements-windows.md @@ -0,0 +1 @@ +* **Have Docker Desktop for Windows**. You can find out how to install it [here]((https://docs.docker.com/desktop/setup/install/windows-install/)) diff --git a/_includes/templates/trendz/install/docker-start-trendz-service.md b/_includes/templates/trendz/install/docker-start-trendz-service.md new file mode 100644 index 0000000000..c70e549253 --- /dev/null +++ b/_includes/templates/trendz/install/docker-start-trendz-service.md @@ -0,0 +1,9 @@ +Set the terminal in the directory which contains the `docker-compose.yml` file and execute the following commands to up this docker compose directly: + +``` +docker compose --profile trendz up -d && docker compose logs -f trendz +``` +{: .copy-code} + +After executing this command you can open `http://{your-host-ip}:8888` in your browser (for ex. `http://localhost:8888`). +You should see Trendz login page. diff --git a/_includes/templates/trendz/install/hardware-requirements.md b/_includes/templates/trendz/install/hardware-requirements.md new file mode 100644 index 0000000000..0fed29b8e5 --- /dev/null +++ b/_includes/templates/trendz/install/hardware-requirements.md @@ -0,0 +1,4 @@ +Depends on the amount of analyzed data and the number of devices connected to the system. +To run Trendz Analytics on a single machine, you will need at least 1Gb of free RAM. + +In small and medium installations, Trendz can be installed **on the same** server with ThingsBoard. diff --git a/_includes/templates/trendz/install/https-configuration.md b/_includes/templates/trendz/install/https-configuration.md new file mode 100644 index 0000000000..24cc7373a5 --- /dev/null +++ b/_includes/templates/trendz/install/https-configuration.md @@ -0,0 +1,76 @@ +You may want to configure HTTPS access using HAProxy. +This is possible in case you are hosting Trendz in the cloud and have a valid DNS name assigned to your instance. + +### Trendz and ThingsBoard hosted on the same server + +Use this section if HAProxy/Let’s Encrypt already installed in the server and HTTPS enabled for ThingsBoard. + +Open HAProxy configuration file +```bash +sudo nano /etc/haproxy/haproxy.cfg +``` +{: .copy-code} + +Locate **frontend https_in** section, add new access list that will match traffic by domain name and redirect this traffic to Trendz backend: +```bash +acl trendz_http hdr(host) -i new-trendz-domain.com +use_backend tb-trendz if trendz_http +``` + +In the same file register Trendz backend: +```bash +backend tb-trendz + balance leastconn + option tcp-check + option log-health-checks + server tbTrendz1 127.0.0.1:8888 check inter 5s + http-request set-header X-Forwarded-Port %[dst_port] +``` + +Generate SSL certificates for new domain: +```bash +sudo certbot-certonly --domain new-trendz-domain.com --email some@email.io +``` + +Refresh HAProxy configuration: +```bash +sudo haproxy-refresh +``` + +That's it, HTTPS for Trendz UI configured and now you can access it via: +https://new-trendz-domain.com + + +### Fresh installation on new server + +Please follow this [guide](/docs/user-guide/install/pe/add-haproxy-ubuntu) to install HAProxy and generate valid SSL certificate using Let's Encrypt. + +### Host ThingsBoard and Trendz on the same domain + +ThingsBoard and Trendz can share same domain name. In this case ThingsBoard web page would be loaded using following link: + +```bash +https://{my-domain}/ +``` + +and Trendz web page would be loaded using following link + +```bash +https://{my-domain}/trendz/ +``` + +For enabling such configuration we have to update HAProxy config to route specific requests to Trendz service. +Open HAProxy configuration file +```bash +sudo nano /etc/haproxy/haproxy.cfg +``` +{: .copy-code} + +Locate **frontend https_in** section, add new access list that will match traffic by URL path and redirect this traffic to Trendz backend: + +```bash +... +acl trendz_acl path_beg /trendz/ path_beg /apiTrendz/ +.... +use_backend tb-trendz if trendz_acl +``` diff --git a/_includes/templates/trendz/install/sync-with-tb.md b/_includes/templates/trendz/install/sync-with-tb.md new file mode 100644 index 0000000000..39192b8fdc --- /dev/null +++ b/_includes/templates/trendz/install/sync-with-tb.md @@ -0,0 +1,20 @@ +The final step is to verify that ThingsBoard is synchronized with Trendz. To do this: + +* Log in to **ThingsBoard** as a **Sysadmin**. +* Open the **Trendz Settings** page. + +If you see the message **"Synchronization completed successfully"**, the synchronization has been completed automatically and no further action is required. + +{% include images-gallery.html imageCollection="trendz-settings" %} + +If you see an error message, follow these steps: + +* Make sure that **Trendz is running**. +* Enter the correct **Trendz internal URL**. It must be accessible from the ThingsBoard service. +* Enter the correct **ThingsBoard internal URL**. It must be accessible from the Trendz service. +* Click **Save configuration**. +* Click **Retry discovery**. + +Once the message **"Synchronization completed successfully"** appears, the synchronization is complete. + +{% include images-gallery.html imageCollection="trendz-sync" %} diff --git a/_includes/templates/trendz/install/thingsboard-requirements.md b/_includes/templates/trendz/install/thingsboard-requirements.md new file mode 100644 index 0000000000..024b8a1140 --- /dev/null +++ b/_includes/templates/trendz/install/thingsboard-requirements.md @@ -0,0 +1,2 @@ +* **ThingsBoard version 4.3.0 or newer**. In case you have ThingsBoard version 4.2.1 or older, you could connect Trendz to ThingsBoard following the next [guide](/docs/trendz/connect-thingsboard). +* **Active Trendz Analytics addon**. To find out how to activate it, please follow the next [guide](/docs/trendz/activation/self-hosted). diff --git a/docs/trendz/activation/how-to.md b/docs/trendz/activation/how-to.md new file mode 100644 index 0000000000..6c2374b25a --- /dev/null +++ b/docs/trendz/activation/how-to.md @@ -0,0 +1,16 @@ +--- +layout: docwithnav-trendz +title: How To Activate Trendz +description: How To Activate Trendz +--- + +* TOC +{:toc} + +This page explains how to activate Trendz as well as pricing for each installation type: +* [ThingsBoard Cloud US/EU](/docs/trendz/activation/public-cloud) +* [ThingsBoard Private Cloud](/docs/trendz/activation/private-cloud) +* [ThingsBoard Self-Hosted via License Portal](/docs/trendz/activation/self-hosted) + +Trendz operates as an addon inside ThingsBoard, so activation happens directly through the ThingsBoard Billing or Licensing interface. +Follow the instructions below based on your environment. diff --git a/docs/trendz/activation/private-cloud.md b/docs/trendz/activation/private-cloud.md new file mode 100644 index 0000000000..ccf67fa136 --- /dev/null +++ b/docs/trendz/activation/private-cloud.md @@ -0,0 +1,10 @@ +--- +layout: docwithnav-trendz +title: How To Activate Trendz on ThingsBoard Private Cloud +description: How To Activate Trendz on ThingsBoard Private Cloud +--- + +* TOC +{:toc} + +If you want to activate Trendz add-on in Private Cloud - Contact us. diff --git a/docs/trendz/activation/public-cloud.md b/docs/trendz/activation/public-cloud.md new file mode 100644 index 0000000000..eb12353f11 --- /dev/null +++ b/docs/trendz/activation/public-cloud.md @@ -0,0 +1,57 @@ +--- +layout: docwithnav-trendz +title: How To Activate Trendz on ThingsBoard Cloud +description: How To Activate Trendz on ThingsBoard Cloud +--- + +* TOC +{:toc} + +This section describes how to activate Trendz in the ThingsBoard Cloud environment via the Billing page. + +## Activation Steps + +### Step 1. Open the Billing Page + +* Log in to your ThingsBoard Cloud environment. +* In the left-side navigation menu, open “Billing”. +* Scroll to the Add-ons section. + +[screenshot: Billing page — Add-ons list] + +### Step 2. Open the Trendz add-on + +* Find the Trendz Analytics card. +* Click “View Pricing” to see available subscription options and limits. + +[screenshot: Trendz card with pricing button] + +### Step 3. Activate Trendz + +* Select your desired plan. +* Click “Activate Add-on”. +* Confirm the subscription. + +[screenshot: Activation modal] + +### Step 4. Access Trendz Interface + +Once activated: + +* Return to the main menu. +* A new item “Trendz Analytics” will appear in the navigation panel. +* Click it to open the Trendz workspace. + +[screenshot: Trendz Analytics in the left menu] + +You can access Trendz home page: +* [ThingsBoard Cloud (US)](https://thingsboard.cloud/trendz/) +* [ThingsBoard Cloud (EU)](https://eu.thingsboard.cloud/trendz/) + +## Next Steps + +Follow our [Getting Started guide](/docs/trendz/getting-started) to explore all Trendz capabilities. + +## Pricing + +You can estimate your Trendz price using our calculator. diff --git a/docs/trendz/activation/self-hosted.md b/docs/trendz/activation/self-hosted.md new file mode 100644 index 0000000000..9c82ead3e8 --- /dev/null +++ b/docs/trendz/activation/self-hosted.md @@ -0,0 +1,70 @@ +--- +layout: docwithnav-trendz +title: How To Activate Self-Hosted Trendz +description: How To Activate Self-Hosted Trendz + +login: + 0: + image: /images/trendz/activation/self-hosted/login-1.png + title: 'Open the ThingsBoard License Portal and sign in with your ThingsBoard account as a sysadmin.' + 1: + image: /images/trendz/activation/self-hosted/login-2.png + title: 'Go to the Subscriptions tab or Perpetual licenses tab (depends on your subscription type).' + +enable: + 0: + image: /images/trendz/activation/self-hosted/enable-1.png + title: 'In the list of licensed installations, select the ThingsBoard instance for which you want to enable Trendz and click on it to open the instance profile' + 1: + image: /images/trendz/activation/self-hosted/enable-2.png + title: 'Click Manage Add-ons.' + 2: + image: /images/trendz/activation/self-hosted/enable-3.png + title: 'Scroll down and enable the Trendz Analytics checkbox.' + 3: + image: /images/trendz/activation/self-hosted/enable-4.png + title: 'Click Next in the lower right corner.' + +complete-payment: + 0: + image: /images/trendz/activation/self-hosted/complete-payment.png + title: 'On the Summary screen, verify the selected plan and full price. If everything is correct, click Update and complete the payment.' +--- + +* TOC +{:toc} + +This section describes how to activate Trendz for a ThingsBoard self-hosted environment via the License Portal. + +## Activation Steps + +### Step 1. Log in to the License Portal + +* Open the [ThingsBoard License Portal](https://license.thingsboard.io/login). +* Sign in with your ThingsBoard account as a sysadmin. +* Go to the **Subscriptions** tab or **Perpetual licenses** tab (depends on your subscription type). + +{% include images-gallery.html imageCollection="login" %} + +### Step 2. Select Instance and Enable Trendz Add-on + +* In the list of licensed installations, select the ThingsBoard instance for which you want to enable Trendz. +* Click on it to open the instance profile. +* Click **Manage Add-ons**. +* Scroll down and enable the **Trendz Analytics** checkbox. +* Click **Next** in the lower right corner. + +{% include images-gallery.html imageCollection="enable" %} + +### Step 3. Review Summary and Complete Payment + +* On the Summary screen, verify the selected plan and full price. +* If everything is correct, click **Update** and complete the payment. + +{% include images-gallery.html imageCollection="complete-payment" %} + +## Next Steps + +* Follow our [Installation guide](/docs/trendz/install/installation-options) to install Trendz on your environment. +* Follow our [Getting Started guide](/docs/trendz/getting-started) to explore all Trendz capabilities. +* Visit our [Documentation](/docs/trendz) to explore all Trendz capabilities and features. diff --git a/docs/trendz/ai-assistance-widget.md b/docs/trendz/ai-assistance-widget.md index d3fc2b004a..d06c6da63a 100644 --- a/docs/trendz/ai-assistance-widget.md +++ b/docs/trendz/ai-assistance-widget.md @@ -1,7 +1,7 @@ --- layout: docwithnav-trendz -title: AI Assistance Widget -description: Step-by-step guide to interact with Trendz AI Assistance Widget. +title: Advanced analytics Chat Assistant widget +description: Step-by-step guide to interact with Advanced analytics Chat Assistant widget. trendz-assistance-chat-example: 0: @@ -59,10 +59,10 @@ trendz-assistance-add-chat-widget: title: Click + Add widget 1: image: /images/trendz/ai/chat-widget/add-chat-widget-2.png - title: Select Trendz Bundle + title: Select Advanced analytics Bundle 2: image: /images/trendz/ai/chat-widget/add-chat-widget-3.png - title: Select Trendz Chat Assistant + title: Select Advanced analytics Chat Assistant 3: image: /images/trendz/ai/chat-widget/add-chat-widget-4.png title: Choose the second alias as the Entity alias. Add Name as the Data key. @@ -127,7 +127,7 @@ It can be added to a dashboard in ThingsBoard and provides an easy way to ask qu Below, we will provide a detailed guide on how to use the assistant with aliases. -## Trendz Chat Assistant with Alias +## Advanced analytics Chat Assistant with Alias ### Step 1. Creating a Dashboard * Go to Dashboards -> Add Dashboard -> Create New Dashboard. @@ -158,14 +158,15 @@ Below, we will provide a detailed guide on how to use the assistant with aliases {% include images-gallery.html imageCollection="trendz-assistance-add-table" %} -### Step 4. Adding Trendz Chat Assistant Widget +### Step 4. Adding advanced Analytics Chat Assistant Widget + * Click **+ Add widget**. - * Select **Trendz Bundle**. (If you do not see Trendz Bundle, refer to the [Trendz Bundle page](/docs/trendz/trendz-bundle/). - * Select **Trendz Chat Assistant**. + * Select **Advanced analytics Bundle**. + * Select **Advanced analytics Chat Assistant**. * Choose the second alias as the **Entity alias**. * Add *Name* as the **Data key**. * Go to the Appearance section and enter **Filter name** fields, then click **Add**. - * Ensure the Trendz Chat Assistant Widget is added. Click **Save**. + * Ensure the Advanced analytics Chat Assistant Widget is added. Click **Save**. {% include images-gallery.html imageCollection="trendz-assistance-add-chat-widget" %} diff --git a/docs/trendz/connect-thingsboard.md b/docs/trendz/connect-thingsboard.md index 1346624c92..149500918b 100644 --- a/docs/trendz/connect-thingsboard.md +++ b/docs/trendz/connect-thingsboard.md @@ -9,84 +9,57 @@ description: Connect Trendz Analytics platform to the ThingsBoard * TOC {:toc} +## Trendz with ThingsBoard 4.2.1 or Older -## Connect to ThingsBoard -You can connect Trendz Analytics to the ThingsBoard Community Edition or ThingsBoard Professional Edition. +This guide explains how to connect Trendz with ThingsBoard 4.2.1 or older. We strongly recommend updating ThingsBoard +to the latest version to access all Trendz and ThingsBoard features. -
+To install Trendz for ThingsBoard 4.2.1 or older: -By default, Trendz expects that ThingsBoard is hosted on the same instance and accessible via an URL: - - - http://localhost:9090 - -If your ThingsBoard installation is hosted on another instance/port - you have to update config with correct value: +1. Start from step 1 of the installation guide. +2. Before the `Start Trendz service` step, configure `TRENDZ_LICENSE_SECRET` and `TB_API_URL`. +3. Complete all other steps, except for `Sync ThingsBoard With Trendz`. +4. Perform [post-installation steps](/docs/trendz/post-installation-steps). -Open Trendz configuration file: - -``` -sudo nano /usr/share/trendz/conf/trendz.conf -``` - -And update this property to the correct value: - -```yml -export TB_API_URL=http://localhost:9090 -``` - -For docker installations - update environment variable ``TB_API_URL`` with the correct value. - -## Authentication and Security -Trendz uses ThingsBoard as an authentication service. Any Tenant Administrator or Customer User can sign in into Trendz UI using their login\password that they use for authentication in the ThingsBoard. - -Same security restrictions that are configured on the ThingsBoard works in the Trendz Analytics. - -- **Tenant Administrator** has access to all Devices/Assets -- **Customer user** has access only to those Devices/Assets that they have permissions to view +### Configure License Secret +To interact with ThingsBoard 4.2.1 or older, you need a Trendz license secret key. If you do not have one, obtain it from the [ThingsBoard support team](/docs/contact-us). -## Topology Discovery -Trendz Topology represents the business model of Devices/Assets that was created in ThingsBoard. -Topology defines dimensions/fields that used for building visualizations and relation between Devices/Assets. -Here are the core components of Trendz Topology: +Edit the Trendz configuration file: +```bash +sudo nano /etc/trendz/conf/trendz.conf +``` -**Business Entity** - Definition of a group of Devices or Assets with same Device Type/Asset Type. Each Business Entity has: - -- **Criteria** - General properties that define how Devices/Assets fetched from the ThingsBoard -- **Business Entity Field** - Represent field that is used during building visualizations. Field contains data type, label and query parameters used during fetching data from The thingsBoard. -Here is a list of supported fields: - - Entity Name - the name of the Device or Asset - - Owner - who own device (administrator/customer) - - Attribute - - Telemetry -- **Relations** - configured relations between Business Entities and their properties. Trendz Relations represent ThingsBoard relations between Devices and Assets +Add the following line and replace `YOUR_LICENSE_SECRET_HERE` with your license key: -### First Topology discovery +```bash +export TRENDZ_LICENSE_SECRET=YOUR_LICENSE_SECRET_HERE +``` +For Docker installations, update the `TRENDZ_LICENSE_SECRET` environment variable with the correct value. -After the first sign-in user should perform initial Topology Discovery. During this process, Trendz will analyze all Devices/Assets available in the ThingsBoard, their attributes/telemetry and all relations between them. -As a result, Trendz will extract and save the collection of Business Entities. You can view and modify them on the `Settings` page. +### Configure TB_API_URL -![image](/images/trendz/first-discovery.png) +By default, Trendz assumes ThingsBoard is hosted on the same instance and accessible at: -
+``` +http://localhost:9090 +``` -![image](/images/trendz/discover-results.png) - -### Manual Topology rediscovery -Business Entity does not represent a single Device or Asset, but the query that used for fetching Device/Asset from the ThingsBoard. It means that you do not need to update topology if new Devices Assets with the same type were added on the ThingsBoard. +If ThingsBoard is hosted on a different instance or port, update the configuration accordingly: -When new Device/Asset types were added or attribute/telemetry with a new key was created in the ThingsBoard - you should update Topology. +```bash +sudo nano /usr/share/trendz/conf/trendz.conf +``` +Set the correct URL: -Manual Topology Rediscovery will scan ThingsBoard again, detect modifications and update collection of Business Entities with required settings. -You can trigger this process on the `Settings` page by pressing `Refresh Topology`. +```yml +export TB_API_URL=http://localhost:9090 +``` - -### Manual Modification -Another option for updating topology is a manual modification of Business Entity properties. You can have as many Business Entities with similar properties as you want. -It may be useful in case when the same devices/assets represent different aspects of business solution. For example, single devices can monitor the environment and submit debug events for troubleshooting. -By separating debug events from environment measurements into isolated Business Entities it becomes easier to build visualizations focused on a single aspect of your solution. +For Docker installations, update the `TB_API_URL` environment variable with the correct value. ## Next Steps diff --git a/docs/trendz/embed-visuals.md b/docs/trendz/embed-visuals.md index 0f24f9a90d..2580e5b36a 100755 --- a/docs/trendz/embed-visuals.md +++ b/docs/trendz/embed-visuals.md @@ -13,10 +13,6 @@ description: Add Trendz widgets on dashboard All interactive visualizations created with the Trendz Analytics Platform could be shared with other users and embed on ThingsBoard Dashboards or external sites. In this guide, you will learn how to do this. -## Prerequisites - -You should [import Trendz widget bundle into ThingsBoard](/docs/trendz/trendz-bundle#Import-Trendz-bundle-into-ThingsBoard). If you are using ThingsBoard Cloud - you should already have required bundle imported into ThingsBoard. - ## Add visualization on ThingsBoard Dashboard ### Add using share wizard @@ -33,7 +29,7 @@ Once widgets bundle imported, and you already have saved Trendz Visualization - * In Trendz, open required visualization * Press **Share** button, and click `Copy link` button - sharable URL will be copied into the clipboard * Open required ThingsBoard Dashboard and press Edit button -* Select **Trendz View Static** widget from **Trendz Bundle** and add it on the Dashboard +* Select **Advanced analytics View Static** widget from **Advanced analytics Bundle** and add it on the Dashboard * Switch to **Advanced** tab of the widget and insert the copied URL from step 1 * Save dashboard diff --git a/docs/trendz/getting-started.md b/docs/trendz/getting-started.md index 14e8e8f8b9..c3df174f00 100644 --- a/docs/trendz/getting-started.md +++ b/docs/trendz/getting-started.md @@ -211,8 +211,8 @@ The goal of this tutorial is to demonstrate the basic usage of Trendz Analytics. ## Prerequisites -You will need to have a Trendz Analytics server up and running. -The easiest way is to use [Trendz Cloud](/docs/trendz/install/cloud/) SaaS. +You will need to have a Trendz Analytics up and running. +The easiest way is to use [Trendz Analytics add-on in ThingsBoard Cloud](/docs/trendz/install/cloud/) SaaS. Alternatively, you can install Trendz Analytics using the [Installation Guide](/docs/trendz/install/installation-options/). @@ -226,12 +226,12 @@ The full set of fields and relationships used in this guide is shown below: Once the Trendz Service is up and running, you can sign in to the Trendz UI using the following URL: -* Trendz Cloud (North America): [https://thingsboard.cloud/trendz](https://thingsboard.cloud/trendz) -* Trendz Cloud (Europe): [https://eu.thingsboard.cloud/trendz](https://eu.thingsboard.cloud/trendz) -* Self-hosted Trendz: [http://localhost:8888](http://localhost:8888) +* ThingsBoard Cloud (North America): [https://thingsboard.cloud/trendz/](https://thingsboard.cloud/trendz/) +* ThingsBoard Cloud (Europe): [https://eu.thingsboard.cloud/trendz/](https://eu.thingsboard.cloud/trendz/) +* Self-hosted Trendz: [http://localhost:8888/trendz/](http://localhost:8888/trendz/) -You can log in using Tenant Administrator credentials from ThingsBoard. Trendz uses ThingsBoard as an authentication service. -Any Tenant Administrator or Customer User can sign in to the Trendz UI using the same login/password they use in ThingsBoard. +You can log in using Tenant Administrator credentials from ThingsBoard. Any Tenant Administrator or Customer User can +sign in to the Trendz UI using the same login/password they use in ThingsBoard. {% include images-gallery.html imageCollection="discover-topology" %} diff --git a/docs/trendz/install/cloud.md b/docs/trendz/install/cloud.md index 17b829ad5a..157322ad98 100644 --- a/docs/trendz/install/cloud.md +++ b/docs/trendz/install/cloud.md @@ -2,46 +2,32 @@ layout: docwithnav-trendz assignees: - vparomskiy -title: Enable Trendz Analytics in ThinsgBoard Cloud -description: Activate Trendz Analytics Cloud - -cloudPlan: - 0: - image: /images/trendz/cloud-1.webp - title: 'Log in to ThingsBoard Cloud account and select “Plan and Billing” menu option. Press “Update Plan” button' - 1: - image: /images/trendz/cloud-2.webp - title: 'Choose “ThingsBoard + Trendz” and select the most suitable plan for you' - 2: - image: /images/trendz/cloud-3.webp - title: 'Reload the page to see new “Trendz Analytics” option in your ThingsBoard Menu' +title: Enable Trendz Analytics in ThingsBoard Cloud +description: Activate Trendz Analytics add-on --- * TOC {:toc} -## What is Trendz Cloud +## Trendz Analytics in ThingsBoard Cloud -The Trendz Analytics Cloud is a fully managed, scalable and fault-tolerant version of [Trendz Analytics product](/products/trendz/). It is already integrated with ThingsBoard Cloud and can be used to analyze your data from ThingsBoard Cloud. +Trendz Analytics in ThingsBoard Cloud is a fully managed, scalable, and fault-tolerant version of the [Trendz Analytics add-on](/products/trendz/). +It is already integrated into ThingsBoard Cloud and can be used to analyze your data. -- **Improved time to market.** Save time on maintenance of the platform or configuration of the features. -- **Reduced costs.** The cost of the cluster infrastructure is shared between the users of the platform. -- **High availability.** Trendz Cloud uses microservices architecture and is deployed in multiple availability zones. -- **Data durability.** Platform uses data replication and backup procedures to make sure you don't lose the data. +* **Improved time to market.** Save time on maintaining the platform or configuring its features. +* **Reduced costs.** Infrastructure costs are shared between platform users. +* **High availability.** The Trendz Analytics uses a microservices architecture and is deployed across multiple availability zones. +* **Data durability.** The platform uses data replication and backup procedures to ensure you don't lose data. ## Prerequisites -You need to have active ThingsBoard Cloud account to active Trendz Analytics Cloud. If you don't have ThingsBoard Cloud account yet, please [sign up](https://thingsboard.cloud/signup). +You need an active ThingsBoard Cloud account to activate the Trendz Analytics. If you don't have a ThingsBoard Cloud account yet, please [sign up](https://thingsboard.cloud/signup). -## Activate Trendz Analytics Cloud +## Activate Trendz Analytics -- Log in to ThingsBoard Cloud account and select [Plan and Billing (North America)](https://thingsboard.cloud/billing) / [Plan and Billing (Europe)](https://eu.thingsboard.cloud/billing) menu option. -- Press **Update Plan** button -- Choose **ThingsBoard + Trendz** and select the most suitable plan for you - - -{% include images-gallery.html imageCollection="cloudPlan" %} +Trendz Analytics is already connected to the ThingsBoard Cloud infrastructure, so the only step required to use Trendz is to activate it. +You can find out how to do this [here](/docs/trendz/activation/public-cloud) ## Next steps diff --git a/docs/trendz/install/docker-windows.md b/docs/trendz/install/docker-windows.md index 10d9aa2923..c8a1fb2136 100644 --- a/docs/trendz/install/docker-windows.md +++ b/docs/trendz/install/docker-windows.md @@ -1,154 +1,112 @@ --- layout: docwithnav-trendz assignees: -- ashvayka + - ashvayka title: Installing ThingsBoard Trendz Analytics using Docker (Windows) description: Installing ThingsBoard Trendz Analytics using Docker (Windows) +trendz-settings: + 0: + image: /images/trendz/install/sync/trendz-settings-1.png + title: "Log in to ThingsBoard as a Sysadmin." + 1: + image: /images/trendz/install/sync/trendz-settings-2.png + title: "Open the Trendz Settings page." + 2: + image: /images/trendz/install/sync/trendz-settings-3.png + title: "If you see the message \"Synchronization completed successfully\", the synchronization has been completed automatically and no further action is required." +trendz-sync: + 0: + image: /images/trendz/install/sync/trendz-sync-1.png + title: "If you see an error message, follow these steps." + 1: + image: /images/trendz/install/sync/trendz-sync-2.png + title: "Enter the correct Trendz internal URL and ThingsBoard internal URL." + 2: + image: /images/trendz/install/sync/trendz-sync-3.png + title: "Click Save configuration." + 3: + image: /images/trendz/install/sync/trendz-sync-4.png + title: "Click Retry discovery." + 4: + image: /images/trendz/install/sync/trendz-sync-5.png + title: "Once the message \"Synchronization completed successfully\" appears, the synchronization is complete." + --- -* TOC +* TOC {:toc} - -This guide will help you to install and start Trendz Analytics using Docker on Windows. +This guide will help you to install and start Trendz Analytics using Docker on Windows. ## Prerequisites -- [Install Docker Toolbox for Windows](https://docker-docs.uclv.cu/toolbox/toolbox_install_windows/) +{% include templates/trendz/install/docker-requirements-windows.md %} +{% include templates/trendz/install/thingsboard-requirements.md %} -## Step 1. Obtain the license key +## Installation Steps -We assume you have already chosen subscription plan for Trendz and have license key. If not, please get your [Free Trial license](/pricing/?section=trendz-options&product=trendz-self-managed&solution=trendz-pay-as-you-go) before you proceed. -See [How-to get pay-as-you-go subscription](https://www.youtube.com/watch?v=dK-QDFGxWek){:target="_blank"} for more details. +### Step 1. Docker Compose setup -Note: We will reference the license key you have obtained during this step as PUT_YOUR_LICENSE_SECRET_HERE guide. +Trendz can be run either in the same Docker Compose file as ThingsBoard or in a separate Docker Compose file. -## Step 2. Running Trendz service +For small and medium installations, we recommend installing Trendz in the same Docker Compose file as ThingsBoard. -### Docker Compose setup +{% capture contenttogglespec %} +The same Docker Compose file with ThingsBoard%,%theSameFile%,%templates/trendz/install/docker-compose-the-same-file-windows.md%br% +Separate Docker Compose file%,%separateFile%,%templates/trendz/install/docker-compose-separate-file-windows.md{% endcapture %} +{% include content-toggle.liquid content-toggle-id="runOption" toggle-spec=contenttogglespec %} -Make sure your have [logged in](https://docs.docker.com/engine/reference/commandline/login/) to docker hub using command line. +### Step 2. Start Trendz service -Create docker compose file for Trendz Analytics service: +{% include templates/trendz/install/docker-start-trendz-service.md %} -```text -docker-compose.yml -``` -{: .copy-code} +### Step 3. Sync ThingsBoard With Trendz -Add the following line to the yml file. Don't forget to replace “PUT_YOUR_LICENSE_SECRET_HERE” with your **license secret obtained on the first step** - -```yml - -version: '3.0' -services: - mytrendz: - restart: always - image: "thingsboard/trendz:{{ site.release.trendz_ver }}" - ports: - - "8888:8888" - environment: - TB_API_URL: http://10.0.0.101:8080 - TRENDZ_LICENSE_SECRET: PUT_YOUR_LICENSE_SECRET_HERE - TRENDZ_LICENSE_INSTANCE_DATA_FILE: /data/license.data - SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/trendz - SPRING_DATASOURCE_USERNAME: postgres - SPRING_DATASOURCE_PASSWORD: postgres - SCRIPT_ENGINE_PROVIDER: DOCKER_CONTAINER - SCRIPT_ENGINE_DOCKER_PROVIDER_URL: mypyexecutor:8181 - SCRIPT_ENGINE_TIMEOUT: 30000 - volumes: - - mytrendz-data:/data - - mytrendz-logs:/var/log/trendz - mypyexecutor: - restart: always - image: "thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}" - ports: - - "8181:8181" - environment: - SCRIPT_ENGINE_RUNTIME_TIMEOUT: 30000 - EXECUTOR_MANAGER: 1 - EXECUTOR_SCRIPT_ENGINE: 6 - THROTTLING_QUEUE_CAPACITY: 10 - THROTTLING_THREAD_POOL_SIZE: 6 - NETWORK_BUFFER_SIZE: 10485760 - volumes: - - mytrendz-data/python-executor:/python-executor - postgres: - restart: always - image: "postgres:15" - ports: - - "5432" - environment: - POSTGRES_DB: trendz - POSTGRES_PASSWORD: postgres - volumes: - - mytrendz-data/db:/var/lib/postgresql/data -volumes: - mytrendz-data: - external: true - mytrendz-logs: - external: true - mytrendz-data-python-executor: - external: true - mytrendz-data-db: - external: true -``` -{: .copy-code} +{% include templates/trendz/install/sync-with-tb.md %} -Where: - -- `TB_API_URL` - url for connecting to ThingsBoard Rest API (for example http://10.5.0.11:8080). Note that ThingsBoard IP address should be resolvable from Trendz docker container -- `PUT_YOUR_LICENSE_SECRET_HERE` - placeholder for your license secret obtained on the first step -- `8888:8888` - connect local port 8888 to exposed internal HTTP port 8888 -- `mytrendz-data:/data` - mounts the volume `mytrendz-data` to Trendz data directory -- `mytrendz-data/db:/var/lib/postgresql/datad` - mounts the volume `mytrendz-data/db` to Postgres data directory -- `mytrendz-logs:/var/log/trendz` - mounts the volume `mytrendz-logs` to Trendz logs directory -- `mytrendz` - friendly local name of this machine -- `--restart always` - automatically start Trendz in case of system reboot and restart in case of failure. -- `thingsboard/trendz:{{ site.release.trendz_ver }}` - Trendz docker image -- `thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}` - Trendz python script executor docker image -- `SCRIPT_ENGINE_RUNTIME_TIMEOUT` - Python script execution timeout -- `mytrendz-data/python-executor:/python-executor` - mounts the volume `mytrendz-data/python-executor` to Trendz Python Executor additional data directory - -### Setup Docker volumes - -Windows users should use docker managed volume for Trendz DataBase. Create docker volume (for ex. `mytrendz-data`) before -executing docker run command: Open “Docker Quickstart Terminal”. Execute the following command to create docker volume: - -```yml -docker volume create mytrendz-data -docker volume create mytrendz-data-db -docker volume create mytrendz-data-python-executor -docker volume create mytrendz-logs -``` -{: .copy-code} +## Authentication -**NOTE**: replace directory mytrendz-data and mytrendz-logs with directories you’re planning to used in docker-compose.yml. +{% include templates/trendz/install/authentication.md %} -### Running service +## Detaching, stop and start commands -{% assign serviceName = "trendz" %} -{% include templates/install/docker/docker-compose-up.md %} - -After executing this command you can open `http://{your-host-ip}:8888` in you browser (for ex. `http://localhost:8888`). You should see Trendz login page. - -### Authentication +{% include templates/trendz/install/docker-detach-stop-start-commands.md %} -For first authentication you need to use **Tenant Administrator** credentials from your **ThingsBoard** +## Upgrade Trendz Service -Trendz uses ThingsBoard as an authentication service. During first sign in ThingsBoard service should be also available -to validate credentials. +{% capture upgrade_version_by_version%} +**Note, that you can upgrade Trendz from any version to the latest at once (for example, 1.2.0 -> {{ site.release.trendz_ver }} ,etc).** +{% endcapture %} +{% include templates/info-banner.md content=upgrade_version_by_version %} -## Post-installation steps -It is essential to follow these [instructions](/docs/trendz/post-installation-steps) to fully use all features, such as saving telemetry to ThingsBoard and adding Trendz views to dashboards. +Below is an example of how to upgrade from any Trendz version to {{ site.release.trendz_ver }} -## Detaching, stop and start commands +* Create a dump of your database: -{% assign serviceName = "trendz" %} -{% assign serviceFullName = "Trendz" %} -{% include templates/install/docker/detaching-stop-start-commands.md %} +```bash +docker compose exec trendz-postgres sh -c "pg_dump -U postgres trendz > /var/lib/postgresql/data/trendz_dump" +``` +{: .copy-code} + +When a new Trendz release is available, follow these steps to update your installation without losing data: + +{% capture old_manifests_info %} +**If you are upgrading using previous version of deployment files, make sure to follow steps described in this [instruction](/docs/trendz/install/old-docker-migrate/) first.** +{% endcapture %} +{% include templates/warn-banner.md content=old_manifests_info %} + +1. Change the version of the `thingsboard/trendz` and `thingsboard/trendz-python-executor` in the `docker-compose.yml` file to the {{ site.release.trendz_ver }}. + +2. Execute the following commands: + +```bash +docker pull thingsboard/trendz:{{ site.release.trendz_ver }} +docker compose stop trendz +docker compose run --rm -e UPGRADE_TRENDZ=true trendz +docker compose up -d +``` +{: .copy-code} ## Troubleshooting @@ -158,4 +116,4 @@ It is essential to follow these [instructions](/docs/trendz/post-installation-st ## Next steps -{% assign currentGuide = "InstallationOptions" %}{% include templates/trndz-guides-banner.md %} +{% assign currentGuide = "InstallationOptions" %}{% include templates/trndz-guides-banner.md %} \ No newline at end of file diff --git a/docs/trendz/install/docker.md b/docs/trendz/install/docker.md index 84dab2bd8d..0050a4b5f0 100644 --- a/docs/trendz/install/docker.md +++ b/docs/trendz/install/docker.md @@ -1,198 +1,114 @@ --- layout: docwithnav-trendz assignees: -- ashvayka + - ashvayka title: Installing ThingsBoard Trendz Analytics using Docker (Linux or Mac OS) description: Installing ThingsBoard Trendz Analytics using Docker (Linux or Mac OS) +trendz-settings: + 0: + image: /images/trendz/install/sync/trendz-settings-1.png + title: "Log in to ThingsBoard as a Sysadmin." + 1: + image: /images/trendz/install/sync/trendz-settings-2.png + title: "Open the Trendz Settings page." + 2: + image: /images/trendz/install/sync/trendz-settings-3.png + title: "If you see the message \"Synchronization completed successfully\", the synchronization has been completed automatically and no further action is required." +trendz-sync: + 0: + image: /images/trendz/install/sync/trendz-sync-1.png + title: "If you see an error message, follow these steps." + 1: + image: /images/trendz/install/sync/trendz-sync-2.png + title: "Enter the correct Trendz internal URL and ThingsBoard internal URL." + 2: + image: /images/trendz/install/sync/trendz-sync-3.png + title: "Click Save configuration." + 3: + image: /images/trendz/install/sync/trendz-sync-4.png + title: "Click Retry discovery." + 4: + image: /images/trendz/install/sync/trendz-sync-5.png + title: "Once the message \"Synchronization completed successfully\" appears, the synchronization is complete." + --- * TOC {:toc} -This guide will help you to install and start Trendz Analytics using Docker on Linux or Mac OS. +This guide will help you to install and start Trendz Analytics using Docker on Linux or Mac OS. ## Prerequisites -- [Install Docker CE](https://docs.docker.com/engine/installation/) -- [Install Docker Compose](https://docs.docker.com/compose/install/) - -## Step 1. Obtain the license key - -We assume you have already chosen subscription plan for Trendz and have license key. If not, please get your [Free Trial license](/pricing/?section=trendz-options&product=trendz-self-managed&solution=trendz-pay-as-you-go) before you proceed. -See [How-to get pay-as-you-go subscription](https://www.youtube.com/watch?v=dK-QDFGxWek){:target="_blank"} for more details. - -Note: We will reference the license key you have obtained during this step as PUT_YOUR_LICENSE_SECRET_HERE later in this guide. - -## Step 2. Running Trendz service - -### Docker Compose setup - -Make sure your have [logged in](https://docs.docker.com/engine/reference/commandline/login/) to docker hub using command line. +{% include templates/trendz/install/docker-requirements-linux.md %} +{% include templates/trendz/install/thingsboard-requirements.md %} -Create docker compose file for Trendz Analytics service: +## Installation Steps -```text -sudo nano docker-compose.yml -``` -{: .copy-code} +### Step 1. Docker Compose setup -Add the following line to the yml file. Don't forget to replace “PUT_YOUR_LICENSE_SECRET_HERE” with your **license secret obtained on the first step** - -```yml - -version: '3.0' -services: - mytrendz: - restart: always - image: "thingsboard/trendz:{{ site.release.trendz_ver }}" - ports: - - "8888:8888" - environment: - TB_API_URL: http://10.0.0.101:8080 - TRENDZ_LICENSE_SECRET: PUT_YOUR_LICENSE_SECRET_HERE - TRENDZ_LICENSE_INSTANCE_DATA_FILE: /data/license.data - SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/trendz - SPRING_DATASOURCE_USERNAME: postgres - SPRING_DATASOURCE_PASSWORD: postgres - SCRIPT_ENGINE_PROVIDER: DOCKER_CONTAINER - SCRIPT_ENGINE_DOCKER_PROVIDER_URL: mypyexecutor:8181 - SCRIPT_ENGINE_TIMEOUT: 30000 - volumes: - - ~/.mytrendz-data:/data - - ~/.mytrendz-logs:/var/log/trendz - mypyexecutor: - restart: always - image: "thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}" - ports: - - "8181:8181" - environment: - MAX_HEAP_SIZE: 750M - SCRIPT_ENGINE_RUNTIME_TIMEOUT: 30000 - EXECUTOR_MANAGER: 1 - EXECUTOR_SCRIPT_ENGINE: 6 - THROTTLING_QUEUE_CAPACITY: 10 - THROTTLING_THREAD_POOL_SIZE: 6 - NETWORK_BUFFER_SIZE: 5242880 - volumes: - - ~/.mytrendz-data/python-executor:/python-executor - postgres: - restart: always - image: "postgres:15" - ports: - - "5432" - environment: - POSTGRES_DB: trendz - POSTGRES_PASSWORD: postgres - volumes: - - ~/.mytrendz-data/db:/var/lib/postgresql/data -``` -{: .copy-code} +Trendz can be run either in the same Docker Compose file as ThingsBoard or in a separate Docker Compose file. -Where: - -- `TB_API_URL` - url for connecting to ThingsBoard Rest API (for example http://10.5.0.11:8080). Note that ThingsBoard IP address should be resolvable from Trendz docker container -- `PUT_YOUR_LICENSE_SECRET_HERE` - placeholder for your license secret obtained on the first step -- `8888:8888` - connect local port 8888 to exposed internal HTTP port 8888 -- `~/.mytrendz-data:/data` - mounts the volume `~/.mytrendz-data` to Trendz data directory -- `~/.mytrendz-data/db:/var/lib/postgresql/datad` - mounts the volume `~/.mytrendz-data/db` to Postgres data directory -- `~/.mytrendz-logs:/var/log/thingsboard` - mounts the volume `~/.mytrendz-logs` to Trendz logs directory -- `mytrendz` - friendly local name of this machine -- `--restart always` - automatically start Trendz in case of system reboot and restart in case of failure. -- `thingsboard/trendz:{{ site.release.trendz_ver }}` - Trendz docker image -- `thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}` - Trendz python script executor docker image -- `SCRIPT_ENGINE_RUNTIME_TIMEOUT` - Python script execution timeout -- `~/.mytrendz-data/python-executor:/python-executor` - mounts the volume `~/.mytrendz-data/python-executor` to Trendz Python Executor additional data directory - - -Run following commands, before starting docker container(s), to create folders for storing data and logs. -These commands additionally will change owner of newly created folders to docker container user. -To do this (to change user) **chown** command is used, and this command requires *sudo* permissions (command will request password for a *sudo* access): +For small and medium installations, we recommend installing Trendz in the same Docker Compose file as ThingsBoard. -```bash -mkdir -p ~/.mytrendz-data && sudo chown -R 799:799 ~/.mytrendz-data -mkdir -p ~/.mytrendz-data/python-executor && sudo chown -R 799:799 ~/.mytrendz-data/python-executor -mkdir -p ~/.mytrendz-logs && sudo chown -R 799:799 ~/.mytrendz-logs -``` -{: .copy-code} +{% capture contenttogglespec %} +The same Docker Compose file with ThingsBoard%,%theSameFile%,%templates/trendz/install/docker-compose-the-same-file-linux.md%br% +Separate Docker Compose file%,%separateFile%,%templates/trendz/install/docker-compose-separate-file-linux.md{% endcapture %} +{% include content-toggle.liquid content-toggle-id="runOption" toggle-spec=contenttogglespec %} -**NOTE**: replace directory ~/.mytrendz-data and ~/.mytrendz-logs with directories you’re planning to used in docker-compose.yml. +### Step 2. Start Trendz service -### Running service +{% include templates/trendz/install/docker-start-trendz-service.md %} -{% assign serviceName = "trendz" %} -{% include templates/install/docker/docker-compose-up.md %} - -After executing this command you can open `http://{your-host-ip}:8888` in you browser (for ex. `http://localhost:8888`). -You should see Trendz login page. +### Step 3. Sync ThingsBoard With Trendz -### Authentication +{% include templates/trendz/install/sync-with-tb.md %} -For first authentication you need to use **Tenant Administrator** credentials from your **ThingsBoard** +## Authentication -Trendz uses ThingsBoard as an authentication service. During first sign in ThingsBoard service should be also available -to validate credentials. - -## Post-installation steps - -It is essential to follow these [instructions](/docs/trendz/post-installation-steps) to fully use all features, such as saving telemetry to ThingsBoard and adding Trendz views to dashboards. +{% include templates/trendz/install/authentication.md %} ## Detaching, stop and start commands -{% assign serviceName = "trendz" %} -{% assign serviceFullName = "Trendz" %} -{% include templates/install/docker/detaching-stop-start-commands.md %} +{% include templates/trendz/install/docker-detach-stop-start-commands.md %} ## Upgrade Trendz Service -Below is example on how to upgrade from 1.13.2 to {{ site.release.trendz_ver }} +{% capture upgrade_version_by_version%} +**Note, that you can upgrade Trendz from any version to the latest at once (for example, 1.2.0 -> {{ site.release.trendz_ver }} ,etc).** +{% endcapture %} +{% include templates/info-banner.md content=upgrade_version_by_version %} + +Below is an example of how to upgrade from any Trendz version to {{ site.release.trendz_ver }} * Create a dump of your database: ```bash -docker compose exec postgres sh -c "pg_dump -U postgres trendz > /var/lib/postgresql/data/trendz_dump" +docker compose exec trendz-postgres sh -c "pg_dump -U postgres trendz > /var/lib/postgresql/data/trendz_dump" ``` {: .copy-code} -{% capture dockerComposeStandalone %} -If you still rely on Docker Compose as docker-compose (with a hyphen) execute next command: -
**docker-compose exec postgres sh -c "pg_dump -U postgres trendz > /var/lib/postgresql/data/trendz_dump"** -{% endcapture %} -{% include templates/info-banner.md content=dockerComposeStandalone %} - -* Set upgradeversion variable to your **previous** Trendz version. +When a new Trendz release is available, follow these steps to update your installation without losing data: -```bash -docker compose exec mytrendz sh -c "echo '1.13.2' > /data/.upgradeversion" -``` -{: .copy-code} - -{% capture dockerComposeStandalone %} -If you still rely on Docker Compose as docker-compose (with a hyphen) execute next command: -
**docker-compose exec mytrendz sh -c "echo '1.13.2' > /data/.upgradeversion"** +{% capture old_manifests_info %} +**If you are upgrading using previous version of deployment files, make sure to follow steps described in this [instruction](/docs/trendz/install/old-docker-migrate/) first.** {% endcapture %} -{% include templates/info-banner.md content=dockerComposeStandalone %} +{% include templates/warn-banner.md content=old_manifests_info %} -* After this you need to update docker-compose.yml as in [Step 2](#docker-compose-setup) but with {{ site.release.trendz_ver }} instead of 1.13.2: +1. Change the version of the `thingsboard/trendz` and `thingsboard/trendz-python-executor` in the `docker-compose.yml` file to the {{ site.release.trendz_ver }}. -* Restart Trendz container +2. Execute the following commands: ```bash -docker compose stop mytrendz +docker pull thingsboard/trendz:{{ site.release.trendz_ver }} +docker compose stop trendz +docker compose run --rm -e UPGRADE_TRENDZ=true trendz docker compose up -d ``` {: .copy-code} -{% capture dockerComposeStandalone %} -If you still rely on Docker Compose as docker-compose (with a hyphen) here is the list of the above commands: -
**docker-compose stop mytrendz** -
**docker-compose up -d** -{% endcapture %} -{% include templates/info-banner.md content=dockerComposeStandalone %} - -To upgrade Trendz to the latest version those steps should be done **for each intermediate version**. - ## Troubleshooting ### DNS issues @@ -201,4 +117,4 @@ To upgrade Trendz to the latest version those steps should be done **for each in ## Next steps -{% assign currentGuide = "InstallationOptions" %}{% include templates/trndz-guides-banner.md %} +{% assign currentGuide = "InstallationOptions" %}{% include templates/trndz-guides-banner.md %} \ No newline at end of file diff --git a/docs/trendz/install/kubernetes.md b/docs/trendz/install/kubernetes.md index a697e473c1..d4a21dc848 100644 --- a/docs/trendz/install/kubernetes.md +++ b/docs/trendz/install/kubernetes.md @@ -5,6 +5,33 @@ assignees: title: Installing ThingsBoard Trendz Analytics on Kubernetes description: Installing ThingsBoard Trendz Analytics on Kubernetes +trendz-settings: + 0: + image: /images/trendz/install/sync/trendz-settings-1.png + title: "Log in to ThingsBoard as a Sysadmin." + 1: + image: /images/trendz/install/sync/trendz-settings-2.png + title: "Open the Trendz Settings page." + 2: + image: /images/trendz/install/sync/trendz-settings-3.png + title: "If you see the message \"Synchronization completed successfully\", the synchronization has been completed automatically and no further action is required." +trendz-sync: + 0: + image: /images/trendz/install/sync/trendz-sync-1.png + title: "If you see an error message, follow these steps." + 1: + image: /images/trendz/install/sync/trendz-sync-2.png + title: "Enter the correct Trendz internal URL and ThingsBoard internal URL." + 2: + image: /images/trendz/install/sync/trendz-sync-3.png + title: "Click Save configuration." + 3: + image: /images/trendz/install/sync/trendz-sync-4.png + title: "Click Retry discovery." + 4: + image: /images/trendz/install/sync/trendz-sync-5.png + title: "Once the message \"Synchronization completed successfully\" appears, the synchronization is complete." + --- * TOC {:toc} @@ -12,14 +39,18 @@ description: Installing ThingsBoard Trendz Analytics on Kubernetes This guide describes how to setup Trendz Analytics cluster with Kubernetes and Minikube. ## Prerequisites - + +{% include templates/trendz/install/thingsboard-requirements.md %} + You need to have a Kubernetes cluster, and the `kubectl` command-line tool must be configured to communicate with your cluster. If you don't have Minikube installed, please follow [these instructions](https://kubernetes.io/docs/setup/learning-environment/minikube/). -Configure your cluster by designating a node for the Trendz instance and labeling it with a custom label. Utilize affinity settings to instruct Kubernetes to deploy the Trendz instance on the specified node. +Configure your cluster by designating a node for the Trendz instance and labeling it with a custom label. Utilize affinity settings to instruct Kubernetes to deploy the Trendz instance on the specified node. Ensure that the node meets specific CPU and RAM requirements, with the typical usage being around 4 CPU and 8GB RAM. While you can set your own limits, we advise adhering to or exceeding the recommended specifications mentioned earlier. -## Step 1. Clone Trendz Kubernetes scripts +## Installation Steps + +### Step 1. Clone Trendz Kubernetes scripts ```bash git clone https://github.com/thingsboard/trendz-k8s.git --depth 1 @@ -27,43 +58,19 @@ cd trendz-k8s ``` {: .copy-code} -## Step 2. Obtain the license key - -We assume you have already chosen subscription plan for Trendz and have license key. If not, please get your [Free Trial license](/pricing/?section=trendz-options&product=trendz-self-managed&solution=trendz-pay-as-you-go) before you proceed. -See [How-to get pay-as-you-go subscription](https://www.youtube.com/watch?v=dK-QDFGxWek){:target="_blank"} for more details. - -Note: We will reference the license key you have obtained during this step as PUT_YOUR_LICENSE_SECRET_HERE later in this guide. - -## Step 3. Configure your license key - -```bash -nano trendz-app-deployment.yml -``` -{: .copy-code} - -and put the license secret parameter: +### Step 2. Configure Trendz database -``` -# tb-node StatefulSet configuration - -- name: TRENDZ_LICENSE_SECRET - value: "PUT_LICENSE_HERE" - -``` - -## Step 4. Configure Trendz database - -Set up an external Postgresql database instance with an empty database named "trendz." This instance can be hosted on services like RDS (AWS) or as your stateful deployment. +Set up an external Postgresql database instance with an empty database named "trendz." This instance can be hosted on services like RDS (AWS) or as your stateful deployment. Ensure you have the following information: - URL (Example: jdbc:postgresql://trendz-db-service:5432/trendz) - Username (Example: postgres) - Password (Example: postgres) -Now we can configure the Trendz database by editing the trendz-db-config.yml file: +Now we can configure the Trendz database by editing the trendz-secret.yml file: ```bash -nano trendz-app-db-config.yml +nano trendz-secret.yml ``` {: .copy-code} @@ -74,25 +81,7 @@ nano trendz-app-db-config.yml ``` -## Step 5. Connect Trendz to ThingsBoard service - -We must set an url for connecting to ThingsBoard Rest API (for example https://my-tb.com). Note that ThingsBoard IP address or domain name should be resolvable from Trendz docker container - -```bash -nano trendz-app-deployment.yml -``` -{: .copy-code} - -And update TB_API_URL and : - -``` -- name: TB_API_URL - value: "https://my-tb.com" -- name: JWT_TOKEN_SIGNING_KEY - value: "myTbSignKey" -``` - -## Step 6. Running +### Step 3. Running ```bash kubectl apply -f trendz-namespace.yml @@ -106,7 +95,7 @@ kubectl apply -f trendz-python-executor-deployment.yml ``` {: .copy-code} -## Step 7. Check the logs +### Step 4. Check the logs Now check the logs and be sure that the instance is started successfully. There should be a next line: @@ -121,15 +110,20 @@ Where: * `trendz-pod-name` - trendz pod name obtained from the list of the running trendz pods. -## Step 8. Set up a load balancer +### Step 5. Set up a load balancer The last thing is to set up a load balancer to route requests to the Trendz instance. Just update your current load balancer config using reference from the `trendz-ingress.yml` file. -**Do not apply this file, it is just an example.** +**Do not apply this file, it is just an example.** Different environments have different requirements for these configurations, so you need to adjust these settings to your environment. -## Post-installation steps -It is essential to follow these [instructions](/docs/trendz/post-installation-steps) to fully use all features, such as saving telemetry to ThingsBoard and adding Trendz views to dashboards. +### Step 6. Sync ThingsBoard With Trendz + +{% include templates/trendz/install/sync-with-tb.md %} + +## Authentication + +{% include templates/trendz/install/authentication.md %} ## Next steps diff --git a/docs/trendz/install/old-docker-migrate.md b/docs/trendz/install/old-docker-migrate.md new file mode 100644 index 0000000000..28dc59b6ed --- /dev/null +++ b/docs/trendz/install/old-docker-migrate.md @@ -0,0 +1,101 @@ +--- +layout: docwithnav-pe +title: Migrate from old Docker deployment files +description: Migrate from old Docker deployment files +--- + +* TOC +{:toc} + +This guide will help you to move from the old deployment files for Docker installation using volume bindings instead of local volumes. +This guide covers standalone Trendz installation. + +## Why deployment files were changed? + +- data was persisted in local folders with specific ownerships instead of Docker volumes mechanism + +## Who needs this guide? + +Customers who have docker compose file as below or similar: + +```yml +version: '3.0' +services: + mytrendz: + restart: always + image: "thingsboard/trendz:1.14.0" + ports: + - "8888:8888" + environment: + TB_API_URL: http://10.0.0.101:8080 + TRENDZ_LICENSE_INSTANCE_DATA_FILE: /data/license.data + SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/trendz + SPRING_DATASOURCE_USERNAME: postgres + SPRING_DATASOURCE_PASSWORD: postgres + SCRIPT_ENGINE_TIMEOUT: 30000 + volumes: + - ~/.mytrendz-data:/data + - ~/.mytrendz-logs:/var/log/trendz + postgres: + restart: always + image: "postgres:15" + ports: + - "5432" + environment: + POSTGRES_DB: trendz + POSTGRES_PASSWORD: postgres + volumes: + - ~/.mytrendz-data/db:/var/lib/postgresql/data +``` +{: .copy-code} + +## Move Postgres data to Docker volume + +Create a named Docker volume: + +```bash +docker volume create --name trendz-postgres-data +``` +{: .copy-code} + +Run container with attached volumes to copy data from folder to newly created volume + +```bash +docker run --rm -v ~/.mytrendz-data/db:/source -v trendz-postgres-data:/destination alpine sh -c "cp -rp /source/* /destination/" +``` +{: .copy-code} + +{% capture old_postgres_info %} +**Note that previously we have PostgreSQL 15 image in our docker compose, which is replaced with PostgreSQL 16 now.** +**In order to start Postgres DB container you need either use `postgres:15` image in new deployment files or upgrade database files** +{% endcapture %} +{% include templates/info-banner.md content=old_postgres_info %} + +## Move Trendz data to Docker volume + +Create a named Docker volume: + +```bash +docker volume create --name trendz-data +``` +{: .copy-code} + +Run container with attached volumes to copy data from folder to newly created volume: + +```bash +docker run --rm -v ~/.mytrendz-data/:/source -v tb-pe-license-data:/destination alpine sh -c "cp -rp /source/* /destination/ && chown 799:799 /destination/license.data" +``` +{: .copy-code} + +## Move to new deployment files + +Open `docker-compose.yml` file with text editor: + +```bash +nano docker-compose.yml +``` +{: .copy-code} + +Copy current Docker Compose [manifest](/docs/trendz/install/docker/#step-2-docker-compose-setup) and replace the old one with current manifest. Replace Postgres docker image if needed. + +After data is moved to the docker volumes and `docker-compose.yml` file have the same structure as the installation example - you can proceed with [upgrade](/docs/trendz/install/docker/#upgrade-trendz-service) of the Trendz. diff --git a/docs/trendz/install/python-executor-configuration-linux.md b/docs/trendz/install/python-executor-configuration-linux.md deleted file mode 100644 index 2c7d38e98b..0000000000 --- a/docs/trendz/install/python-executor-configuration-linux.md +++ /dev/null @@ -1,209 +0,0 @@ ---- -layout: docwithnav-trendz -title: Trendz Python Executor Configuration -description: How to configure Trendz Python Executor on Linux or Mac OS - ---- - -* TOC -{:toc} - -## Overview - -Trendz Python Executor is required to run: - -* Python Calculation fields -* All prediction models (except Fourier Transformation) -* Code generation for Metric Explorer - -Starting from version 1.14.0, the only way to run these features is via Trendz Python Executor using Docker (or Kubernetes). - -## Python Executor Standalone Installation - -### Step 1: Create Docker Compose File - -Create the Docker Compose file with the following configuration: - -```yml -version: '3.0' -services: - mypyexecutor: - restart: always - image: "thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}" - ports: - - "8181:8181" - environment: - SCRIPT_ENGINE_RUNTIME_TIMEOUT: 30000 - EXECUTOR_MANAGER: 1 - EXECUTOR_SCRIPT_ENGINE: 6 - THROTTLING_QUEUE_CAPACITY: 10 - THROTTLING_THREAD_POOL_SIZE: 6 - NETWORK_BUFFER_SIZE: 10485760 - volumes: - - ~/.mytrendz-data/python-executor:/python-executor -``` -{: .copy-code} - -Explanation of key fields: - -* `8181` - Python executor port for communication with Trendz service -* `restart: always` - automatically restarts the executor on failure or system reboot -* `thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}` - Docker image for Trendz Python Executor -* `SCRIPT_ENGINE_RUNTIME_TIMEOUT` - timeout for Python script execution -* `~/.mytrendz-data/python-executor:/python-executor` - mounts the volume `~/.mytrendz-data/python-executor` to Trendz Python Executor additional data directory - -### Step 2: Create Volumes - -Run the following commands before starting the Docker container. These commands also change the owner of the newly -created folders to the Docker container user. The `chown` command requires *sudo* permissions and will prompt for your password: - -```bash -mkdir -p ~/.mytrendz-data && sudo chown -R 799:799 ~/.mytrendz-data -mkdir -p ~/.mytrendz-data/python-executor && sudo chown -R 799:799 ~/.mytrendz-data/python-executor -``` -{: .copy-code} - -**Note:** Replace the directory `~/.mytrendz-data` with the directories you plan to use in `docker-compose.yaml`. - -### Step 3: Start Python Executor - -```bash -docker compose up -d -docker compose logs -f mypyexecutor -``` -{: .copy-code} - -### Step 4: Connect Trendz to Python Executor - -Configure Trendz to communicate with the Python Executor. - -Edit `/usr/share/trendz/conf/trendz.conf` and add: - -```bash -export SCRIPT_ENGINE_TIMEOUT=30000 -export SCRIPT_ENGINE_PROVIDER=DOCKER_CONTAINER -export SCRIPT_ENGINE_DOCKER_PROVIDER_URL=PYTHON_EXECUTOR_HOST:PYTHON_EXECUTOR_PORT -``` -{: .copy-code} - -Replace `PYTHON_EXECUTOR_HOST` and `PYTHON_EXECUTOR_PORT` with actual host and port values. - -## How to Migrate Trendz Python Executor 1.13.2 to Trendz Python Executor 1.14.0 - -If you already have a Python Executor with a version earlier than 1.14.0 connected to Trendz, you should migrate it before updating Trendz to 1.14.0. - -### Modify Docker Compose File - -Locate the `docker-compose.yaml` file from which the Python Executor was launched. - -Change the Python Executor image tag to version 1.14.0: - -```yml - image: "thingsboard/trendz-python-executor:1.14.0" -``` -{: .copy-code} - -Add the following lines at the end of the Python Executor configuration: - -```yml - volumes: - - ~/.mytrendz-data/python-executor:/python-executor -``` -{: .copy-code} - -The final `docker-compose.yaml` should look like: - -```yml -version: '3.0' -services: - mypyexecutor: - restart: always - image: "thingsboard/trendz-python-executor:1.14.0" - ports: - - "8181:8181" - environment: - SCRIPT_ENGINE_RUNTIME_TIMEOUT: 30000 - EXECUTOR_MANAGER: 1 - EXECUTOR_SCRIPT_ENGINE: 6 - THROTTLING_QUEUE_CAPACITY: 10 - THROTTLING_THREAD_POOL_SIZE: 6 - NETWORK_BUFFER_SIZE: 10485760 - volumes: - - ~/.mytrendz-data/python-executor:/python-executor -``` -{: .copy-code} - -### Create Volumes for Python Executor - -Run the following commands before starting the Docker container. These commands also change the owner of the newly -created folders to the Docker container user. The `chown` command requires *sudo* permissions and will prompt for your password: - -```bash -mkdir -p ~/.mytrendz-data && sudo chown -R 799:799 ~/.mytrendz-data -mkdir -p ~/.mytrendz-data/python-executor && sudo chown -R 799:799 ~/.mytrendz-data/python-executor -``` -{: .copy-code} - -**Note:** Replace the directory `~/.mytrendz-data` with the directories you plan to use in `docker-compose.yaml`. - -### Restart Python Executor - -Restart the Python Executor to apply the changes: - -```bash -docker compose restart -d -docker compose logs -f mypyexecutor -``` -{: .copy-code} - -## How to Connect Additional Libraries to the Python Executor - -If necessary, you can add additional Python libraries to the **Python Executor** and use them in your Trendz Calculation Fields or Trendz Custom Prediction Models. - -For example, if you want to add the **`emoji`** library (specific version 2.2.0), follow these steps. - -### Step 1. Locate the Volume - -The volume is usually at: - -```bash -cd ~/.mytrendz-data/python-executor -``` - -### Step 2. Add a `requirements.txt` File - -Create the file with the library: - -```bash -echo 'emoji==2.2.0' > requirements.txt -``` - -### Step 3. Restart the Docker Container - -Find the container name and restart it: - -```bash -docker compose ps -docker compose restart mypyexecutor -``` - -### Step 4. Verify Installation - -Check the logs: - -```bash -docker compose logs mypyexecutor -``` - -You should see: - -```text -Installing custom Python requirements... -Requirement already satisfied: emoji==2.2.0 in /usr/local/lib/python3.9/site-packages -``` - -After the container restarts, you can import and use the custom libraries in your Trendz Calculation Fields or Trendz Custom Prediction Models. - -## Next steps - -{% assign currentGuide = "InstallationOptions" %}{% include templates/trndz-guides-banner.md %} diff --git a/docs/trendz/install/python-executor-configuration-windows.md b/docs/trendz/install/python-executor-configuration.md similarity index 53% rename from docs/trendz/install/python-executor-configuration-windows.md rename to docs/trendz/install/python-executor-configuration.md index 8d6f29f2d9..5f9163bf57 100644 --- a/docs/trendz/install/python-executor-configuration-windows.md +++ b/docs/trendz/install/python-executor-configuration.md @@ -1,7 +1,7 @@ --- layout: docwithnav-trendz title: Trendz Python Executor Configuration -description: How to configure Trendz Python Executor on Windows +description: How to configure Trendz Python Executor on Linux or Mac OS --- @@ -18,6 +18,16 @@ Trendz Python Executor is required to run: Starting from version 1.14.0, the only way to run these features is via Trendz Python Executor using Docker (or Kubernetes). +## Prerequisites + +### Windows + +{% include templates/trendz/install/docker-requirements-windows.md %} + +### Linux + +{% include templates/trendz/install/docker-requirements-linux.md %} + ## Python Executor Standalone Installation ### Step 1: Create Docker Compose File @@ -25,23 +35,21 @@ Starting from version 1.14.0, the only way to run these features is via Trendz P Create the Docker Compose file with the following configuration: ```yml -version: '3.0' services: - mypyexecutor: + trendz-python-executor: restart: always image: "thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}" ports: - "8181:8181" environment: - SCRIPT_ENGINE_RUNTIME_TIMEOUT: 30000 EXECUTOR_MANAGER: 1 EXECUTOR_SCRIPT_ENGINE: 6 THROTTLING_QUEUE_CAPACITY: 10 THROTTLING_THREAD_POOL_SIZE: 6 - NETWORK_BUFFER_SIZE: 10485760 + NETWORK_BUFFER_SIZE: 5242880 volumes: - - mytrendz-data/python-executor:/python-executor - + - trendz-python-executor-conf:/python-executor-config-files + - trendz-python-executor-data:/data ``` {: .copy-code} @@ -50,40 +58,42 @@ Explanation of key fields: * `8181` - Python executor port for communication with Trendz service * `restart: always` - automatically restarts the executor on failure or system reboot * `thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}` - Docker image for Trendz Python Executor -* `SCRIPT_ENGINE_RUNTIME_TIMEOUT` - timeout for Python script execution -* `mytrendz-data/python-executor:/python-executor` - mounts the volume `mytrendz-data/python-executor` to Trendz Python Executor additional data directory - +* `trendz-python-executor-conf:/python-executor-config-files` - mounts the volume ``trendz-python-executor-conf` to Trendz Python Executor directory with configuration files +* `trendz-python-executor-data:/data` - mounts the volume `trendz-python-executor-data` to Trendz Python Executor additional data directory -### Step 2: Create Volumes - -Windows users should use Docker-managed volumes for Trendz data. -Create a Docker volume before executing the Docker run command. -Open “Docker Quickstart Terminal” and run: +### Step 2: Start Python Executor ```bash -docker volume create mytrendz-data-python-executor +docker compose up -d +docker compose logs -f trendz-python-executor ``` {: .copy-code} -**Note:** Replace the volume name `mytrendz-data-python-executor` with the name you plan to use in `docker-compose.yaml`. +### Step 3: Connect Trendz to Python Executor + +* **Linux or Mac OS** -### Step 3: Start Python Executor +Configure Trendz to communicate with the Python Executor. + +Edit `/usr/share/trendz/conf/trendz.conf` and add: ```bash -docker compose up -d -docker compose logs -f mypyexecutor +export SCRIPT_ENGINE_TIMEOUT=30000 +export SCRIPT_ENGINE_PROVIDER=DOCKER_CONTAINER +export SCRIPT_ENGINE_DOCKER_PROVIDER_URL=PYTHON_EXECUTOR_HOST:PYTHON_EXECUTOR_PORT ``` {: .copy-code} -### Step 4: Connect Trendz to Python Executor +Replace `PYTHON_EXECUTOR_HOST` and `PYTHON_EXECUTOR_PORT` with your Python Executor service values and ensure Trendz can reach this network destination. -Configure Trendz to communicate with the Python Executor. +* **Windows** Open Notepad as Administrator and edit: ```text C:\Program Files (x86)\trendz\conf\trendz.yml ``` +{: .copy-code} Locate the `script-engine` block and configure: @@ -103,79 +113,40 @@ Replace `PYTHON_EXECUTOR_HOST` and `PYTHON_EXECUTOR_PORT` with your Python Execu If you already have a Python Executor with a version earlier than 1.14.0 connected to Trendz, you should migrate it before updating Trendz to 1.14.0. -### Modify Docker Compose File - -Locate the `docker-compose.yaml` file from which the Python Executor was launched. +### Step 1. Modify Docker Compose File -Change the Python Executor image tag to version 1.14.0: +Locate the `docker-compose.yml` file from which the Python Executor was launched. -```yml - image: "thingsboard/trendz-python-executor:1.14.0" -``` -{: .copy-code} +Change the Python Executor image tag to version 1.14.0 and update the `volumes` section to include configuration and data directories. -Add the following lines at the end of the Python Executor configuration: +The final `docker-compose.yml` should look like this: ```yml - volumes: - - mytrendz-data/python-executor:/python-executor -``` -{: .copy-code} - -Add the following lines at the end of the Docker Compose file: - -```yml -volumes: - mytrendz-data-python-executor: - external: true -``` -{: .copy-code} - -The final `docker-compose.yaml` should look like: - -```yml -version: '3.0' services: - mypyexecutor: + trendz-python-executor: restart: always - image: "thingsboard/trendz-python-executor:1.14.0" + image: "thingsboard/trendz-python-executor:{{ site.release.trendz_ver }}" ports: - "8181:8181" environment: - SCRIPT_ENGINE_RUNTIME_TIMEOUT: 30000 EXECUTOR_MANAGER: 1 EXECUTOR_SCRIPT_ENGINE: 6 THROTTLING_QUEUE_CAPACITY: 10 THROTTLING_THREAD_POOL_SIZE: 6 - NETWORK_BUFFER_SIZE: 10485760 + NETWORK_BUFFER_SIZE: 5242880 volumes: - - mytrendz-data/python-executor:/python-executor -volumes: - mytrendz-data-python-executor: - external: true + - trendz-python-executor-conf:/python-executor-config-files + - trendz-python-executor-data:/data ``` {: .copy-code} -### Create Volumes for Python Executor - -Windows users should use Docker-managed volumes for Trendz data. -Create a Docker volume before executing the Docker run command. -Open “Docker Quickstart Terminal” and run: - -```bash -docker volume create mytrendz-data-python-executor -``` -{: .copy-code} - -**Note:** Replace the volume name `mytrendz-data-python-executor` with the name you plan to use in `docker-compose.yaml`. - -### Restart Python Executor +### Step 2. Restart Python Executor Restart the Python Executor to apply the changes: ```bash -docker compose restart -d -docker compose logs -f mypyexecutor +docker compose up -d +docker compose logs -f trendz-python-executor ``` {: .copy-code} @@ -185,47 +156,49 @@ If necessary, you can add additional Python libraries to the **Python Executor** For example, if you want to add the **`emoji`** library (specific version 2.2.0), follow these steps. -### Step 1. Locate the Volume +### Step 1. Open a shell in the running container -The Python Executor data is mapped to a local folder via Docker volumes. By default: - -```powershell -cd %USERPROFILE%\mytrendz-data\python-executor +```bash +docker compose exec trendz-python-executor bash ``` -{: .copy-code} -### Step 2. Add a `requirements.txt` File +### Step 2. Add library to `requirements.txt` -Create a file named `requirements.txt` in this folder with the library you need. For example: +You need to append the library name and version to the `requirements.txt` file located in your configuration directory (`/python-executor-config-files`): -```powershell -echo emoji==2.2.0 > requirements.txt +```bash +echo 'emoji==2.2.0' >> /python-executor-config-files/requirements.txt ``` +{: .copy-code} -### Step 3. Restart the Docker Container +After append all necessary dependencies type `exit` to exit from a shell. -After updating `requirements.txt`, restart the Python Executor container: +### Step 3. Restart the Docker Container -```powershell -docker compose ps -docker compose restart mypyexecutor +Find the container name and restart it: +```bash +docker compose restart trendz-python-executor ``` +{: .copy-code} ### Step 4. Verify Installation -Check the logs to ensure the library installed successfully: +Check the logs to ensure the library was installed successfully: -```powershell -docker compose logs mypyexecutor +```bash +docker compose logs trendz-python-executor ``` +{: .copy-code} -You should see something like: +You should see: ```text Installing custom Python requirements... Requirement already satisfied: emoji==2.2.0 in /usr/local/lib/python3.9/site-packages ``` +After the container restarts, you can import and use the custom libraries in your Trendz Calculation Fields or Trendz Custom Prediction Models. + ## Next steps {% assign currentGuide = "InstallationOptions" %}{% include templates/trndz-guides-banner.md %} diff --git a/docs/trendz/install/resources/1.15.0/trendz-centos-download.sh b/docs/trendz/install/resources/1.15.0/trendz-centos-download.sh new file mode 100644 index 0000000000..6a34c1aa7a --- /dev/null +++ b/docs/trendz/install/resources/1.15.0/trendz-centos-download.sh @@ -0,0 +1 @@ +wget https://dist.thingsboard.io/trendz-1.15.0.rpm \ No newline at end of file diff --git a/docs/trendz/install/resources/1.15.0/trendz-centos-installation.sh b/docs/trendz/install/resources/1.15.0/trendz-centos-installation.sh new file mode 100644 index 0000000000..5528acc59a --- /dev/null +++ b/docs/trendz/install/resources/1.15.0/trendz-centos-installation.sh @@ -0,0 +1 @@ +sudo rpm -Uvh trendz-1.15.0.rpm \ No newline at end of file diff --git a/docs/trendz/install/resources/1.15.0/trendz-ubuntu-download.sh b/docs/trendz/install/resources/1.15.0/trendz-ubuntu-download.sh new file mode 100644 index 0000000000..1694b7e326 --- /dev/null +++ b/docs/trendz/install/resources/1.15.0/trendz-ubuntu-download.sh @@ -0,0 +1 @@ +wget https://dist.thingsboard.io/trendz-1.15.0.deb \ No newline at end of file diff --git a/docs/trendz/install/resources/1.15.0/trendz-ubuntu-installation.sh b/docs/trendz/install/resources/1.15.0/trendz-ubuntu-installation.sh new file mode 100644 index 0000000000..b5f0bd2ae0 --- /dev/null +++ b/docs/trendz/install/resources/1.15.0/trendz-ubuntu-installation.sh @@ -0,0 +1 @@ +sudo dpkg -i trendz-1.15.0.deb \ No newline at end of file diff --git a/docs/trendz/install/rhel.md b/docs/trendz/install/rhel.md index ee65d2c38f..57359b22aa 100644 --- a/docs/trendz/install/rhel.md +++ b/docs/trendz/install/rhel.md @@ -5,6 +5,33 @@ assignees: title: Installing ThingsBoard Trendz Analytics on CentOS/RHEL description: Installing ThingsBoard Trendz Analytics on CentOS/RHEL +trendz-settings: + 0: + image: /images/trendz/install/sync/trendz-settings-1.png + title: "Log in to ThingsBoard as a Sysadmin." + 1: + image: /images/trendz/install/sync/trendz-settings-2.png + title: "Open the Trendz Settings page." + 2: + image: /images/trendz/install/sync/trendz-settings-3.png + title: "If you see the message \"Synchronization completed successfully\", the synchronization has been completed automatically and no further action is required." +trendz-sync: + 0: + image: /images/trendz/install/sync/trendz-sync-1.png + title: "If you see an error message, follow these steps." + 1: + image: /images/trendz/install/sync/trendz-sync-2.png + title: "Enter the correct Trendz internal URL and ThingsBoard internal URL." + 2: + image: /images/trendz/install/sync/trendz-sync-3.png + title: "Click Save configuration." + 3: + image: /images/trendz/install/sync/trendz-sync-4.png + title: "Click Retry discovery." + 4: + image: /images/trendz/install/sync/trendz-sync-5.png + title: "Once the message \"Synchronization completed successfully\" appears, the synchronization is complete." + --- * TOC @@ -16,19 +43,21 @@ This guide explains how to install **Trendz Analytics** on **RHEL/CentOS 8 or 9* Certain Trendz Analytics features like **predictions, metric explorations, and Python calculation fields** require a Python executor. -The python executor runs **only via Docker**. Even on RHEL/CentOS, Docker is essential to fully utilize all Trendz features. +The python executor runs **only via Docker**. Even on RHEL/CentOS, Docker is essential to fully utilize all Trendz features. We recommend following the [Docker (Linux or Mac OS) installation guide](/docs/trendz/install/docker) and using the Docker installation instead of RHEL/CentOS. Proceed here **only** if you have a compelling reason to use a combined RHEL/CentOS + Docker setup. ## Prerequisites -**Hardware requirements** depend on amount of analyzed data and amount of devices connected to the system. -To run Trendz Analytics on a single machine you will need at least 1Gb of free RAM. +### Hardware Requirements + +{% include templates/trendz/install/hardware-requirements.md %} -In small and medium installations Trendz can be installed **on the same** server with ThingsBoard. +### Software Requirements -Before continue to installation execute the following commands in order to install necessary tools: +{% include templates/trendz/install/docker-requirements-linux.md %} +{% include templates/trendz/install/thingsboard-requirements.md %} **For CentOS 7:** @@ -52,11 +81,13 @@ sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8. ``` {: .copy-code} -## Step 1. Install Java 17 (OpenJDK) +## Installation Steps + +### Step 1. Install Java 17 (OpenJDK) {% include templates/install/rhel-java-install.md %} -## Step 2. Trendz Analytics service installation +### Step 2. Trendz Analytics service installation Download installation package. @@ -72,56 +103,18 @@ sudo rpm -Uvh trendz-{{ site.release.trendz_ver }}.rpm ``` {: .copy-code} -## Step 3. Obtain and configure license key - -We assume you have already chosen subscription plan for Trendz and have license key. If not, please get your [Free Trial license](/pricing/?section=trendz-options&product=trendz-self-managed&solution=trendz-pay-as-you-go) before you proceed. -See [How-to get pay-as-you-go subscription](https://www.youtube.com/watch?v=dK-QDFGxWek){:target="_blank"} for more details. - -Once you get the license secret, you should put it to the trendz configuration file. -Open the file for editing using the following command: - -```bash -sudo nano /etc/trendz/conf/trendz.conf -``` -{: .copy-code} - -Add the following lines to the configuration file and put your license secret: +### Step 3. Configure Trendz database -```bash -# License secret obtained from ThingsBoard License Portal (https://license.thingsboard.io) -export TRENDZ_LICENSE_SECRET=YOUR_LICENSE_SECRET_HERE -``` - -## Step 4. Configure connection with ThingsBoard Platform - -You can connect Trendz Analytics to the ThingsBoard Community Edition or ThingsBoard Professional Edition. - -Edit ThingsBoard configuration file -```bash -sudo nano /etc/trendz/conf/trendz.conf -``` -{: .copy-code} - -Add ThingsBoard REST API URL that would be used for communicating with ThingsBoard Platform. In most cases, when Trendz installed -in the same server with ThingsBoard, API_URL would be **http://localhost:8080**. Otherwise you should use ThingsBoard domain name. - -```bash -# ThingsBoard URL that will be used by Trendz -export TB_API_URL=http://localhost:8080 -``` -{: .copy-code} - -## Step 5. Configure Trendz database Trendz uses PostgreSQL as a database. You can install PostgreSQL on the same serverfor Trendz or use managed PostgreSQL service from your cloud vendor. -### PostgreSQL Installation +* **PostgreSQL Installation** {% include templates/install/postgres-install-rhel.md %} After configuring the password, edit the **pg_hba.conf** to use MD5 authentication with the postgres user. -Edit the **pg_hba.conf** file: +Edit the **pg_hba.conf** file: ```bash sudo nano /var/lib/pgsql/16/data/pg_hba.conf @@ -148,7 +141,7 @@ sudo systemctl restart postgresql-16.service ``` {: .copy-code} -### Create Database for Trendz +* **Create Database for Trendz** Connect to the database to create trendz DB: @@ -167,26 +160,26 @@ CREATE DATABASE trendz; Then, press “Ctrl+D” to return to main user console. -### Configure database connection for Trendz +* **Configure database connection for Trendz** -Edit Trendz configuration file +Edit Trendz configuration file -```bash +```bash sudo nano /etc/trendz/conf/trendz.conf -``` +``` {: .copy-code} Add the following lines to the configuration file. Don't forget **to replace** "PUT_YOUR_POSTGRESQL_PASSWORD_HERE" with your **real postgres user password**: ```bash -# DB Configuration +# DB Configuration export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/trendz export SPRING_DATASOURCE_USERNAME=postgres export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE ``` {: .copy-code} -## Step 6. Run installation script +### Step 4. Run installation script Once Trendz service is installed and DB configuration is updated, you can execute the following script: @@ -194,7 +187,7 @@ Once Trendz service is installed and DB configuration is updated, you can execut sudo /usr/share/trendz/bin/install/install.sh ``` -## Step 7. Start Trendz service +### Step 5. Start Trendz service Execute the following command to start Trendz Analytics: @@ -202,124 +195,40 @@ Execute the following command to start Trendz Analytics: sudo service trendz start ``` {: .copy-code} - -Once started, you will be able to open Web UI using the following link: - -```bash -http://localhost:8888/trendz -``` - -**Note**: If Trendz installed on a remote server, you have to replace localhost with the public IP address of -the server or with a domain name. Also, check that port 8888 opened for public access. -### Authentication +### Step 6. Sync ThingsBoard With Trendz -For first authentication you need to use **Tenant Administrator** credentials from your **ThingsBoard** +{% include templates/trendz/install/sync-with-tb.md %} -Trendz uses ThingsBoard as an authentication service. During first sign in ThingsBoard service should be also available -to validate credentials. - -## Step 8. Install Trendz Python Executor +### Step 7. Install Trendz Python Executor To utilize all Trendz capabilities, such as Trendz Python Calculation Fields or Prediction Models, it is essential to install an additional service: the Trendz Python Executor, which can securely run Python code. -You can learn more about how to install it [here](/docs/trendz/install/python-executor-configuration-linux). - -## Step 9. HTTPS configuration - -You may want to configure HTTPS access using HAProxy. -This is possible in case you are hosting Trendz in the cloud and have a valid DNS name assigned to your instance. +You can learn more about how to install it [here](/docs/trendz/install/python-executor-configuration). -**Trendz and ThingsBoard hosted on same server** +## Authentication -Use this section if HAProxy/Let’s Encrypt already installed in the server and HTTPS enabled for ThingsBoard. - -Open HAProxy configuration file -```bash -sudo nano /etc/haproxy/haproxy.cfg -``` -{: .copy-code} - -Locate **frontend https_in** section, add new access list that will match traffic by domain name and redirect this traffic to Trendz backend: -```bash -acl trendz_http hdr(host) -i new-trendz-domain.com -use_backend tb-trendz if trendz_http -``` - -In the same file register Trendz backend: -```bash -backend tb-trendz - balance leastconn - option tcp-check - option log-health-checks - server tbTrendz1 127.0.0.1:8888 check inter 5s - http-request set-header X-Forwarded-Port %[dst_port] -``` - -Generate SSL certificates for new domain: -```bash -sudo certbot-certonly --domain new-trendz-domain.com --email some@email.io -``` - -Refresh HAProxy configuration: -```bash -sudo haproxy-refresh -``` - -That's it, HTTPS for Trendz UI configured and now you can access it via: -https://new-trendz-domain.com - - -**Fresh installation on new server** - -Please follow this [guide](/docs/user-guide/install/pe/add-haproxy-ubuntu) to install HAProxy and generate valid SSL certificate using Let's Encrypt. - -## Step 10. Host ThingsBoard and Trendz on the same domain -ThingsBoard and Trendz can share same domain name. In this case ThingsBoard web page would be loaded using following link: - -```bash -https://{my-domain}/ -``` - -and Trendz web page would be loaded using following link - -```bash -https://{my-domain}/trendz -``` - -For enabling such configuration we have to update HAProxy config to route specific requests to Trendz service. -Open HAProxy configuration file -```bash -sudo nano /etc/haproxy/haproxy.cfg -``` -{: .copy-code} - -Locate **frontend https_in** section, add new access list that will match traffic by URL path and redirect this traffic to Trendz backend: - -```bash -... -acl trendz_acl path_beg /trendz path_beg /apiTrendz -.... -use_backend tb-trendz if trendz_acl -``` - -## Post-installation steps -It is essential to follow these [instructions](/docs/trendz/post-installation-steps) to fully use all features, such as saving telemetry to ThingsBoard and adding Trendz views to dashboards. +{% include templates/trendz/install/authentication.md %} ## Troubleshooting Trendz logs are stored in the following directory: - + ```bash /var/log/trendz ``` You can issue the following command in order to check if there are any errors on the backend side: - + ```bash cat /var/log/trendz/trendz.log | grep ERROR ``` + +## HTTPS configuration + +{% include templates/trendz/install/https-configuration.md %} + ## Next steps {% assign currentGuide = "InstallationOptions" %}{% include templates/trndz-guides-banner.md %} diff --git a/docs/trendz/install/trndz-upgrade-instructions-kubernetes.md b/docs/trendz/install/trndz-upgrade-instructions-kubernetes.md index cdaf4aadda..60799bfb93 100644 --- a/docs/trendz/install/trndz-upgrade-instructions-kubernetes.md +++ b/docs/trendz/install/trndz-upgrade-instructions-kubernetes.md @@ -8,11 +8,11 @@ description: ThingsBoard Trendz Analytics upgrade instructions kubernetes * TOC {:toc} -## Upgrading to 1.14.0 +## Upgrading to 1.15.0 -These steps are applicable for 1.13.2 Trendz Analytics version. +These steps are applicable for 1.14.0 Trendz Analytics version. -### Obtain Trendz Kubernetes scripts +### Step 1. Obtain Trendz Kubernetes scripts Use the Kubernetes configuration files used for installation. If you did not save the files you need to download them again by the next link and fill in by necessary data as in the installation guide: @@ -21,7 +21,7 @@ If you did not save the files you need to download them again by the next link a git clone https://github.com/thingsboard/trendz-k8s.git --depth 1 ``` -### Connect to your Kubernetes cluster +### Step 2. Connect to your Kubernetes cluster You need to connect to the dedicated kube-config configuration Use the next commands: @@ -31,7 +31,7 @@ kubectl config get-contexts kubectl config use-context ``` -### Reduce pods count +### Step 3. Reduce pods count The deployment must have only one pod for the next steps of a successful upgrade. Use this command to set the pod count: @@ -40,20 +40,20 @@ Use this command to set the pod count: kubectl scale deployment trendz-app-deployment --replicas=1 ``` -### Create flag-file +### Step 4. Create flag-file Create a file “.upgradeversion” inside the directory by calling the command that must be executed by Trendz pod. Run the command: ```text -kubectl exec -- sh -c "echo '1.13.2' > /data/.upgradeversion" +kubectl exec -- sh -c "echo '1.14.0' > /data/.upgradeversion" ``` You can get the pod name by the command: ```text kubectl get pods -l app=trendz-app-pod-label ``` -Use another version instead of '1.13.2 if another is needed +Use another version instead of '1.14.0 if another is needed -### Change image version +### Step 5. Change image version Open the **trendz-app-deployment.yml** file with the command ```text @@ -63,7 +63,7 @@ and change the image version: ![image](/images/trendz/image-version-kuber.png) -### Apply the deployment file +### Step 6. Apply the deployment file Use the command to apply the new configuration of the deployment and wait until the pods are ready: @@ -71,7 +71,7 @@ Use the command to apply the new configuration of the deployment and wait until kubectl apply -f trendz-app-deployment.yml ``` -### Check the logs +### Step 7. Check the logs Now check the logs and be sure that the instance is started successfully and the upgrade was performed. The logs can be opened by the command: @@ -89,7 +89,7 @@ Current version is …, upgrade is not needed Started TrendzApplication in … ``` -### Increase pods count +### Step 8. Increase pods count Now you can return your preferred pod count to the deployment. Use this command to set the pod count: @@ -98,4 +98,6 @@ Use this command to set the pod count: kubectl scale deployment trendz-app-deployment --replicas= ``` +### Step 9. Check synchronization status in ThingsBoard +After upgrade, it's necessary to check sync status for Trendz with ThingsBoard. You can find out how to do it [here](/docs/trendz/install/kubernetes#step-6-sync-thingsboard-with-trendz). diff --git a/docs/trendz/install/trndz-upgrade-instructions.md b/docs/trendz/install/trndz-upgrade-instructions.md index f174feb2ba..03f9f772a5 100644 --- a/docs/trendz/install/trndz-upgrade-instructions.md +++ b/docs/trendz/install/trndz-upgrade-instructions.md @@ -7,6 +7,17 @@ description: ThingsBoard Trendz Analytics upgrade instructions
    +
  • + Upgrading to 1.15.0 + +
  • Upgrading to 1.14.0
      @@ -260,6 +271,93 @@ description: ThingsBoard Trendz Analytics upgrade instructions
    +## Upgrading to 1.15.0 + +These steps are applicable for 1.14.0 Trendz Analytics version. + +### Ubuntu/CentOS {#ubuntucentos-1150} + +#### Trendz Analytics package download + +{% capture tabspec %}trendz-download-1-15-0 +trendz-download-1-8-0-ubuntu,Ubuntu,shell,resources/1.15.0/trendz-ubuntu-download.sh,/docs/user-guide/install/resources/1.15.0/trendz-ubuntu-download.sh +trendz-download-1-8-0-centos,CentOS,shell,resources/1.15.0/trendz-centos-download.sh,/docs/user-guide/install/resources/1.15.0/trendz-centos-download.sh{% endcapture %} +{% include tabs.html %} + +#### Trendz Analytics service upgrade + +* Stop Trendz Analytics service if it is running. + +```bash +sudo service trendz stop +``` +{: .copy-code} + +* Install latest Trendz Analytics service + +{% capture tabspec %}trendz-installation-1-15-0 +trendz-installation-1-8-0-ubuntu,Ubuntu,shell,resources/1.15.0/trendz-ubuntu-installation.sh,/docs/user-guide/install/resources/1.15.0/trendz-ubuntu-installation.sh +trendz-installation-1-8-0-centos,CentOS,shell,resources/1.15.0/trendz-centos-installation.sh,/docs/user-guide/install/resources/1.15.0/trendz-centos-installation.sh{% endcapture %} +{% include tabs.html %} + +**NOTE:** Package installer will ask you to merge your trendz 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/trendz/bin/install/upgrade.sh +``` + +#### Start the service + +```bash +sudo service trendz start +``` +{: .copy-code} + +#### Sync Trendz with ThingsBoard + +After upgrade, it's necessary to sync Trendz with ThingsBoard. You can find out how to do it [here](/docs/trendz/install/ubuntu#step-6-sync-thingsboard-with-trendz). + +### Windows {#windows-1150} + +#### Trendz Analytics package download + +Download ThingsBoard Trendz Analytics installation package for Windows: [trendz-windows-1.15.0.zip](https://dist.thingsboard.io/trendz-windows-1.15.0.zip). + +#### Trendz Analytics service upgrade + +* Stop Trendz service if it is running. + +```text +net stop trendz +``` +{: .copy-code} + +* Make a backup of previous Trendz Analytics configuration located in \\conf (for ex. C:\trendz\conf). +* Remove ThingsBoard install dir. +* Unzip installation archive to ThingsBoard install dir. +* Compare your old Trendz configuration files (from the backup you made in the first step) with new ones. + +* Finally, run **upgrade.bat** script to upgrade Trendz to the new version. + +**NOTE** Scripts listed above should be executed using Administrator Role. + +```text +C:\trendz>upgrade.bat --fromVersion=1.14.0 +``` + +#### Start the service + +```text +net start trendz +``` +{: .copy-code} + +#### Sync Trendz with ThingsBoard + +After upgrade, it's necessary to sync Trendz with ThingsBoard. You can find out how to do it [here](/docs/trendz/install/windows#step-6-sync-thingsboard-with-trendz). + ## Upgrading to 1.14.0 These steps are applicable for 1.13.2 Trendz Analytics version. @@ -275,10 +373,10 @@ From version 1.14.0, python calculation fields and prediction models could be ut service which can be used only inside the docker. If you are already using Trendz Python Executor via Docker, it's necessary to update it to version 1.14.0 before Trendz update. -You can find detailed instructions on how to do that [here](/docs/trendz/install/python-executor-configuration-linux/#how-to-migrate-trendz-python-executor-1133-to-trendz-python-executor-1140). +You can find detailed instructions on how to do that [here](/docs/trendz/install/python-executor-configuration/#how-to-migrate-trendz-python-executor-1132-to-trendz-python-executor-1140). If you were not using Python Executor before, you need to install it via Docker. -You can find detailed instructions on how to do that [here](/docs/trendz/install/python-executor-configuration-linux/#python-executor-standalone-installation). +You can find detailed instructions on how to do that [here](/docs/trendz/install/python-executor-configuration/#python-executor-standalone-installation). {% endcapture %} {% include templates/warn-banner.md content=tb_3_7_0_upgrade_note %} @@ -329,10 +427,10 @@ From version 1.14.0, python calculation fields and prediction models could be ut service which can be used only inside the docker. If you are already using Trendz Python Executor via Docker, it's necessary to update it to version 1.14.0 before Trendz update. -You can find detailed instructions on how to do that [here](/docs/trendz/install/python-executor-configuration-windows/#how-to-migrate-trendz-python-executor-1133-to-trendz-python-executor-1140). +You can find detailed instructions on how to do that [here](/docs/trendz/install/python-executor-configuration/#how-to-migrate-trendz-python-executor-1132-to-trendz-python-executor-1140). If you were not using Python Executor before, you need to install it via Docker. -You can find detailed instructions on how to do that [here](/docs/trendz/install/python-executor-configuration-windows/#python-executor-standalone-installation). +You can find detailed instructions on how to do that [here](/docs/trendz/install/python-executor-configuration/#python-executor-standalone-installation). {% endcapture %} {% include templates/warn-banner.md content=tb_3_7_0_upgrade_note %} diff --git a/docs/trendz/install/ubuntu.md b/docs/trendz/install/ubuntu.md index f079806e40..250ab3fbfd 100644 --- a/docs/trendz/install/ubuntu.md +++ b/docs/trendz/install/ubuntu.md @@ -5,6 +5,33 @@ assignees: title: Installing ThingsBoard Trendz Analytics on Ubuntu description: Installing ThingsBoard Trendz Analytics on Ubuntu +trendz-settings: + 0: + image: /images/trendz/install/sync/trendz-settings-1.png + title: "Log in to ThingsBoard as a Sysadmin." + 1: + image: /images/trendz/install/sync/trendz-settings-2.png + title: "Open the Trendz Settings page." + 2: + image: /images/trendz/install/sync/trendz-settings-3.png + title: "If you see the message \"Synchronization completed successfully\", the synchronization has been completed automatically and no further action is required." +trendz-sync: + 0: + image: /images/trendz/install/sync/trendz-sync-1.png + title: "If you see an error message, follow these steps." + 1: + image: /images/trendz/install/sync/trendz-sync-2.png + title: "Enter the correct Trendz internal URL and ThingsBoard internal URL." + 2: + image: /images/trendz/install/sync/trendz-sync-3.png + title: "Click Save configuration." + 3: + image: /images/trendz/install/sync/trendz-sync-4.png + title: "Click Retry discovery." + 4: + image: /images/trendz/install/sync/trendz-sync-5.png + title: "Once the message \"Synchronization completed successfully\" appears, the synchronization is complete." + --- * TOC @@ -16,23 +43,29 @@ This guide explains how to install **Trendz Analytics** on **Ubuntu 22.04 LTS** Certain Trendz Analytics features like **predictions, metric explorations, and Python calculation fields** require a Python executor. -The python executor runs **only via Docker**. Even on Ubuntu, Docker is essential to fully utilize all Trendz features. -We recommend following the [Docker (Linux or Mac OS) installation guide](/docs/trendz/install/docker) and using the Docker installation instead of Ubuntu. +The python executor runs **only via Docker**. Even on Ubuntu, Docker is essential to fully utilize all Trendz features. +We recommend following the [Docker (Linux or Mac OS) installation guide](/docs/trendz/install/docker) and using the Docker installation instead of Ubuntu. Proceed here **only** if you have a compelling reason to use a combined Ubuntu + Docker setup. ## Prerequisites -**Hardware requirements** depend on amount of analyzed data and amount of devices connected to the system. -To run Trendz Analytics on a single machine you will need at least 1Gb of free RAM. +### Hardware Requirements + +{% include templates/trendz/install/hardware-requirements.md %} + +### Software Requirements -In small and medium installations Trendz can be installed **on the same** server with ThingsBoard. +{% include templates/trendz/install/docker-requirements-linux.md %} +{% include templates/trendz/install/thingsboard-requirements.md %} -## Step 1. Install Java 17 (OpenJDK) +## Installation Steps + +### Step 1. Install Java 17 (OpenJDK) {% include templates/install/ubuntu-java-install.md %} -## Step 2. Trendz Analytics service installation +### Step 2. Trendz Analytics service installation Download installation package. @@ -48,54 +81,16 @@ sudo dpkg -i trendz-{{ site.release.trendz_ver }}.deb ``` {: .copy-code} -## Step 3. Obtain and configure license key - -We assume you have already chosen subscription plan for Trendz and have license key. If not, please get your [Free Trial license](/pricing/?section=trendz-options&product=trendz-self-managed&solution=trendz-pay-as-you-go) before you proceed. -See [How-to get pay-as-you-go subscription](https://www.youtube.com/watch?v=dK-QDFGxWek){:target="_blank"} for more details. - -Once you get the license secret, you should put it to the trendz configuration file. -Open the file for editing using the following command: - -```bash -sudo nano /etc/trendz/conf/trendz.conf -``` -{: .copy-code} - -Add the following lines to the configuration file and put your license secret: - -```bash -# License secret obtained from ThingsBoard License Portal (https://license.thingsboard.io) -export TRENDZ_LICENSE_SECRET=YOUR_LICENSE_SECRET_HERE -``` - -## Step 4. Configure connection with ThingsBoard Platform - -You can connect Trendz Analytics to the ThingsBoard Community Edition or ThingsBoard Professional Edition. - -Edit ThingsBoard configuration file -```bash -sudo nano /etc/trendz/conf/trendz.conf -``` -{: .copy-code} - -Add ThingsBoard REST API URL that would be used for communicating with ThingsBoard Platform. In most cases, when Trendz installed -in the same server with ThingsBoard, API_URL would be **http://localhost:8080**. Otherwise, you should use ThingsBoard domain name. +### Step 3. Configure Trendz database -```bash -# ThingsBoard URL that will be used by Trendz -export TB_API_URL=http://localhost:8080 -``` -{: .copy-code} - -## Step 5. Configure Trendz database Trendz uses PostgreSQL as a database. You can install PostgreSQL on the same server for Trendz or use managed PostgreSQL service from your cloud vendor. -### PostgreSQL Installation +* **PostgreSQL Installation** {% include templates/install/postgres-install-ubuntu.md %} -### Create Database for Trendz +* **Create Database for Trendz** Connect to the database to create trendz DB: @@ -112,26 +107,26 @@ CREATE DATABASE trendz; Press “Ctrl+D” twice to logout. -### Configure database connection for Trendz +* **Configure database connection for Trendz** -Edit Trendz configuration file +Edit Trendz configuration file -```bash +```bash sudo nano /etc/trendz/conf/trendz.conf -``` +``` {: .copy-code} Add the following lines to the configuration file. Don't forget **to replace** "PUT_YOUR_POSTGRESQL_PASSWORD_HERE" with your **real postgres user password**: ```bash -# DB Configuration +# DB Configuration export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/trendz export SPRING_DATASOURCE_USERNAME=postgres export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE ``` {: .copy-code} -## Step 6. Run installation script +### Step 4. Run installation script Once Trendz service is installed and DB configuration is updated, you can execute the following script: @@ -140,7 +135,7 @@ sudo /usr/share/trendz/bin/install/install.sh ``` {: .copy-code} -## Step 7. Start Trendz service +### Step 5. Start Trendz service Execute the following command to start Trendz Analytics: @@ -148,125 +143,40 @@ Execute the following command to start Trendz Analytics: sudo service trendz start ``` {: .copy-code} - -Once started, you will be able to open Web UI using the following link: - -```bash -http://localhost:8888/trendz -``` -**Note**: If Trendz is installed on a remote server, you have to replace localhost with the public IP address of -the server or with a domain name. Also, check that port 8888 opened for public access. +### Step 6. Sync ThingsBoard With Trendz -### Authentication +{% include templates/trendz/install/sync-with-tb.md %} -For first authentication you need to use **Tenant Administrator** credentials from your **ThingsBoard** - -Trendz uses ThingsBoard as an authentication service. During first sign in ThingsBoard service should be also available -to validate credentials. - -## Step 8. Install Trendz Python Executor +### Step 7. Install Trendz Python Executor To utilize all Trendz capabilities, such as Trendz Python Calculation Fields or Prediction Models, it is essential to install an additional service: the Trendz Python Executor, which can securely run Python code. -You can learn more about how to install it [here](/docs/trendz/install/python-executor-configuration-linux). - -## Step 9. HTTPS configuration +You can learn more about how to install it [here](/docs/trendz/install/python-executor-configuration). -You may want to configure HTTPS access using HAProxy. -This is possible in case you are hosting Trendz in the cloud and have a valid DNS name assigned to your instance. +## Authentication -**Trendz and ThingsBoard hosted on same server** - -Use this section if HAProxy/Let’s Encrypt already installed in the server and HTTPS enabled for ThingsBoard. - -Open HAProxy configuration file -```bash -sudo nano /etc/haproxy/haproxy.cfg -``` -{: .copy-code} - -Locate **frontend https_in** section, add new access list that will match traffic by domain name and redirect this traffic to Trendz backend: -```bash -acl trendz_http hdr(host) -i new-trendz-domain.com -use_backend tb-trendz if trendz_http -``` - -In the same file register Trendz backend: -```bash -backend tb-trendz - balance leastconn - option tcp-check - option log-health-checks - server tbTrendz1 127.0.0.1:8888 check inter 5s - http-request set-header X-Forwarded-Port %[dst_port] -``` - -Generate SSL certificates for new domain: -```bash -sudo certbot-certonly --domain new-trendz-domain.com --email some@email.io -``` - -Refresh HAProxy configuration: -```bash -sudo haproxy-refresh -``` - -That's it, HTTPS for Trendz UI configured and now you can access it via: -https://new-trendz-domain.com - - -**Fresh installation on new server** - -Please follow this [guide](/docs/user-guide/install/pe/add-haproxy-ubuntu) to install HAProxy and generate valid SSL certificate using Let's Encrypt. - -## Step 10. Host ThingsBoard and Trendz on the same domain -ThingsBoard and Trendz can share same domain name. In this case ThingsBoard web page would be loaded using following link: - -```bash -https://{my-domain}/ -``` - -and Trendz web page would be loaded using following link - -```bash -https://{my-domain}/trendz -``` - -For enabling such configuration we have to update HAProxy config to route specific requests to Trendz service. -Open HAProxy configuration file -```bash -sudo nano /etc/haproxy/haproxy.cfg -``` -{: .copy-code} - -Locate **frontend https_in** section, add new access list that will match traffic by URL path and redirect this traffic to Trendz backend: - -```bash -... -acl trendz_acl path_beg /trendz path_beg /apiTrendz -.... -use_backend tb-trendz if trendz_acl -``` - -## Post-installation steps -It is essential to follow these [instructions](/docs/trendz/post-installation-steps) to fully use all features, such as saving telemetry to ThingsBoard and adding Trendz views to dashboards. +{% include templates/trendz/install/authentication.md %} ## Troubleshooting Trendz logs are stored in the following directory: - + ```bash /var/log/trendz ``` You can issue the following command in order to check if there are any errors on the backend side: - + ```bash cat /var/log/trendz/trendz.log | grep ERROR ``` +## HTTPS configuration + +{% include templates/trendz/install/https-configuration.md %} + ## Next steps {% assign currentGuide = "InstallationOptions" %}{% include templates/trndz-guides-banner.md %} diff --git a/docs/trendz/install/windows.md b/docs/trendz/install/windows.md index c888cd49e4..62d1ba2125 100644 --- a/docs/trendz/install/windows.md +++ b/docs/trendz/install/windows.md @@ -5,6 +5,33 @@ assignees: title: Installing ThingsBoard Trendz Analytics on Windows description: Installing ThingsBoard Trendz Analytics on Windows +trendz-settings: + 0: + image: /images/trendz/install/sync/trendz-settings-1.png + title: "Log in to ThingsBoard as a Sysadmin." + 1: + image: /images/trendz/install/sync/trendz-settings-2.png + title: "Open the Trendz Settings page." + 2: + image: /images/trendz/install/sync/trendz-settings-3.png + title: "If you see the message \"Synchronization completed successfully\", the synchronization has been completed automatically and no further action is required." +trendz-sync: + 0: + image: /images/trendz/install/sync/trendz-sync-1.png + title: "If you see an error message, follow these steps." + 1: + image: /images/trendz/install/sync/trendz-sync-2.png + title: "Enter the correct Trendz internal URL and ThingsBoard internal URL." + 2: + image: /images/trendz/install/sync/trendz-sync-3.png + title: "Click Save configuration." + 3: + image: /images/trendz/install/sync/trendz-sync-4.png + title: "Click Retry discovery." + 4: + image: /images/trendz/install/sync/trendz-sync-5.png + title: "Once the message \"Synchronization completed successfully\" appears, the synchronization is complete." + --- * TOC @@ -23,16 +50,22 @@ Proceed here **only** if you have a compelling reason to use a combined Windows ## Prerequisites -**Hardware requirements** depend on amount of analyzed data and amount of devices connected to the system. -To run Trendz Analytics on a single machine you will need at least 1Gb of free RAM. +### Hardware Requirements + +{% include templates/trendz/install/hardware-requirements.md %} + +### Software Requirements -In small and medium installations Trendz can be installed **on the same** server with ThingsBoard. +{% include templates/trendz/install/docker-requirements-linux.md %} +{% include templates/trendz/install/thingsboard-requirements.md %} -## Step 1. Install Java 17 (OpenJDK) +## Installation Steps + +### Step 1. Install Java 17 (OpenJDK) {% include templates/install/windows-java-install.md %} -## Step 2. Trendz Analytics service installation +### Step 2. Trendz Analytics service installation Download and extract the package. @@ -41,67 +74,26 @@ https://dist.thingsboard.io/trendz-windows-{{ site.release.trendz_ver }}.zip ``` {: .copy-code} -**Note:** We assume you have extracted Trendz package to default location: *C:\Program Files (x86)\trendz* - -## Step 3. Obtain and configure license key - -We assume you have already chosen subscription plan for Trendz and have license key. If not, please get your [Free Trial license](/pricing/?section=trendz-options&product=trendz-self-managed&solution=trendz-pay-as-you-go) before you proceed. -See [How-to get pay-as-you-go subscription](https://www.youtube.com/watch?v=dK-QDFGxWek){:target="_blank"} for more details. - -Once you get the license secret, you should put it to the trendz configuration file. -Open the Notepad or other editor as administrator user (right click on the app icon and select "Run as administrator"). -Open the following file for editing (select "All Files" instead of "Text Documents" in file choosing dialog, the encoding is UTF-8): - -```text -C:\Program Files (x86)\trendz\conf\trendz.yml -``` -{: .copy-code} - -Scroll to the bottom of the file and locate the following configuration block: - -```yml -license: - secret: "${TRENDZ_LICENSE_SECRET:YOUR_LICENSE_SECRET_HERE}" # license secret obtained from ThingsBoard License Portal (https://license.thingsboard.io) -``` - -## Step 4. Configure connection with ThingsBoard Platform - -You can connect Trendz Analytics to the ThingsBoard Community Edition or ThingsBoard Professional Edition. - -Open the Notepad or other editor as administrator user (right click on the app icon and select "Run as administrator"). -Open the following file for editing (select "All Files" instead of "Text Documents" in file choosing dialog, the encoding is UTF-8): - -```text -C:\Program Files (x86)\trendz\conf\trendz.yml -``` -{: .copy-code} - -Add ThingsBoard REST API URL that would be used for communicating with ThingsBoard Platform. In most cases, when Trendz installed -in the same server with ThingsBoard, API_URL would be **http://localhost:8080**. Otherwise you should use ThingsBoard domain name. +**Note:** We assume you have extracted Trendz package to default location: *C:\Program Files (x86)\trendz* -```bash -tb.api.url: "${TB_API_URL:http://localhost:8080}" -``` -{: .copy-code} +### Step 3. Configure Trendz database -## Step 5. Configure Trendz database Trendz uses PostgreSQL as a database. You can install PostgreSQL on the same serverfor Trendz or use managed PostgreSQL service from your cloud vendor. -### PostgreSQL Installation +* **PostgreSQL Installation** Download the installation file (PostgreSQL 12.17 or newer releases) [here](https://www.enterprisedb.com/downloads/postgres-postgresql-downloads#windows) and follow the installation instructions. During PostgreSQL installation, you will be prompted for superuser (postgres) password. Don't forget this password. It will be used later. For simplicity, we will substitute it with "postgres". -### Create Database for Trendz +* **Create Database for Trendz** Once installed, launch the "pgAdmin" software and login as superuser (postgres). Open your server and create database "trendz" with owner "postgres". - -### Configure database connection for Trendz +* **Configure database connection for Trendz** Open the Notepad or other editor as administrator user (right click on the app icon and select "Run as administrator"). Open the following file for editing (select "All Files" instead of "Text Documents" in file choosing dialog, the encoding is UTF-8): @@ -125,7 +117,7 @@ datasource: ``` {: .copy-code} -## Step 6. Run installation script +### Step 4. Run installation script Launch windows shell (Command Prompt) as Administrator. Change directory to your Trendz installation directory. @@ -144,7 +136,7 @@ Installing Trendz Analytics... Trendz Analytics installed successfully! ``` -## Step 7. Start Trendz service +### Step 5. Start Trendz service Now let's start the Trendz service! Open the command prompt as an Administrator and execute the following command: @@ -168,31 +160,20 @@ net stop trendz net start trendz ``` -Once started, you will be able to open Web UI using the following link: - -```bash -http://localhost:8888/trendz -``` - -**Note**: If Trendz installed on a remote server, you have to replace localhost with the public IP address of -the server or with a domain name. Also, check that port 8888 opened for public access. - -### Authentication +### Step 6. Sync ThingsBoard With Trendz -For first authentication you need to use **Tenant Administrator** credentials from your **ThingsBoard** +{% include templates/trendz/install/sync-with-tb.md %} -Trendz uses ThingsBoard as an authentication service. During first sign in ThingsBoard service should be also available -to validate credentials. - -## Step 8. Install Trendz Python Executor +### Step 7. Install Trendz Python Executor To utilize all Trendz capabilities, such as Trendz Python Calculation Fields or Prediction Models, it is essential to install an additional service: the Trendz Python Executor, which can securely run Python code. -You can learn more about how to install it [here](/docs/trendz/install/python-executor-configuration-windows). +You can learn more about how to install it [here](/docs/trendz/install/python-executor-configuration). + +## Authentication -## Post-installation steps -It is essential to follow these [instructions](/docs/trendz/post-installation-steps) to fully use all features, such as saving telemetry to ThingsBoard and adding Trendz views to dashboards. +{% include templates/trendz/install/authentication.md %} ## Troubleshooting diff --git a/docs/trendz/metric/overview.md b/docs/trendz/metric/overview.md index bfb797139c..5d209c445c 100644 --- a/docs/trendz/metric/overview.md +++ b/docs/trendz/metric/overview.md @@ -202,6 +202,16 @@ analyze time patterns, and explore general telemetry behavior. It also enables t ones using **AI Assistance** or **AI Suggestions**. All generated metrics can be fully integrated into the Trendz ecosystem and used within **ThingsBoard**. +You can find details how to use Trendz Analytics to explore metrics here: +  +
    +
    + +
    +
    + +## Interface + You can access the Metric Explorer by clicking the ![image](/images/trendz/metric/overview/chart-icon-without-preview.svg) icon. The interface consists of three main sections: diff --git a/docs/trendz/post-installation-steps.md b/docs/trendz/post-installation-steps.md index e2b0220f03..45c9568578 100644 --- a/docs/trendz/post-installation-steps.md +++ b/docs/trendz/post-installation-steps.md @@ -101,11 +101,6 @@ You need to complete the following actions to add all necessary add-ons to Thing - You will see *Latest version installed* afterward. - Read more about the Trendz JS Summary Module [here](/docs/trendz/settings#trendz-js-summary-module). -- **Trendz Settings:** - - Click the **Update Settings** button. - - You will see *Settings are up to date* afterward. - - Read more about Trendz Settings [here](/docs/trendz/settings#trendz-settings). - ## Link to ThingsBoard To simplify the process of adding Trendz views to ThingsBoard dashboards, we have introduced the ability to open the dashboard where the view was added in a new tab. @@ -121,12 +116,3 @@ Configure the link to your ThingsBoard instance in Settings to use this feature. After this, you can open your modified or newly created dashboard in a new tab by enabling the Open dashboard in a separate window field. ![image](/images/trendz/open-dashboard-in-separate-tab.png) - -## AI Assistant - -To use AI Assistant feature in Trendz, you need to configure it first. To enable your own AI model, go to **Settings → General → AI Assistant** in Trendz. -There, you can enable the **Use own model** option, select an AI provider (OpenAI, Amazon Bedrock, Google or Custom), and enter the required API credentials. - -For more details on configuring AI Assistant, you can read more [here](/docs/trendz/custom-ai-model-configuration.md). - -![image](/images/trendz/ai/settings/use-own-model-1.png) diff --git a/docs/trendz/settings.md b/docs/trendz/settings.md index 811672a147..df0b986252 100644 --- a/docs/trendz/settings.md +++ b/docs/trendz/settings.md @@ -9,22 +9,83 @@ description: Trendz Settings Description * TOC {:toc} -## General - To access settings, go to the **Settings** page by clicking the **“Settings”** button in the bottom-left corner of the screen. ![Settings Navigation](/images/trendz/signing-key-1.png) +## System + +### Import / Export + +To migrate data from one Trendz instance to another, use the built-in **Import/Export** mechanism. + +You can export and import the following: + +- Business Entities and their Fields +- View Configurations and View Collections +- Calculation Fields +- Prediction Models +- Anomaly Models and Anomalies +- AI Assistant Chats and Messages +- Prompts +- Tasks + +**Exporting** + +Just click the **Export** button—no additional steps are needed. +The file will be downloaded automatically. + +**Importing** + +Click the **Import** button, choose the previously exported file, and configure the **Skip duplicates** option: +- **True** – Duplicate items in the import file will be ignored. +- **False** – Duplicate items will cause import errors. + +Once ready, click **Import Configuration**. If successful, a confirmation message will appear. + +**Limitations** +- Migration between **different Trendz versions** is not supported. +- Migration between **different tenants** is not supported. + +### Cache Management + +This section allows you to manage various cache layers used in Trendz, such as clearing local or telemetry cache. +For more details, see the [Cache Settings documentation](/docs/trendz/cache-settings). + +### External Data Source + +Here you can configure and manage external SQL data sources and integrate them with Trendz views. +Learn more in the [external datasource guide](/docs/trendz/mix-sql-datasource). + +## AI Settings + +Here it's possible to configure the AI Model for the next features: + +* [Metric Explorer](/docs/trendz/metric/overview) +* [View AI Assistant](/docs/trendz/ai-assistance-overview) +* [AI Widget Summary](/docs/trendz/ai-widget-summary) + +You can learn how to configure AI Setting [here](/docs/trendz/custom-ai-model-configuration/). + +## White Labeling + +You can customize the Trendz user interface (logo, colors, labels) to reflect your brand identity. +Refer to the [White Labeling documentation](/docs/trendz/white-labeling) for full configuration options. + +## General (Deprecated) + +This tab is available only if Trendz is connected to ThingsBoard 4.2.1 or older. + ### Signing Key -For the application to function properly, it must authenticate with ThingsBoard on behalf of a user. This is required +For the application to function properly, it must authenticate with ThingsBoard on behalf of a user. This is required for background operations such as: - Sending generated telemetry - Fetching data for continuous prediction model fitting and forecasting -Storing user credentials in application memory is not secure. Instead, Trendz supports a secure mechanism using a -**JWT signing key**, which should be stored in configuration files. It is expected that Trendz is installed on a +Storing user credentials in application memory is not secure. Instead, Trendz supports a secure mechanism using a +**JWT signing key**, which should be stored in configuration files. It is expected that Trendz is installed on a secured server (as is ThingsBoard and similar systems). You can alternatively store the signing key in the Trendz database automatically, but this method is **not recommended** due to security concerns. @@ -59,40 +120,39 @@ Follow these steps to configure the signing key: **Installation-specific Instructions** - *Ubuntu Installation* - 1. SSH into the server running Trendz. + 1. SSH into the server running Trendz. - 2. Open the Trendz configuration file: + 2. Open the Trendz configuration file: - ```bash - sudo nano /etc/trendz/conf/trendz.conf - ``` - {: .copy-code} + ```bash + sudo nano /etc/trendz/conf/trendz.conf + ``` + {: .copy-code} - 3. Add the signing key to the end of the file: + 3. Add the signing key to the end of the file: - ```bash - export JWT_TOKEN_SIGNING_KEY= - ``` - {: .copy-code} - ![Ubuntu Signing Key](/images/trendz/signing-key-7.png) + ```bash + export JWT_TOKEN_SIGNING_KEY= + ``` + {: .copy-code} + ![Ubuntu Signing Key](/images/trendz/signing-key-7.png) - 4. Save the file and restart the Trendz service. + 4. Save the file and restart the Trendz service. - *Docker Compose Installation* - 1. Open your `docker-compose.yml` file. - - 2. Add a new environment variable under the Trendz service: + 1. Open your `docker-compose.yml` file. - ```yaml - environment: - - JWT_TOKEN_SIGNING_KEY= - ``` - {: .copy-code} - ![Docker Signing Key](/images/trendz/signing-key-8.png) + 2. Add a new environment variable under the Trendz service: - 3. Save the file and restart the Trendz container. + ```yaml + environment: + - JWT_TOKEN_SIGNING_KEY= + ``` + {: .copy-code} + ![Docker Signing Key](/images/trendz/signing-key-8.png) + 3. Save the file and restart the Trendz container. ### Trendz Widget Bundle @@ -130,79 +190,3 @@ Check the status under the **Trendz JS Summary Module** section: - Otherwise, click the **Upload Module** button: - If not installed - uploads the module. - If outdated - updates it. - -### Trendz Settings - -Needed for Trendz solution templates and AI Summary rule nodes. - -Check the status under the **Trendz Settings** section: - -- **Not installed** – Settings are missing. -- **Update required** – A newer version is available. -- **Settings are actual** – All up to date. - -**Action Steps:** - -- If status is **Settings are actual** – no changes needed. -- Otherwise, click the **Upload Settings** button: - - If not installed - uploads the settings. - - If outdated - updates them. - -### AI Settings - -Here it's possible to configure the AI Model for the next features: - -* [Metric Explorer](/docs/trendz/metric/overview) -* [View AI Assistant](/docs/trendz/ai-assistance-overview) -* [AI Widget Summary](/docs/trendz/ai-widget-summary) - -You can learn how to configure AI Setting [here](/docs/trendz/custom-ai-model-configuration/). - -## System - -### Import / Export - -To migrate data from one Trendz instance to another, use the built-in **Import/Export** mechanism. - -You can export and import the following: - -- Business Entities and their Fields -- View Configurations and View Collections -- Calculation Fields -- Prediction Models -- Anomaly Models and Anomalies -- AI Assistant Chats and Messages -- Prompts -- Tasks - -**Exporting** - -Just click the **Export** button—no additional steps are needed. -The file will be downloaded automatically. - -**Importing** - -Click the **Import** button, choose the previously exported file, and configure the **Skip duplicates** option: -- **True** – Duplicate items in the import file will be ignored. -- **False** – Duplicate items will cause import errors. - -Once ready, click **Import Configuration**. If successful, a confirmation message will appear. - -**Limitations** -- Migration between **different Trendz versions** is not supported. -- Migration between **different tenants** is not supported. - -### Cache Management - -This section allows you to manage various cache layers used in Trendz, such as clearing local or telemetry cache. -For more details, see the [Cache Settings documentation](/docs/trendz/cache-settings). - -### External Data Source - -Here you can configure and manage external SQL data sources and integrate them with Trendz views. -Learn more in the [external datasource guide](/docs/trendz/mix-sql-datasource). - -## White Labeling - -You can customize the Trendz user interface (logo, colors, labels) to reflect your brand identity. -Refer to the [White Labeling documentation](/docs/trendz/white-labeling) for full configuration options. diff --git a/docs/trendz/trendz-bundle.md b/docs/trendz/trendz-bundle.md index a3541118d3..006ba51c16 100755 --- a/docs/trendz/trendz-bundle.md +++ b/docs/trendz/trendz-bundle.md @@ -2,8 +2,8 @@ layout: docwithnav-trendz assignees: - vparomskiy -title: Import Trendz bundle into ThingsBoard -description: Import Trendz bundle into ThingsBoard +title: Import Advanced analytics Bundle into ThingsBoard +description: Import Advanced analytics Bundle into ThingsBoard tb-trendz-3.5-resource-lib-update: 0: @@ -23,10 +23,26 @@ tb-trendz-3.5-resource-lib-update: * TOC {:toc} -All visualizations created in Trendz Analytics could be added on ThingsBoard Dashboards. We created special `Trendz widget bundle` for ThingsBoard - widgets collection that should be imported into ThingsBoard `Widget Library`. +All visualizations created in Trendz Analytics could be added on ThingsBoard Dashboards. +We created special `Advanced analytics Bundle` for ThingsBoard - widgets collection that should be imported into ThingsBoard `Widgets library`. You can use them to add views from Trendz into ThingsBoard dashboards and share analysis results with other users. -## Import Trendz widget bundle +{% capture trendz_info %} +From ThingsBoard 4.3+ and Trendz 1.15+, the bundle name is `Advanced analytics Bundle`, and this bundle is a system bundle. + +For older versions, you can find the bundle at the tenant level with the name `Trendz Bundle` (after successful import). +{% endcapture %} +{% include templates/info-banner.md content=trendz_info %} + +## Import Advanced analytics Bundle + +### ThingsBoard 4.3+ and Trendz 1.15+ + +Starting from ThingsBoard 4.3 and Trendz 1.15, Trendz widgets are now managed at the sysadmin level and are upgraded automatically. +Starting from these versions, there are no additional actions required from the user to import this bundle. The only requirement is: +Trendz should be connected to ThingsBoard. You can find out how to do it [here](/docs/trendz/install/ubuntu#step-6-sync-thingsboard-with-trendz). + +If Trendz is synced with ThingsBoard, you can find the system bundle `Advanced analytics Bundle` in the `Widgets library`. ### ThingsBoard 3.4+ and Trendz 1.9+ You can import Trendz bundle to the ThingsBoard via Trendz UI: diff --git a/docs/trendz/visualizations-overview.md b/docs/trendz/visualizations-overview.md index 64f4cdfd69..256751f1c7 100755 --- a/docs/trendz/visualizations-overview.md +++ b/docs/trendz/visualizations-overview.md @@ -41,11 +41,10 @@ At this moment you will see average measurement from all entities in the ThingsB We are glad to present the series of webinars about ThingsBoard Trendz Analytics functionality. Learn more about Trendz Analytics features and how it helps to transform the IoT data into value for informed decision-making. -  - + 
    - +
    diff --git a/docs/trendz/what-is-trendz.md b/docs/trendz/what-is-trendz.md index 49e20269dd..451faa8a46 100644 --- a/docs/trendz/what-is-trendz.md +++ b/docs/trendz/what-is-trendz.md @@ -1,16 +1,17 @@ --- layout: docwithnav-trendz -title: What is Trendz Analytics -description: What is Trendz Analytics +title: What is Trendz Analytics? +description: Trendz key features and advantages for the advanced telemetry analytics. --- -The ThingsBoard **Trendz** is an Analytics Platform that converts the IoT dataset into insights and simplifies the decision-making process. +The **Trendz Analytics** is an add-on for ThingsBoard Platform that converts the IoT dataset into insights and simplifies the decision-making process. With Trendz you can: +- Easily explore any metric from any device - Analyse behavior patterns, outliers and trends - Predict system behavior and react beforehand - Identify anomalies in time series data - Define KPI using calculated fields, review dynamic and understand what affects it -- Monitor how much time equipment spend in different states +- Monitor how much time equipment spends in different states - Filter, group and aggregate data in different dimensions - Share the analysis with other users by embedding visualizations into a dashboard diff --git a/images/trendz/activation/self-hosted/complete-payment-preview.png b/images/trendz/activation/self-hosted/complete-payment-preview.png new file mode 100644 index 0000000000..20103534a5 Binary files /dev/null and b/images/trendz/activation/self-hosted/complete-payment-preview.png differ diff --git a/images/trendz/activation/self-hosted/complete-payment.png b/images/trendz/activation/self-hosted/complete-payment.png new file mode 100644 index 0000000000..24066513c3 Binary files /dev/null and b/images/trendz/activation/self-hosted/complete-payment.png differ diff --git a/images/trendz/activation/self-hosted/enable-1-preview.png b/images/trendz/activation/self-hosted/enable-1-preview.png new file mode 100644 index 0000000000..8fed857ec9 Binary files /dev/null and b/images/trendz/activation/self-hosted/enable-1-preview.png differ diff --git a/images/trendz/activation/self-hosted/enable-1.png b/images/trendz/activation/self-hosted/enable-1.png new file mode 100644 index 0000000000..28a5019132 Binary files /dev/null and b/images/trendz/activation/self-hosted/enable-1.png differ diff --git a/images/trendz/activation/self-hosted/enable-2-preview.png b/images/trendz/activation/self-hosted/enable-2-preview.png new file mode 100644 index 0000000000..13e24c9c5a Binary files /dev/null and b/images/trendz/activation/self-hosted/enable-2-preview.png differ diff --git a/images/trendz/activation/self-hosted/enable-2.png b/images/trendz/activation/self-hosted/enable-2.png new file mode 100644 index 0000000000..94f914832d Binary files /dev/null and b/images/trendz/activation/self-hosted/enable-2.png differ diff --git a/images/trendz/activation/self-hosted/enable-3-preview.png b/images/trendz/activation/self-hosted/enable-3-preview.png new file mode 100644 index 0000000000..c756e5776a Binary files /dev/null and b/images/trendz/activation/self-hosted/enable-3-preview.png differ diff --git a/images/trendz/activation/self-hosted/enable-3.png b/images/trendz/activation/self-hosted/enable-3.png new file mode 100644 index 0000000000..b541291577 Binary files /dev/null and b/images/trendz/activation/self-hosted/enable-3.png differ diff --git a/images/trendz/activation/self-hosted/enable-4-preview.png b/images/trendz/activation/self-hosted/enable-4-preview.png new file mode 100644 index 0000000000..5b662da641 Binary files /dev/null and b/images/trendz/activation/self-hosted/enable-4-preview.png differ diff --git a/images/trendz/activation/self-hosted/enable-4.png b/images/trendz/activation/self-hosted/enable-4.png new file mode 100644 index 0000000000..10e082ecc8 Binary files /dev/null and b/images/trendz/activation/self-hosted/enable-4.png differ diff --git a/images/trendz/activation/self-hosted/login-1-preview.png b/images/trendz/activation/self-hosted/login-1-preview.png new file mode 100644 index 0000000000..7ccfb290f3 Binary files /dev/null and b/images/trendz/activation/self-hosted/login-1-preview.png differ diff --git a/images/trendz/activation/self-hosted/login-1.png b/images/trendz/activation/self-hosted/login-1.png new file mode 100644 index 0000000000..59fc89a5d8 Binary files /dev/null and b/images/trendz/activation/self-hosted/login-1.png differ diff --git a/images/trendz/activation/self-hosted/login-2-preview.png b/images/trendz/activation/self-hosted/login-2-preview.png new file mode 100644 index 0000000000..8353d6fa89 Binary files /dev/null and b/images/trendz/activation/self-hosted/login-2-preview.png differ diff --git a/images/trendz/activation/self-hosted/login-2.png b/images/trendz/activation/self-hosted/login-2.png new file mode 100644 index 0000000000..de40c13c74 Binary files /dev/null and b/images/trendz/activation/self-hosted/login-2.png differ diff --git a/images/trendz/cloud-1-preview.webp b/images/trendz/cloud-1-preview.webp deleted file mode 100644 index a4260e2cd0..0000000000 Binary files a/images/trendz/cloud-1-preview.webp and /dev/null differ diff --git a/images/trendz/cloud-1.webp b/images/trendz/cloud-1.webp deleted file mode 100644 index a4260e2cd0..0000000000 Binary files a/images/trendz/cloud-1.webp and /dev/null differ diff --git a/images/trendz/cloud-2-preview.webp b/images/trendz/cloud-2-preview.webp deleted file mode 100644 index ff8b4ca3be..0000000000 Binary files a/images/trendz/cloud-2-preview.webp and /dev/null differ diff --git a/images/trendz/cloud-2.webp b/images/trendz/cloud-2.webp deleted file mode 100644 index ff8b4ca3be..0000000000 Binary files a/images/trendz/cloud-2.webp and /dev/null differ diff --git a/images/trendz/cloud-3-preview.webp b/images/trendz/cloud-3-preview.webp deleted file mode 100644 index 8bb45b3cb1..0000000000 Binary files a/images/trendz/cloud-3-preview.webp and /dev/null differ diff --git a/images/trendz/cloud-3.webp b/images/trendz/cloud-3.webp deleted file mode 100644 index 8bb45b3cb1..0000000000 Binary files a/images/trendz/cloud-3.webp and /dev/null differ diff --git a/images/trendz/install/sync/trendz-settings-1-preview.png b/images/trendz/install/sync/trendz-settings-1-preview.png new file mode 100644 index 0000000000..85c40cb61b Binary files /dev/null and b/images/trendz/install/sync/trendz-settings-1-preview.png differ diff --git a/images/trendz/install/sync/trendz-settings-1.png b/images/trendz/install/sync/trendz-settings-1.png new file mode 100644 index 0000000000..af12c3b7c8 Binary files /dev/null and b/images/trendz/install/sync/trendz-settings-1.png differ diff --git a/images/trendz/install/sync/trendz-settings-2-preview.png b/images/trendz/install/sync/trendz-settings-2-preview.png new file mode 100644 index 0000000000..7974312ff0 Binary files /dev/null and b/images/trendz/install/sync/trendz-settings-2-preview.png differ diff --git a/images/trendz/install/sync/trendz-settings-2.png b/images/trendz/install/sync/trendz-settings-2.png new file mode 100644 index 0000000000..65058402fb Binary files /dev/null and b/images/trendz/install/sync/trendz-settings-2.png differ diff --git a/images/trendz/install/sync/trendz-settings-3-preview.png b/images/trendz/install/sync/trendz-settings-3-preview.png new file mode 100644 index 0000000000..9b07c3e301 Binary files /dev/null and b/images/trendz/install/sync/trendz-settings-3-preview.png differ diff --git a/images/trendz/install/sync/trendz-settings-3.png b/images/trendz/install/sync/trendz-settings-3.png new file mode 100644 index 0000000000..a82451e659 Binary files /dev/null and b/images/trendz/install/sync/trendz-settings-3.png differ diff --git a/images/trendz/install/sync/trendz-sync-1-preview.png b/images/trendz/install/sync/trendz-sync-1-preview.png new file mode 100644 index 0000000000..b4ad70cc6a Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-1-preview.png differ diff --git a/images/trendz/install/sync/trendz-sync-1.png b/images/trendz/install/sync/trendz-sync-1.png new file mode 100644 index 0000000000..42eed6d6ef Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-1.png differ diff --git a/images/trendz/install/sync/trendz-sync-2-preview.png b/images/trendz/install/sync/trendz-sync-2-preview.png new file mode 100644 index 0000000000..a9706976c5 Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-2-preview.png differ diff --git a/images/trendz/install/sync/trendz-sync-2.png b/images/trendz/install/sync/trendz-sync-2.png new file mode 100644 index 0000000000..4e13a3ed99 Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-2.png differ diff --git a/images/trendz/install/sync/trendz-sync-3-preview.png b/images/trendz/install/sync/trendz-sync-3-preview.png new file mode 100644 index 0000000000..63ecc0a999 Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-3-preview.png differ diff --git a/images/trendz/install/sync/trendz-sync-3.png b/images/trendz/install/sync/trendz-sync-3.png new file mode 100644 index 0000000000..aa2d3c8163 Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-3.png differ diff --git a/images/trendz/install/sync/trendz-sync-4-preview.png b/images/trendz/install/sync/trendz-sync-4-preview.png new file mode 100644 index 0000000000..e22b0da73e Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-4-preview.png differ diff --git a/images/trendz/install/sync/trendz-sync-4.png b/images/trendz/install/sync/trendz-sync-4.png new file mode 100644 index 0000000000..1785fd1b3e Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-4.png differ diff --git a/images/trendz/install/sync/trendz-sync-5-preview.png b/images/trendz/install/sync/trendz-sync-5-preview.png new file mode 100644 index 0000000000..342ada9ba5 Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-5-preview.png differ diff --git a/images/trendz/install/sync/trendz-sync-5.png b/images/trendz/install/sync/trendz-sync-5.png new file mode 100644 index 0000000000..c47ce4fb5b Binary files /dev/null and b/images/trendz/install/sync/trendz-sync-5.png differ