mesg-foundation / engine

Build apps or autonomous workflows with reusable, shareable integrations connecting any service, app, blockchain or decentralized network.
https://mesg.com/
Apache License 2.0
130 stars 13 forks source link

sdk/instancesdk: delete should be able to optionally delete data volumes #1069

Closed ilgooz closed 5 years ago

ilgooz commented 5 years ago

not sure about having this part on instance delete(in instancesdk) or on the service delete(but in service delete grpc api - because service cannot know about instance), @mesg-foundation/mesg-core-team feedbacks?

because it doesn't make sense for devs to delete data when stopping an instance with service:stop command. service:delete command is more related for this job

NicolasMahe commented 5 years ago

It's should be in instance.

Service are now ONLY holding the definition. Everything related to running a service in docker have to be in Instance.

ilgooz commented 5 years ago

so are we going to have the --keepData flag on service:stop cli command and once this command is executed, stop all instances belong to that service? aren't we gonna manage all instances differently for their stop ?

NicolasMahe commented 5 years ago

service:stop will stop only stop instances, it should still manage the keepData service:delete will actually remove the service, but check and return error if any instance corresponding to the service are running.