{"id":13834504,"url":"https://github.com/voxic/Thingsboard_on_KPS","last_synced_at":"2025-07-10T07:30:43.290Z","repository":{"id":85960901,"uuid":"344478890","full_name":"voxic/Thingsboard_on_KPS","owner":"voxic","description":"Step by step to deploy Thingsboard on Nutanix Karbon Platform Services","archived":false,"fork":false,"pushed_at":"2021-03-04T14:59:25.000Z","size":554,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-20T20:38:45.578Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-04T13:11:25.000Z","updated_at":"2021-03-16T18:22:36.000Z","dependencies_parsed_at":"2023-03-13T07:40:48.181Z","dependency_job_id":null,"html_url":"https://github.com/voxic/Thingsboard_on_KPS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/voxic/Thingsboard_on_KPS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxic%2FThingsboard_on_KPS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxic%2FThingsboard_on_KPS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxic%2FThingsboard_on_KPS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxic%2FThingsboard_on_KPS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxic","download_url":"https://codeload.github.com/voxic/Thingsboard_on_KPS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxic%2FThingsboard_on_KPS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545157,"owners_count":23625403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T14:00:35.897Z","updated_at":"2025-07-10T07:30:42.879Z","avatar_url":"https://github.com/voxic.png","language":"Python","funding_links":[],"categories":["Deployment"],"sub_categories":["IoT systems"],"readme":"# Thingsboard on Nutanix Karbon Platform Services\n\n## Introduction\n\nThis repository contains everthing you need to deploy [Thingsboard](https://thingsboard.io) on-top of Nutanix [Karbon Platform Services](https://www.nutanix.com/products/karbon/platform-services).\n\nThis deployment will let you quickly get up and runing with both Thingsboard and Karbon Platform Services.\nThe deployment consists of two parts, Thingsboard deployment and a Kafka to Thingsboard bridge.\n\n![](img/overview.png)\n\n___\n\n## Step by step\n\n### Step 1 - Create a project\n\n\u003e This step assumes you already have acces to Karbon Platform Services. If not and you want to try it out sign up at https://my.nutanix.com\n\nSign in to Karbon Platform Services [portal](https://karbon.nutanix.com). Open the ```Projects``` section in the menu on the left. Click on ```Create```.\nGive your project a name and assign a user.  \nClick ```Next```. Assign a service domain using ```Add service domain```.  \nClick ```Next```.  \nEnable services for our project.  \nThis project is making use of\n\n* Kubernetes Apps\n* Functions and Data Pipelines\n* Ingress Controller - Traefik\n* Data Streaming - Kafka, NATS\n\nClick on ```Create```.\n\n### Step 2 - Setup data source\n\nNext we add a new data source. This is where the data enters the platform solution.\nWe will create a new category for our incoming data.\nOpen the ```Categories``` section in the menu and click ```Create```.  \nGive the new category a name and click on ```Add value```.  \nIn my example I use ```IncommingData``` as name and add a value of ```weather```\n\n![\"Category\"](img/category.png)\n\nOnce we have our category setup we can add the data source.\n\nOpen the ```Data sources and IoT sensors``` section of the menu. Click on ```Add Data source```.  \nSelect ```sensor```, Give the data source a Name, a associated Service domain, select ```MQTT```as protocol.\nClick ```Generate Certificates``` to generate .X509 certificates for device authentication. Download the certificates before clicking ```Next```. In the next step, add the MQTT Topic your sensor publishes it's data on.\n\n![\"MQTT topic\"](img/mqtttopic.png)\n\nGive the field a name.\nIn my example my sensor publishes on the MQTT topic ```weather\\data``` and I name the field weatherData.\n\nClick on ```Next```.  \nAssign the incoming data to the category we created earlier in this step.\n\n![\"Category map\"](img/categoryMap.png)\n\nClick on ```Create```.\n\n### Step 3 - Create a Data pipeline\n\nNext step is to connect our data source to our kafka queue using a ```Data pipeline```.  \nSelect the project we created in step 1 from the drop-down at the top of the menu on the left.\nClick on ```Functions and Data Pipelines``` in the menu and select the ```Data Pipelines``` tab.  \nClick on ```Create```\n\nGive the Data pipeline a Name  \nUnder ```Input``` select ```Data source``` and then ```IncommingData``` and ```weather``` category from step 2.  \nUnder ```Transformation``` select None.\nUnder ```Output``` select ```Publish to service domain```,  \nselect ```Kafka``` as Endpoint type and enter ```data``` as Endpoint Name.\n![\"data pipeline\"](img/dataPipeline.png)\nThis will create a Kafka topic called ```data``` automatically.\n\n\u003e It is important to name the endpoint ```data``` as this is referenced in the kafka consumer.\n\nClick on ```Create``` down in the right corner.\n\n### Step 5 - Deploy Kubernetes Applications\n\nThe next and final step is to deploy the kubernetes applications.\n\n#### *Thingsboard*\nSelect ```Kubernetes Apps``` from the menu. Click on ```Create```.\n\nEnter a name for our application.  \nSelect your Service Domain.\nClick on ```Next``` down in the right corner.\n\n![](img/addTB.png)\n\nPaste or upload the ```thingsboard.yaml``` file in the code area.\n\n![](img/tbDeployment.png)\n\nClick on ```Create``` down in the right corner.\n\nThis deployment will now deploy a single instance of Thingsboard using the image [thingsboard/tb-postgres](https://hub.docker.com/r/thingsboard/tb-postgres). This image includes a postgres database. The deployment creates a Persistent volume claim to persist data to the Service Domain.\nA ingress route is created that points to the Thingsboard instance. Once the deployment is healthy you can access Thingsboard using http://IPTOYOURSERVICEDOMAIN/\n\n#### *Kafak consumer*\n\nThis is a simple python application that consumes data from the Kafka service and inputs the data to Thingsboard using Thingsboards REST Api. It is available as an image (voxic/kttb) on dockerhub.\n\nBefore we can deploy the kafka consumer we need to set up a user in Thingsboard for API autentication.\n\nLogin to you Thingsboard instance (using http://iptoyouservicedomain).\nDefult username and password is:  \nUser: sysadmin@thingsboard.org  \nPassword: sysadmin\n\n*Create Tenant*\n\nClick on ```Tenants```\n\n![](img/tenants.png)\n\nClick on ```+``` out to the right.\nFill in tenant information and click on ```Add```.\n\n*Creat user*\n\nClick on ```Manage Tenant Admins``` on the right side\n![](img/tenantAdmin.png)\n\nClick on ```+``` out to the right.  \nFill in user information, make sure to leave the option ```Activation method``` to ```Display activation link```.  \nClick on ```Add```.  \nCopy the ```Activation link```\n![](img/activationLink.png)\nOpen a New Browser window or a Incognito tab and paste your activation link. Change ```localhost:8080``` to the IP of your Service Domain.\n\u003e Remove the :8080 part as well.\n\nCreate a password for the user.\n\n*Create device*  \nYou should now be logged in as the Tenant Administrator that you just created.\nLast step is to create a device in Thingsboard.\nClick on ```Devices``` in the menu on the left.  \nClick on ```+``` out to the right and then ```Add new device```.  \nName your device and click on ```Add``` down in the right corner.\n![](img/addDev.png)\n\nWe are now ready to deploy the Kafka consumer and start pushing data to ThingsBoard.\n\nHead to the Karbon Platform Services [portal](https://karbon.nutanix.com). Go to you project created in step 1 using the drop down menu on the left.\n\nSelect ```Kubernetes Apps``` from the menu. Click on ```Create```.\n\nEnter a name for our application.  \nSelect your Service Domain.\nClick on ```Next``` down in the right corner.\n\nPaste or upload the ```kafkaToTB.yaml``` file in the code area.\nScroll down the last section of the yaml and change the rows:\n\n```yaml\n            - name: TB_USER\n              value: tbusername \u003c---\n            - name: TB_PASSWORD\n              value: tbpassword \u003c---\n```\n\nTo the user credentials you created.\n\nClick on ```Create``` down in the right corner.\n\nThe solution is now ready to accept data from a sensor.\n\n### Send data to Karbon Platform Services\n\nThe Kafka consumer expects data to arrive as a JSON object with the following structure\n\n```json\n\n{\n    \"device\":\"dev001\",\n    \"measurement\":\"temperature\",\n    \"value\":\"0.3\",\n    \"ts\":1614801607246\n}\n\n```\n\nIf you don't have acces to sensors or other data sources I have created this simulator\nhttps://github.com/voxic/weatherstation-simulation\n\nTo send data to the Service domain, publish data to the MQTT broker running on the Service Domain and the configured topic in Step 2. Autentication to the MQTT broker is done using the Certificates downloaded in Step 2.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxic%2FThingsboard_on_KPS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxic%2FThingsboard_on_KPS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxic%2FThingsboard_on_KPS/lists"}