Greengrass V2 Shadow Manager Manage all assigned devices

0

While setting up ShadowManager + MQTT Bridge + Moquette, we have the desire to configure the ShadowManager to manage all shadows for devices under its control.

By "under its control", I mean the devices you see listed if you go to Greengrass devices > Core devices > [MY GG DEVICE] > Client devices > Associated client devices

It looks like, right now, it will only sync from Greengrass-Instance -> Cloud on a "wildcard" basis (any shadow topic that pops up on the Moquette broker is automatically synced to the local shadow service regardless whether it's in the ShadowManager config), but wont necessarily sync all shadows from the Cloud -> Greengrass-Instance. We don't need all shadows, but would like to have the ShadowManager keep the assigned devices to it in-sync without having to call them out in the general group-deployment.

We're currently targeting Greengrass deployments at Groups rather than individual Greengrass-Instances, so configuring the ShadowManager during deployment wont work since each Greengrass-Instances in the group will have different device assignments. I think the workaround will be to create a union of thing-ids and just have all Greengrass-Instances under a group sync that superset.

Is there a better way to do this?

Casey
已提問 2 年前檢視次數 313 次
1 個回答
2
已接受的答案

Hi Casey,

as you mention, the cloud to ShadowManager edge sync is based purely on the configuration of the ShadowManager component. You could do as you point out, include all possible DeviceId in the Shadow Manager configuration but that will imply: 1/ all Greengrass Cores sync all the shadows with an impact on local storage 2/ depending on the number of devices you might hit a deployment document size limit

My suggestion would be to deploy just the ShadowManager component using each core device as target. In this way each configuration can be tailored to reflect the devices which are attached to the Greengrass Core device. I would recommend to implement some automatic logic to manage these deployments.

I also encourage you to create a feature request in https://github.com/aws-greengrass/aws-greengrass-shadow-manager.

Cheers,

Massimiliano

AWS
專家
已回答 2 年前
profile picture
專家
已審閱 1 個月前
  • Awesome, thank you.

    I haven't experimented much with distributing deployments across targets, so I just want to make sure I understand. We can have a deployment that targets a group with the bulk of the component configuration, minus the ShadowManager, then create unique deployments targeting each GG-Instance with just the ShadowManager. Then Nucleus will handle merging those deployments together to create the desired effective-configuration?

  • Just tested with just that and it seems all good. The effectiveConfig.yaml looks like it's keeping track of which Components came from which Deployment, which is cool.

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

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

回答問題指南