Greengrass v2 # ThingGroup # Flexibility for Tenant use case

0

Need help with following use case. I am working on use case where I need tenant bifurcation on device. For e.g I have Tenant1 and Tenant 2. In Tenant 1 I have sell 3 devices and in Tenant 2 sold 5 devices.

To manager tenant I need to create logical group which I can achive through Thing Group.

**Tenant_Thing_Group1**
	- Thing_1
	- Thing_2
	- Thing_3
	
**Tenant_Thing_Group2**
	- Thing_4
	- Thing_5
	- Thing_6
	- Thing_7
	- Thing_8
	

Now I am going to use AWS greengrass v2 for components deployment and all. I have taken greengrass setup in my yocto OS setup recipe. But as per my experience whenever we trigger greengraa v2 command to create deployment. It would create individual deployment for each device. Instead of that I want to use the single deployment per tenant so I can deploy changes in single go to all the devices.

Could please guide me of provide some steps to address this requirement ??

已提問 1 年前檢視次數 231 次
1 個回答
0

Hi,

Greengrass supports deploying to both Things and Thing Groups as targets.

Given your setup, to deploy specific components to all the Tenant 1 devices you can create a deployment targeting Tenant_Thing_Group1. The same applies to devices for Tenant 2 using Tenant_Thing_Group2 as a target.

If you need to deploy components which are common to all devices, you can create another Thing Groups, let's call it for example AllDevices, and create a deployment with the common components targeting that thing group.

Keep in mind that component configurations specified in a deployment applies to all targeted devices. If you need to deploy the same component but have device specific configurations you can use device shadows to hold the device specific configurations.

Cheers,

Massimiliano

AWS
專家
已回答 1 年前
  • @Massimiliano,

    Thanks for the response. I got that there is provision to select thing group and choose target deployment. Now as per my understanding greengrass first required to be installed on device. And for installation we are following the steps mentioned on following page.

    https://docs.aws.amazon.com/greengrass/v2/developerguide/quick-installation.html

    Now as per the steps if we trigger the following command it would create deployment too on cloud. Which would individual deployment per device which actually we don't want.

    sudo -E java -Droot="/greengrass/v2" -Dlog.store=FILE
    -jar ./GreengrassInstaller/lib/Greengrass.jar
    --aws-region region
    --thing-name MyGreengrassCore
    --thing-group-name MyGreengrassCoreGroup
    --thing-policy-name GreengrassV2IoTThingPolicy
    --tes-role-name GreengrassV2TokenExchangeRole
    --tes-role-alias-name GreengrassCoreTokenExchangeRoleAlias
    --component-default-user ggc_user:ggc_group
    --provision true
    --setup-system-service true

    Is there a way we can first create only things and map those things to thing group. Second, we would have one greengrass deployment for single device which would like our QA environment. Third, the moment we got green signal from QA team we would use this target deployment and push all those components deployed on QA device to entire thing group.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南