Attach different thingsboard gateway to different thingsboard tenant - thingsboard

I'm using an instance of Thingsboard Gateway connected to Thingsboard server through his equivalent gateway type sensor on Thingsboard. On Thingsboard, the gateway type sensor is owned by a tenant. So all telemetry read from Gateway goes to that tenant.
My problem is that i have more than one Tenant.
What is the best practice in multi tenant enviroment about the Thingsboard gateway ? I have to install one gateway for each tenant or exist some other way ?
Thanks.
Gigi

Related

What is the url for http telemetry, in the Thingsboard micro service architecture?

I am implementing a system using thingsboard msa (micro service architecture) to achieve high availability and fault tolerance. But I cannot pass telemetry data to the http transport layer.
I am using the released version on thingsboard github https://github.com/thingsboard/thingsboard/tree/master/docker
I tried using HAproxy ip but it doesn't seem to work. Anyone know which ip and port i should use?
RESOLVED
this version: https://github.com/thingsboard/thingsboard/tree/master/docker not have the transport configurations and logback.xml.

Do modules deployed via Azure IoT Edge runtime require an Azure IoT SDK client?

I have a service that's already Dockerized. The service listens on some ports and makes some outbound network calls. At the moment, updating the service requires someone to access the console remotely and manually replace the old container with the latest version.
After reading through the Azure IoT Edge documentation and the SDKs, it's not clear to me if an Azure IoT module MUST include an Azure IoT SDK. I know the Azure IoT SDK is necessary for passing messages, accessing the module twin, and probably more, but I don't need any of that at the moment for this specific use-case.
Can I reuse my existing Docker containers with Azure IoT Edge or would I need to add the Azure IoT SDK (because there's a health check or other internal requirement for the SDK)?
As you mentioned, Azure IoT SDK is the recommended way to do messaging, access twin etc. But it is optional.
If you just want the IoT Edge runtime to launch a Docker container that listens on local ports and performs outbound network calls, you can certainly do that. Nothing will get in your way.

Azure API Management service with external virtual network to Docker

I want to use the Azure API Management Service (AMS) to expose the API created with R/Plumber hosted in a Docker container and runs in an Ubuntu machine.
Scenario
With R/Plumber I created some APIs that I want to protect. Then, I created a virtual machine on Azure with Ubuntu and installed Docker. The APIs are in a container that I published on the virtual machine by Docker. I can access them via internet.
On Azure I created an API Management service and added the APIs from the Swagger OpenAPI documentation.
Problem
I want to secure the APIs. I want to expose to the internet only the AMS. Then, my idea was to remove the public IP from the virtual machine and via a virtual network using the internal IPs to connect the API Management Service to the API with the internal IP (http://10.0.1.5:8000).
So, I tried to set a Virtual Network. Clicked on the menu, then External and then on the row, I can select a network. In this virtual network, I have one network interface that is the one the virtual machine is using.
When I save the changes, I have to wait a while and then I receive an error
Failed to connect to management endpoint at azuks-chi-testapi-d1.management.azure-api.net:3443 for a service deployed in a virtual network. Make sure to follow guidance at https://aka.ms/apim-vnet-common-issues.
I read the following documentation but I can't understand how to do what I wanted
Azure API Management - External Type: gateway unable to access resources within the virtual network?
How to use Azure API Management with virtual networks
Is there any how-to to use? Any advice? What are I doing wrong?
Update
I tried to add more Address space in the Virtual network.
One of them (10.0.0.2/24) is delegate for the API Management.
Then, in the Network security group I added the port 3443.
From the API manager I can't reach the server with the internet IP (10.0.2.5). What did I miss?
See common network configuration issues, it lists all dependencies that are expected to be exposed for APIM to work. Make sure that your vnet allows ingress at port 3443 for the subnet where APIM service is located. This configuration must be done on VNET side, not APIM.

How to let ThingsBoard connect to an independent MQTT broker?

It seems that ThingsBoard implements its own MQTT broker and connector with Netty. We are trying to use an independent MQTT broker, how do we make ThingsBoard connect to that broker with minimum effort?
You should use ThingsBoard IoT Gateway project. It allows to connect to external MQTT broker and acts as an API bridge between your broker and ThingsBoard. For example, you can subscribe to custom topics and extract telemetry values or attribute updates from it. Similar with ThingsBoard RPC calls. Browse the following docs for an example of integration with AWS IoT:
https://thingsboard.io/docs/iot-gateway/integration-with-aws-iot/

How to send message from mosquitto broker to azure IOT hub

I have installed mosquitto as a local broker. There are multiple devices which sends messages to the broker. I want that whatever message coming to mosquitto broker should be sent to azure IOT hub. Can anyone please refer to any document how to do that.
You have several approaches:
You can use one of the device client SDKs (depending on which
language you are using on your broker) to send data to IoT Hub
You
can use MQTT directly to communicate with IoT Hub, which will require
that you do specific things described in this document
(definitively recommend using the client SDK)

Resources