Component not stopped on new deployment

0

I am trying out GreenGrass v2 to see if it would fit our need to deploy our stack using docker-compose to our IoT devices. I have followed the steps here and setup a device with a deployment (i.e. 1.0.1).

I am not exactly clear how components interact with docker-compose, it seems that even when I stop a container manually, it will reset on reboot. That is not a problem, but it also looks like when I publish a new deployment (i.e. 1.0.2), I still have containers from 1.0.1 still running, which ends up throwing errors because they are trying to access the same ressource.

What is the correct approach to stop the docker-compose stack when I deploy a new update ?

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

Hi TSpark,

Thank you for your question. You should utilize the shutdown lifecycle step to call docker-compose down for example. The shutdown step is called when Greengrass stops or when the component will be updated. Therefore, you should write whatever commands are needed to safely and completely shutdown your component.

AWS
專家
已回答 2 年前
  • Awesome that is what I was looking for. Thanks ! Additionally, is there a way to see the status of containers on the devices through AWS ? Something similar to portainer or docker ps ?

  • No, there isn't any way provided by Greengrass to show your containers. Only the component status is reported to the cloud.

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

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

回答問題指南