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 ??

질문됨 일 년 전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
전문가
답변함 일 년 전
  • @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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인