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 ?

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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ