Site icon Ron Ekins' – Oracle Technology, DevOps and Kubernetes Blog

Docker Volume plugin for Pure Storage

You may have noticed that you can now download a Docker Volume Plugin for Pure Storage from the Docker Store. The Pure Storage Docker Volume plugin provides seamless integration with Docker containers, enabling persistent storage which is a must for many enterprise and database applications

Pure Docker Plug-in Installation

If you have not already installed docker you need to do this first, see my previous Blog Docker installation on Linux for details.

Ok, lest install the Pure Docker plug-in.

# docker plugin install store/purestorage/docker-plugin:2.0 –alias pure –grant-all-permissions
2.0: Pulling from store/purestorage/docker-plugin
313f5ed5ee16: Download complete
Digest: sha256:607837553036107dfccf14870e500fa3b3bdab343f111d0ac58af1b8351d7f31
Status: Downloaded newer image for store/purestorage/docker-plugin:2.0
Installed plugin store/purestorage/docker-plugin:2.0

Docker Plugin Management

We can manage Docker plugins with the docker plugin command e.g.

# docker plugin
Usage: docker plugin COMMAND
Manage plugins
Options:
Commands:
create         Create a plugin from a rootfs and configuration. Plugin data directory must contain config.json and rootfs directory.
disable       Disable a plugin
enable        Enable a plugin
inspect       Display detailed information on one or more plugins
install         Install a plugin
ls                  List plugins
push            Push a plugin to a registry
rm               Remove one or more plugins
set               Change settings for a plugin
upgrade     Upgrade an existing plugin

Run ‘docker plugin COMMAND –help’ for more information on a command.

Let’s check out the status of our Pure Docker plugin with

# docker plugin ls
ID                          NAME                DESCRIPTION                                  ENABLED
0b4ab7efeb3f      pure:latest        Pure Storage plugin for Docker   true

Once installed the first thing you must do is to let the Volume plugin know about your Pure FlashArray, update /etc/pure-docker-plugin/pure.json to use your FlashArray’s management (not iSCSI) IP address and API Token.

Example pure.json file for FlashArray

Substitute values for the MgmtEndPoint and APIToken fields with values specific to your FlashArray.

{
     "FlashArrays":[
         {
             "MgmtEndPoint":"1.2.3.4",
             "APIToken":"661f9687-0b1e-7b0d-e07d-1e776d50f9eb"
         }
     ]
 }

Create a Volume

You can create a Pure Storage FlashArray volume from your Linux server using the docker volume create command.

# docker volume create –driver=pure -o size=100GB –name=ron101 –label=ron
ron101

You should now be able to see the newly created volume within the Pure Storage FlashArray.

List a Volume

You can also use the docker volume ls command and filters to show available volumes.

# docker volume ls -f name=ron
DRIVER              VOLUME NAME
pure                ron100
pure                ron101

Inspect a Volume

You can use the docker volume inspect command to get a bit more info and to also see where it’s being used.

[root@z-oracle pure-docker-plugin]#  docker volume inspect ron101
[
    {
        "Driver": "pure:latest",
        "Labels": {
            "ron": ""
        },
        "Mountpoint": "/var/lib/docker/plugins/55d3765fafd49e915dc95f791c6f06a0d4207e50c453c4b175a6f18e9f23ed12/rootfs",
        "Name": "ron101",
        "Options": {
            "size": "100GB"
        },
        "Scope": "global"
    }
]

Delete a Volume

The Pure Storage Volume plugin also supports volume delete.

# docker volume rm ron101
ron101
# docker volume ls -f name=ron
DRIVER              VOLUME NAME

In this Blog I have shared how we can create, inspect and delete Docker Volumes using the Pure Storage Docker Volume plug-in, in my next post I will share you you can use these volumes for persistent database storage.

Check-out the Pure Storage Developer Community for more examples.

[twitter-follow screen_name=’RonEkins’ show_count=’yes’]

Exit mobile version