Git Product home page Git Product logo

docker-volume-vsphere's Introduction

Build Status Go Report Card Join the chat at https://gitter.im/vmware/docker-volume-vsphere Docker Pulls VIB_Download

vSphere Docker Volume Service

vSphere Docker Volume Service (vDVS) enables customers to address persistent storage requirements for Docker containers in vSphere environments. This service is integrated with Docker Volume Plugin framework. Docker users can now consume vSphere Storage (vSAN, VMFS, NFS) to stateful containers using Docker.

vDVS is Docker Certified to use with Docker Enterprise Edition and available in Docker store.

To read more about code development and testing please read CONTRIBUTING.md as well as the FAQ on the project site.

Detailed documentation

Detailed documentation can be found on our GitHub Documentation Page.

Download

Click here to download from Github releases

The download consists of 2 parts:

  1. VIB (vDVS driver): The ESX code is packaged as a vib or an offline depot
  2. Managed plugin (vDVS plugin): Plugin is available on Docker store.

Pick the latest release and use the same version of vDVS plugin (on Docker host VM) and driver (on ESX).

Demos

The demos are located on the project site and wiki

Project Website

Project page is located @ https://vmware.github.io/docker-volume-vsphere/. Documentation, FAQ and other content can be found @ https://vmware.github.io/docker-volume-vsphere/documentation

Supported Platform

ESXi: 6.0 and above Docker: 1.12 and higher (Recommended 1.13/17.03 and above to use managed plugin)

Installation Instructions

On ESX

Install vSphere Installation Bundle (VIB). Please refer to vSphere documentation.

Install using localcli on an ESX node

esxcli software vib install -v /tmp/<vib_name>.vib

Make sure you provide the absolute path to the .vib file or the install will fail.

On Docker Host (VM)

Managed Plugin

  1. Please make sure to uninstall older releases of DEB/RPM using following commands.
sudo dpkg -r docker-volume-vsphere # Ubuntu or deb based distros
sudo rpm -e docker-volume-vsphere # Photon or rpm based distros
  1. Docker service needs to be restarted until Issue #32635 is resolved.
systemctl restart docker

For Docker 1.13 and above, install managed plugin from Docker Store.

docker plugin install --grant-all-permissions --alias vsphere vmware/docker-volume-vsphere:latest

Using DEB/RPM

For Docker 1.12 and earlier, use DEB or RPM package.

sudo dpkg -i <name>.deb # Ubuntu or deb based distros
sudo rpm -ivh <name>.rpm # Photon or rpm based distros

Note: DEB/RPM packages will be deprecated going forward and will not be available.

Using Docker CLI

Refer to tenancy documentation for setting up tenants.

# To select datastore use --name=MyVolume@<Datastore Name>
$ docker volume create --driver=vsphere --name=MyVolume -o size=10gb
$ docker volume ls
$ docker volume inspect MyVolume
# To select datastore use MyVolume@<Datastore Name>
$ docker run --rm -it -v MyVolume:/mnt/myvol busybox
$ cd /mnt/myvol # to access volume inside container, exit to quit
$ docker volume rm MyVolume

Using ESXi Admin CLI

$ /usr/lib/vmware/vmdkops/bin/vmdkops_admin.py volume ls

Logging

The relevant logging for debugging consists of the following:

  • Docker Logs
  • Plugin logs - VM (docker-side)
  • Plugin logs - ESX (server-side)

Docker logs: see https://docs.docker.com/engine/admin/logging/overview/

/var/log/upstart/docker.log # Upstart
journalctl -fu docker.service # Journalctl/Systemd

VM (Docker-side) Plugin logs

  • Log location: /var/log/docker-volume-vsphere.log
  • Config file location: /etc/docker-volume-vsphere.conf.
  • This JSON-formatted file controls logs retention, size for rotation and log location. Example:
 {"MaxLogAgeDays": 28,
 "MaxLogSizeMb": 100,
 "LogPath": "/var/log/docker-volume-vsphere.log"}
  • Turning on debug logging:

    • Package user (DEB/RPM installation): Stop the service and manually run with --log_level=debug flag

    • Managed plugin user: You can change the log level by passing VDVS_LOG_LEVEL key to docker plugin install.

      e.g.

      docker plugin install --grant-all-permissions --alias vsphere vmware/docker-volume-vsphere:latest VDVS_LOG_LEVEL=debug
      

ESX Plugin logs

  • Log location: /var/log/vmware/vmdk_ops.log
  • Config file location: /etc/vmware/vmdkops/log_config.json See Python logging config format for content details.
  • Turning on debug logging: replace all 'INFO' with 'DEBUG' in config file, restart the service

Tested on

VMware ESXi:

  • 6.0, 6.0U1, 6.0U2
  • 6.5

Guest Operating System:

Docker: 1.12 and higher (Recommended 1.13/17.03 and above to use managed plugin)

Known Issues

  • Volume metadata file got deleted while removing volume from VM(placed on Esx2) which is in use by another VM(placed on Esx1) #1191. It's an ESX issue and will be available in the next vSphere release.
  • Full volume name with format like "volume@datastore" cannot be specified in the compose file for stack deployment. #1315. It is a docker compose issue and a workaround has been provided in the issue.

Contact us

Public

Blogs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.