SolidFire Native Docker Plug-In Walkthrough

dc0

 

 

Yesterday John Griffith released the first version of the SolidFire plug-in for Docker. 

Official blog from John is available here http://www.solidfire.com/blog/now-available-solidfire-plug-in-for-docker/ and includes a video of how it works. Here I go through setting up a test environment. I show the interactions with SolidFire here allowing you to see how it works.

The code itself, and comprehensive instructions are at https://github.com/j-griffith/solidfire-docker-driver. This will probably move to the official SolidFire Git repo over time. Below I have cribbed the commands I used for brevity.

 

What it does

As with our CloudStack, OpenStack and VMware integrations, it all aspects of creating persistent storage for Docker containers are fully automated. Performance guarantees can be set on each persistent data volume.

So, for example if I want a /Data persistent data area to be available when I boot a container, I use the SolidFire Docker driver and the following steps are performed:

– creating a multi-tenant user account on SolidFire

– creating a volume for the container to go in

– setting the size and QOS appropriately

– calling ISCSI and connecting to the LUN/Volume on SolidFire

– formatting the LUN and mounts it to the host the container will run on

– starting the container with mount point inserted

Getting Going

John has done a great job in documenting the installation process for docker and the necessary prerequisites and I will not repeat these in detail.

The Docker plug-in itself is written in Golang so that needs to be installed as well.

For my testing below I used a clean build of Ubuntu 14.04 from mini.iso.

The commands I used are below. My machine has a flat network for the MVIP & SVIP for accessing SolidFire which simplifies things somewhat for my use case – in most labs it is likely you will have a separa

sudo apt-get install open-iscsi
sudo apt-get install wget
wget -qO- https://get.docker.com/ | sh
docker run hello-world
apt-get install golang
edit 'export PATH=$PATH:/usr/local/go/bin' into /etc/profile
edit .bashrc & add lines 'export GOPATH=$HOME/go' 'export PATH=$PATH:$GOROOT/bin:$GOPATH/bin'
go get -u github.com/j-griffith/solidfire-docker-driver
mkdir /var/lib/solidfire

Configuring the Driver

The configuration for the driver by default goes into a file called solidfire.json that lives in /var/lib/solidfire.json. This gives directives to the volume driver for the management IP, storage IP, SolidFire account, default volume sizes, mount point for LUNs, QOS settings and ISCSI interfaces. The config file I am currently using is below:

{
"Endpoint": "https://admin:admin@192.168.56.60/json-rpc/7.0",
"SVIP": "192.168.56.61",
"TenantName": "docker",
"DefaultVolSz": 1,
"MountPoint": "/var/lib/solidfire/mount",
"Types": [{"Type": "Bronze", "Qos": {"minIOPS": 1000, "maxIOPS": 2000, "burstIOPS": 4000}},
{"Type": "Silver", "Qos": {"minIOPS": 4000, "maxIOPS": 6000, "burstIOPS": 8000}},
{"Type": "Gold", "Qos": {"minIOPS": 6000, "maxIOPS": 8000, "burstIOPS": 10000}}]
}

Running the driver

To start the driver then I go my home directory, which was where I downloaded the driver code from github.com. In go/bin the driver is started using the following command: 

sudo solidfire‐docker‐driver daemon start‐v

On running the daemon the driver first checks to see the SolidFire CHAP user account has already been created, and if not creates it. You can see it checking below and then creating the account.

dc1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Then on my previously clean SolidFire system I get:

dc2

 

 

 

 

 

 

Creating a volume

Issuing the command to create a volume is done as below. This triggers the driver to create the volume on SolidFire:

docker volume create -d solidfire --name=testvol1

This then gives me my new volume on SolidFire:

dc3

 

 

 

 

 Starting the container 

The final part is to start the container:

docker run -v testvol1:/Data --volume-driver=solidfire -i -t ubuntu /bin/bash

This will give me an interactive shell in a new base Ubuntu container. The persistent volume called Testvol1 is then presented into the container in /Data:

dc4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As we have the daemon in debug mode we can see all the background activities going on behind including formatting and ISCSI session setup:

dc6

 

 

 

 

 

 

 

 

 

 

 

Conclusion

This is a basic run through of how our plug-in works and the interactions you get with SolidFire. If you want a demo please get in touch through Twitter or Email and I will be glad to go through it with you.

 

 

 

 

 

 

 

 

Spread the word. Share this post!

Leave A Reply

Your email address will not be published. Required fields are marked *