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

Add support for Docker Swarm #374

Closed
s4ke opened this issue Feb 2, 2023 · 2 comments · Fixed by #376
Closed

Add support for Docker Swarm #374

s4ke opened this issue Feb 2, 2023 · 2 comments · Fixed by #376
Labels
enhancement New feature or request

Comments

@s4ke
Copy link
Contributor

s4ke commented Feb 2, 2023

moby/moby released 23.0.0 which adds support for CSI volumes.

I was wondering whether this project has interest in supporting Docker Swarm.

If yes, this would be awesome. I am willing to help out here, but as a newbie when it comes to CSI, I might need some guidance
as to how the maintainers would want such an integration to look like.

Any pointers for hacking on this are welcome!

@apricote
Copy link
Member

apricote commented Feb 2, 2023

Hey @s4ke,

we are interested in Docker Swarm support, similar to Nomad support (#331). As we implement a general csi-spec compliant csi-driver, it should work with other container orchestrators that also implement the csi-spec. Our core driver does not use Kubernetes or depend on it, but we have some e2e tests and deployment manifests that are related to Kubernetes.

Docker has some docs on how to use csi-drivers: https://github.com/moby/moby/blob/master/docs/cluster_volumes.md#creating-a-docker-csi-plugin

A minimal implementation from my side requires:

  • Required configuration/manifests for adding the csi-driver to docker in deploy/docker-swarm/
  • Some docs on how users can get started using the csi-driver with docker (swarm)

For full support we would also need:

  • e2e tests to verify functionality in Docker Swarm
    • Setup Docker Swarm
    • Install csi-driver
    • Lifecycle of at least one volume and node
  • Running the e2e tests in our GitHub Action pipelines (possibly for each pull request)
  • Docs around development and testing for Docker Swarm

Based on the above linked docs I see following issues that might make this harder, both are just at a first glance and I have no experience with docker plugins, so take this with a grain of salt:

  • It looks like the docker plugin expects one binary to serve the controller and node part of the plugin. At the moment we build two binaries, one for each. As we do not want to change this for other deployment, we would need to build a third binary that starts both interfaces.
  • It looks like the docker plugin mechanism expects some specially formatted images, which we currently do not build and publish

@apricote apricote added the enhancement New feature or request label Feb 2, 2023
@olljanat
Copy link

olljanat commented Feb 5, 2023

* It looks like the docker plugin mechanism expects some specially formatted images, which we currently do not build and publish

Yes. CSI plugin support on Docker Swarm uses existing plugin support which have been there for years. I have build some example scripts and guidance to https://github.com/olljanat/csi-plugins-for-docker-swarm which you might find useful.

* It looks like the docker plugin expects one binary to serve the `controller` and `node` part of the plugin. At the moment we build two binaries, one for each. As we do not want to change this for other deployment, we would need to build a third binary that starts both interfaces.

As far I understand workaround to this is:

  • Have Docker Swarm with dedicated manager node(s).
  • Two plugins. One in type docker.csicontroller/1.0 and another on type docker.csinode/1.0
  • Install controller plugin to managers and node plugin to workers but use on both same --alias parameter value.
  • Use that alias as --driver parameter value when creating volumes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants