Huawei / dockyard

Container & Artifact Repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New feature: volume manager

liangchenye opened this issue · comments

Volume is a resource to a runtime, just like image. In Docker, there is a 'plugin' designation of volume management, but it combines the runtime and volume together. I think we can add a 'volume manager' feature in Dockyard to decouple them.

If we look at the reference protocols, AppC is a good example. It provides an image discovery mechanism to decouple image and runtime. Volume manager could share the similar designation, the way of using volume in containers in the future could be like this:

  1. discover the volume resources and return the volume list
  2. apply a required volume resource and return a local mount point
  3. use the mount point directly by a runtime, either in the command line or the configuration file
  4. free the used volume when the runtime exist or die.

I develop it in my branch: https://github.com/liangchenye/dockyard/tree/volume.
There are two parts:

  1. volume manger server
    It is provides the uniform interface for user to retrieve the volume resource.
    https://github.com/liangchenye/dockyard/blob/volume/volume/README.md
  2. agent
    It tells the volume manger server the volume resource on a single node and
    do the real mount/umount work.
    https://github.com/liangchenye/dockyard/blob/volume/agent/README.md

Any suggestion is welcome!

PR about the APIs is sent: #115
I'll close this issue once the PR been merged.