At NetApp Insight this year I had the privilege of being on stage for the day three keynote, along with two of NetApp’s finest: Garrett Mueller and Josh Atwell. The three of us delivered an unconventional, but well received, “demo” around the concept of DevOps and what continuous integration and continuous deployment look like in reality. While this was very interesting, and hopefully eye opening, for many people, this post will focus on a feature in the NetApp Docker Volume Plugin (nDVP) which we very quietly announced during the keynote presentation.
During the “fix” phase of the demo we showed the cloning of a Docker volume from a snapshot for use by the application. While this isn’t something terribly exciting for many storage, or even infrastructure, administrators, it’s not normally a feature that application developers have direct access to. We are extremely happy to announce that the nDVP has the ability to create volume clones directly from the
docker volume interface for both ONTAP and SolidFire systems. This means that by simply supplying the source volume, and optionally the source snapshot name, a volume can quickly, easily, and seamlessly be created by the Docker user for development, test, and recovery, or any other purpose you choose.
Cloning Your Data
Creating a clone is exactly as easy as you would expect. The nDVP was enhanced in version 1.3, which works with Docker 1.12, to report snapshots when doing a
docker volume inspect. We then use this information to create a new Docker volume by passing just two parameters to the
docker volume create command.
Let’s look at an example of how to use this functionality:
# create an NFS volume
docker volume create -d ontap-nas --name demoVolume
# inspect the original, note there are no snapshots
docker volume inspect demoVolume
# create a new volume from the original
docker volume create -d ontap-nas --name demoVolumeClone -o from=demoVolume
# inspect the original, note that a new snapshot has been created
docker volume inspect demoVolume
# remove the cloned volume
docker volume rm demoVolumeClone
Alternatively, if your volume has an existing snapshot, you could use that as the source for your new volume. When we inspect the volume using
docker volume inspect we can see a listing of the snapshots associated with it.
Armed with the name of the snapshot we can create a new volume from it:
# create a cloned volume from an existing snapshot
docker volume create -d ontap-nas --name demoVolumeClone2 -o from=demoVolume -o fromSnapshot="hourly.2016-11-23_0905"
Making Storage Work For You
Data is the most critical component of any application. Making your data more accessible and consumable across all phases of the application life cycle enhances its value even further. Using a storage system which facilitates that functionality ensures happy developers, and happier applications. The new functionality in the nDVP makes it that much simpler for the application developers and administrators to use the functionality which is critical to their success, all without having to rely on or wait for anyone else.
If you’re interested in using this functionality, be sure to check out nDVP version 1.3 with Docker 1.12+. There’s full details on the GitHub repo on how to get started with the NetApp Docker Volume Plugin. Creating volume clones has many different use cases, not just the recovery scenario we showcased during the keynote. Creating test and development environments, validating data integrity, data analytics, and so much more become easier. Layering on functions of the storage platforms, like quality of service, ensure that the production environment is truly isolated from any additional functionality you may discover for your data. Empower the developer, see what they can do!
If you have any questions please join us in the Slack channels or send an email to firstname.lastname@example.org! Or, you can reach out to us on the developer community, developer.netapp.com. We love hearing from you and learning about your challenges!