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

storage_opt for Compose version 3 #1177

Open
Gabology opened this issue Jul 2, 2018 · 14 comments
Open

storage_opt for Compose version 3 #1177

Gabology opened this issue Jul 2, 2018 · 14 comments

Comments

@Gabology
Copy link

Gabology commented Jul 2, 2018

Currently it looks like only version 2 Compose files support storage_opt. It would be a very useful addition if support for storage_opt was extended to version 3 as well.

@marzlarz
Copy link

This would be very helpful ... I don't understand why this option is missing in v3.

@olljanat
Copy link
Contributor

Reason why some v2 features are missing from v3 is that it have been completely rewritten.

Feel free to create PR of this feature.

@IvanBoyko
Copy link

Funny.... feature was silently removed.
And to have it again, you need to implement it yourself.

Another reason to go Kubernetes way.

@olljanat
Copy link
Contributor

olljanat commented Nov 8, 2018

@IvanBoyko just to correct that misunderstanding. Support for this feature have not been ever implemented for Swarm (it is not implemented even for docker service create command yet moby/moby#28619), only for standalone containers.

Whole list of missing service create / update options are listed on moby/moby#25303

It is known thing that Docker, Inc does not have similar resources than Google do so that why they cannot implement new features on same speed.

Reason why it works on Kubernetes is that it actually uses docker run command to start containers.

What comes to that how to get support for these features to Swarm you have basically three options:

  • Buy Docker Enterprise Edition and make feature request so it will get priority.
  • Implement PR yourself.
  • Wait that someone else will do one of these.

And just to clarify I have nothing to do Docker, Inc I'm just one happy Swarm user who don't want Kubernetes complexity and who try help users to get these minor things fixed and fixing the ones which I have seen on our env.

@IvanBoyko
Copy link

IvanBoyko commented Nov 8, 2018

Thank you for the clarification.

I've tried even using compose v2, but it's not supported anymore by the latest versions of Docker Engine.
Compatibility between Docker components is always a problem (more so in EE).
Documentation is often missing, like in this case of storage_opt - it's not even in the list of removed options in compose v3: https://docs.docker.com/compose/compose-file/compose-versioning/#version-3

Well, I'm personally choosing the 4th way - move to Kubernetes.
I've been fighting the urge to do so, building custom things around Swarm, but this increases complexity even more than migration to Kubernetes.
storage_opt is only one of my problems with Swarm.

"Buy Docker EE" - is that even an option?
I hope you have seen the prices, and tried installing it yourself.
Complexity is horrifying (I know, I've got a Certificate a year ago), at least matching Kubernetes, but without the same Google\community support as you mentioned.

Pay and pray that they implement your request OR go with free Kubernetes where it's already done?

@olljanat
Copy link
Contributor

olljanat commented Nov 8, 2018

I've tried even using compose v2, but it's not supported anymore by the latest versions of Docker Engine.

Hmm. Afaik compose v2.4 should be there still on latest versions but it only works on non-swarm mode.

Documentation is often missing, like in this case of storage_opt - it's not even in the list of removed options in compose v3: https://docs.docker.com/compose/compose-file/compose-versioning/#version-3

v2.x => standalone mode, v3.x => swarm mode. Most of options are compatible but technically they are two totally different implementations. But I agree that documentation on that area should be improved.

Well, I'm personally choosing the 4th way - move to Kubernetes.
I've been fighting the urge to do so, building custom things around Swarm, but this increases complexity even more than migration to Kubernetes.
storage_opt is only one of my problems with Swarm.

Yea it really depends on use cases which one works best. That why there are option to choose between Swarm and Kubernetes. Luckily on recent versions Docker CLI also supports Kubernestes workloads (e.g. docker stack deploy --kubeconfig ) so it is bit easier to switch between these.

"Buy Docker EE" - is that even an option?
I hope you have seen the prices, and tried installing it yourself.
Complexity is horrifying (I know, I've got a Certificate a year ago), at least matching Kubernetes, but without the same Google\community support as you mentioned.

Sure I have. It really depends on about environment. It is good options to many business critical environments where stability is more important than have all recent features in available.

Pay and pray that they implement your request OR go with free Kubernetes where it's already done?

Like I said earlier. I really depends on use cases. E.g. Windows support on Kubernetes and especially its management tools Rancher/OpenShift are not even near production ready so it is not option for us at least yet.

Anyway, lets end this off-topic discussion about Kubernestes on here and continue example on Slack if needed.

@thaJeztah
Copy link
Member

The V2 and V3 formats target a different audience, where V2 is more for local development (running local containers) and use with docker-compose, whereas V3 is targeting deployment as services (Swarm or Kubernetes). V3 therefore has some options that may not be in V2, and is missing some features that won't work in a cluster deployment. Because of this, the V2 format also isn't fully "frozen"; features can still be added in minor updates to the V2 schema.

Also see docker/docs#7593, which is a pull-request to clarify the documentation.

In this particular case; the storage_opt option was added to the V2 compose format, because it's targeting deployment as containers (not services); docker/compose#4680 (comment) (continued in docker/compose#4956). This addition was made after the V3 format already existed, which is likely why it was not listed under the list of options that were " removed" from the format. It does make sense to amend that part of the documentation though (
https://docs.docker.com/compose/compose-file/compose-versioning/#version-3), if someone wants to open a pull request to do so.

Actually; looks like storage_opt was not mentioned in that changelog at all, so possibly it was missed in updating the docs

@olljanat
Copy link
Contributor

olljanat commented Nov 8, 2018

whereas V3 is targeting deployment as services (Swarm or Kubernetes).

Is it possible to use compose file with Kubernetes? 😮
docker stack deploy command supports Kubernetes but afaik you need use --kubeconfig parameter with their syntax.

@thaJeztah
Copy link
Member

On Docker Desktop and Docker Enterprise, you can. It currently requires a server-side component that is not (yet?) open-source (it doesn't ship with the Docker CE "engine" packages, but is included in Docker Desktop (Docker for Mac/Windows) for local Kubernetes development)

@Petersdavis
Copy link

!upvote would be nice to see this feature re-implemented

@thoriqsatriya
Copy link

still waiting this to be implemented

@amonaco
Copy link

amonaco commented May 12, 2021

Wow, still not implemented... This was a feature in v2 which was removed in v3 so maybe "porting" is a better word than "implementing"

@ndeloof
Copy link
Contributor

ndeloof commented Jun 4, 2021

Compose file format is now managed by the compose-spec.io
This one supports all of the V2 and V3 legacy formats, as a "version-less" compose file.

But docker stack does not yet implement the compose-spec

@YangShizhao
Copy link

same issue, same disappointed.

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

No branches or pull requests

10 participants