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 Antwort
2
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 2 Jahren
  • 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.

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen