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.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则