Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
akalipetis opened this issue Jul 18, 2017 · 7 comments · Fixed by #360
Closed

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

akalipetis opened this issue Jul 18, 2017 · 7 comments · Fixed by #360

Comments

@akalipetis
Copy link
Contributor

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.

@dnephin
Copy link
Contributor

dnephin commented Jul 18, 2017

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

@akalipetis
Copy link
Contributor Author

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

@dnephin
Copy link
Contributor

dnephin commented Jul 18, 2017

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

@akalipetis
Copy link
Contributor Author

akalipetis commented Jul 19, 2017

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

@dnephin
Copy link
Contributor

dnephin commented Jul 19, 2017

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

I've opened #358 with the commit

@akalipetis
Copy link
Contributor Author

Thanks 👍 cherry-picked and opened #360 🎉

@dipanjanmukherjee83
Copy link

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants