vmware-archive / vsphere-storage-for-docker

vSphere Storage for Docker
https://vmware.github.io/vsphere-storage-for-docker
Apache License 2.0
251 stars 95 forks source link

Docker-in-VIC (DinV) support #2020

Closed Manouchehri closed 6 years ago

Manouchehri commented 6 years ago

While obviously vDVS won't work on VIC (no plugin support), it'd be nice if there was support for Docker Container Host (DCH) deployments (DinV).

Steps to reproduce:

vic-machine-linux create --target test.github.local --user root --no-tlsverify --volume-store Flare:default --image-store Kick --container-network dock --endpoint-memory 16384 --endpoint-cpu 16
docker -H 10.0.10.1:2376 --tls run --name dch -d --memory 4gb --cpuset-cpus 16 --network dock -p 2375:2375 vmware/dch-photon # `10.0.10.1` is the VIC.

10.0.10.2 is the DCH.

mbp:~ dave$ docker -H 10.0.10.2:2375 plugin install --grant-all-permissions --alias vsphere vmware/docker-volume-vsphere:latest
latest: Pulling from vmware/docker-volume-vsphere
02e8261a48e0: Download complete
Digest: sha256:449b93f410f869f4780e2b25b79da3e20fddd00a17b866756fc8feda040f6091
Status: Downloaded newer image for vmware/docker-volume-vsphere:latest
Installed plugin vmware/docker-volume-vsphere:latest
mbp:~ dave$ docker -H 10.0.10.2:2375 volume create --driver=vsphere --name=dchvsphere -o size=1gb
Error response from daemon: create dchvsphere: VolumeDriver.Create: Failed to create filesystem on /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:3:0: exit status 1. Output = mke2fs 1.43.3 (04-Sep-2016)
The file /dev/disk/by-path/pci-0000:03:00.0-scsi-0:0:3:0 does not exist and no size was specified.

Related to #56.

govint commented 6 years ago

@Manouchehri is the /dev dir in the VIC bound to the photon container, that would be needed if the photon-DCH can see the /dev/disk.... files to be able to mount the attached volume inside the container. The vDVS plugin does have /dev bound to it but in this case thats just the /dev inside the photon-DCH which can't see the devices attached to the VIC-container.

You would need to run the photon-DCH with the /dev of VIC bound to it and the vDVS plugin will need an enhancement to use an env var. to select the location at which to find the volume devices.

What's the use case that requires using VIC to run docker hosts? Is it to by-pass say a vSphere client to provision VMs on ESX hosts?

govint commented 6 years ago

Closing as we don't have a use case that needs this support.