Skip to content

Include an "order" key in the "update_config" #346

Closed

Description

@akalipetis

When updating a Docker service, the following option exists:

      --update-order string                Update order ("start-first"|"stop-first")

This can be used to create rolling update deployments, even if a service has just one replica.

I propose adding the following key to the Docker Compose spec, which will allow for these updates to work with docker deploy -c ....

    deploy:
      replicas: 1
      update_config:
        parallelism: 1
        order: start-first | stop-first

I would be happy to contribute the needed code if that's something we'd like to have in the spec.

Activity

  1. dnephin commented on Jul 18, 2017

    @dnephin
    Contributor

    Sounds good. This should go into v3.4, with #305 and #306

  2. akalipetis commented on Jul 18, 2017

    @akalipetis
    ContributorAuthor

    Cool @dnephin, I can draft a PR if you'd like within the week 😄

  3. dnephin commented on Jul 18, 2017

    @dnephin
    Contributor

    That would be great. Just cherry-pick the first commit from #306 to get the new v3.4 schema file

  4. akalipetis commented on Jul 19, 2017

    @akalipetis
    ContributorAuthor

    Hello @dnephin - 5b43e14 seems to change the v3.3 format, not v3.4, am I missing something?

    Also, is there a way I can populate the format, after adding the new options to config_schema_v3.4.json? Sorry if that's too obvious 😇

    Here's a first implementation, which currently fails because of the format not being there: akalipetis@1de7d37

  5. dnephin commented on Jul 19, 2017

    @dnephin
    Contributor

    Ah sorry. My commit from #306 was dropped with a force push I guess.

    I've opened #358 with the commit

  6. akalipetis commented on Jul 19, 2017

    @akalipetis
    ContributorAuthor

    Thanks 👍 cherry-picked and opened #360 🎉

  7. dipanjanmukherjee83 commented on Feb 28, 2019

    @dipanjanmukherjee83

    Can we use it as a zero downtime deployment during docker service update. In docker docs I could not find any real life example for using this option. Could you please give us some brief how does this new option works. we have a Global mode service running and if we add this option in stack file how at the same time both the containers will access the same port. Because as per our understanding when the new task or container become ready in our case curl that port then old task or container will be shutdown. So at one moment there would be port conflict happened. Or the theory is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions