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.

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

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

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

관련 콘텐츠