Wait for Stacks to attain State: Running Before Continuing #27

Open
opened 2023-08-21 14:56:39 +02:00 by so-rose · 0 comments

Just like we do with DNS propogation, we should wait for the stack to actually run before moving on. This would ensure that other roles, ex. API-driven configuration of a newly-deployed service, are (mostly!) guaranteed to be able to talk to a thing that works - and that the user is more likely to be told when something happens that prevents the stack from actually running.

stack deploy has no mechanism for this, but an until loop can get the job done. The docker_stack_info module is also well-suited to scan for this information in an ansible-based until directive, just like in the DNS stacks.

Here's the issue about this need (on CLI, not ansible, but they are related), with relevant inspiration: https://github.com/moby/moby/issues/30942

Just like we do with DNS propogation, we should wait for the stack to *actually run* before moving on. This would ensure that other `role`s, ex. API-driven configuration of a newly-deployed service, are (mostly!) guaranteed to be able to talk to a thing that works - and that the user is more likely to be told when something happens that prevents the stack from actually running. `stack deploy` has no mechanism for this, but an `until` loop can get the job done. The `docker_stack_info` module is also well-suited to scan for this information in an `ansible`-based `until` directive, just like in the DNS stacks. Here's the issue about this need (on CLI, not `ansible`, but they are related), with relevant inspiration: <https://github.com/moby/moby/issues/30942>
so-rose added the
enhancement
deployment-usability
labels 2023-08-21 14:56:39 +02:00
so-rose added this to the Refactor and Cleanup project 2023-08-21 14:56:40 +02:00
Sign in to join this conversation.
There is no content yet.