-
Notifications
You must be signed in to change notification settings - Fork 88
Support for building DVS as Docker Managed Plugin. #1006
Conversation
Docker managed plugins are currently documented [here](https://docs.docker.com/engine/extend/) This PR introduces new folder `./plugin`. Running `make all` in this folder will assume that the DVS is pre-built and dockerhub is authenticared with (`docker login`), then it will package DVS as a Managed Plugin, and push to dockerhub. See Makefile for name/tag and location. Assuming the Makefile defines names as 'cnastorage/docker-volume-vsphere:0.12', this plugin then could be installed on Docker (1.13+) as follows: * no question asked, and pretend the plugin name is 'vsphere' (can be used in `volume create` and `plugin rm` ``` docker plugin install --grant-all-permissions --alias vsphere cnastorage/docker-volume-vsphere:0.12 ``` * vanilla interactive install as disabled ``` docker plugin install --disable cnastorage/docker-volume-vsphere:0.12 ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! Looks good to me as long as it does what it is supposed to do :-)
One comment below otherwise LGTM.
plugin/Makefile
Outdated
BINARY := docker-volume-vsphere | ||
BIN_LOC := ../build | ||
|
||
# Tmp docker image used to constuct rootfs + our banaries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo banaries => binaries
plugin/config.json
Outdated
"Documentation": "http://vmware.github.io/docker-volume-vsphere/documentation", | ||
"Entrypoint": ["/usr/bin/docker-volume-vsphere", "--log_level", "info"], | ||
"PropagatedMount": "/mnt/vmdk", | ||
"Mounts": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about "/etc/" for /etc/docker-volume-vsphere.conf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah. I did not want to open up all important folders. I think I will change it to /etc/vmware/ and open /etc/vmware. Comments ?
USER := cnastorage | ||
|
||
PLUGIN_NAME=$(USER)/docker-volume-vsphere | ||
PLUGIN_TAG=0.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Later we will have to find a way to separate dev builds from release tags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
d7d699b
to
a71346e
Compare
See issue #886
Docker managed plugins are currently documented here
This PR introduces new folder
./plugin
. Runningmake all
in this folder will assume thatthe DVS is pre-built and dockerhub is authenticared with
docker login
, then it will package DVSas a Managed Plugin, and push to dockerhub.
Note that this is not integrated with Build or CI - since we do Build under Docker, a bit more work is needed in central Makefile and drone script - I will do it in a separate PR if this one will be approved/merged soon, or in an extension to this one if it will still be in review.
See Makefile for name/tag and location.
Assuming the Makefile defines names as 'cnastorage/docker-volume-vsphere:0.12', the plugin could
be installed on Docker (1.13+) as follows:
volume create
andplugin rm
)docker plugin enable
to be operationalThe
docker volume
command behaves as before but the plugin name indocker create
is either what was passed as--alias
or the full plugin name , i.e.cnastorage/docker-volume-vsphere:0.12