Pure Storage Docker Plugin

This is a quick guide and how to install the Pure plugin for docker 1.13 and above. For full details check out Pure Volume Plugin on Store.docker.com.

Requirements

 

Operating Systems Supported

CentOS Linux 7.3
CoreOS (Ladybug 1298.6.0 and above)
Ubuntu (Trusty 14.04 LTS, Xenial 16.04.2 LTS)
Environments Supported

Docker 1.13+ I am on 17.03-ce
Swarm
Mesos 1.8 and above
Other dependencies

Latest iSCSI initiator SW
Latest Multipath package (This made a difference for me on Ubuntu remember to update!)

Hosts Before

media_1501006005257.png

Here I am just listing the Pure hosts on my array before I install the plugin.

Volumes Before

media_1501006035507.png

Also listing out my volumes, these are all pre-existing.

Pull and Install the plugin (Docker 1.13 and above)

Create /etc/pure-docker-plugin/pure.json

media_1501006093681.png

edit the file pure.json in /etc/pure-docker-plugin and add your array and API token
to get a token from the Pure CLI – (or go to the GUI of the array and copy the API token for your user).

 

pureeadmin create –api-token [user]
pureadmin list –api-token [user] –expose

Pull the plugin and Install

media_1501006156094.png

docker plugin install store/purestorage/docker-plugin:1.0 –alias pure

Grant the plugins to the directories it requests.

Done. Easy.

For Docker Swarm

Setting the PURE_DOCKER_NAMESPACE variable can be done with the command:

docker plugin set pure PURE_DOCKER_NAMESPACE=<clusterid>

My next blog post will dive more into setting up the plugin with Docker Swarm. The clusterid is just a unique string. Keep it simple.

Test it

media_1501006217870.png

$docker volume create -d pure -o size=200GiB Demo

Remember if you want to create the volume with other units the information is in the README but here it is for now:<Units can be specified as xB, xiB, or x. If no units are specified MiB is assumed.

My host created by the plugin

media_1501006373816.png

Now that I created a volume on the array the host docker01 is now added to the list of hosts. The plugin automates adding the iSCSI IQN and creating the host.

My new volume all ready to go

media_1501006405843.png

You also see the docker01-Demo is listed and sized to my requested 200GiB The PURE_DOCKER_NAMESPACE will prepend the volume name you create. The default will use the docker hostname. In a Mesos and Swarm environment the namespace setting mentioned above is used. This is only identified this way on the array.

Now the volume can be mounted to a container using

 

#docker run –volume Demo:/data [image] [command]
You could also create a new volume and mount it to a container all in the same line with:

 

#docker run –volume-driver pure –volume myvolume:/data [image] [command]

UNMAP – Do IT!

Pretty sure my friend Cody Hosterman has talked about this until he turned blue in the face.  Just a point I want to quickly re-iterate here for the record. Run unmap on your vSphere Datastores.

Read this if you are running Pure Storage, but even if you run other arrays (especially all-flash) find a way to do UNMAP on a regular basis:

http://www.codyhosterman.com/2016/01/flasharray-unmap-script-with-the-pure-storage-powershell-sdk-and-poweractions/

Additionally, start to learn the ins-n-outs of vSphere 6 and automatic unmap!

http://blog.purestorage.com/direct-guest-os-unmap-in-vsphere-6-0-2/

Speaking of In-n-out…. I want a double double before I start Whole 30.

in-n-out

Pure ELK Dashboards

Previously I blogged about getting PureELK installed with Docker in just a couple of minutes. After setting up your intitial array’s you may ask what is next?

Loading a preconfigured PureELK Dashboard

media_1450716163834.png

Click load saved dashboard and select one of the Pure Storage dashboards.

media_1452264626343.png

Remember there is a 2nd page page of Dashboards.

Pure Main Dashboard

media_1452264823321.png

Top 10 Volumes

media_1452264957200.png

Alert Audit

media_1452265011249.png

Max vs Average Pure Performance

media_1452265066174.png

Pure Space Analysis

media_1452265121910.png

Space Top – Bar Charts

media_1452265175795.png

Volume List View – Space and Performance

media_1452265229517.png

You can see there are several pre-made dashboards that you can take advantage of. What if you wanted to make your own Dashboard.

Create your Own Dashboard

media_1452265517171.png

To create your own Dashboard:
1. Click the Plus to Add a Visualization
2. Select a visualization
3. Once you have all of your Visualizations added you can click the Save icon and keep your new Dashboard for later use.

Some tips is you can resize and place the visualization anywhere you like on the dashboard. Just remember to click save. Also, You can can use the powerful seach feature to create tables of useful information that you are looking for.

 

Easy Storage Monitoring – Setting Up PureELK with Docker

[UPDATE June 2016: Appears this works with Ubuntu only, maybe a debian flavor. I am hearing RHEL is problematic to get the dependencies working.]

I have blogged in the past about setting up vROPS (vCOPS) and Splunk to monitor a Pure Storage FlashArray using the REST API. Scripts and GETs and PUTs are fun and all but what if there was a simple tool you can install to have your own on site monitoring and analytics of your FlashArrays?

Enter Pure ELK. Some super awesome engineers back in Mountain View wrote this integration for Pure and ELK and packaged it an amazingly easy insatllation and released it on Github! Open Source and ready to go!
https://github.com/pureelk

and

http://github.com/pureelk/pureelk

Don’t know Docker? Cool we will install it for you. Don’t know Kibana or elasticsearch? Got you covered. One line in a fresh Ubuntu install (I used Ubuntu but I bet your favorite flavor will suffice).

go ahead and try:

curl -s https://raw.githubusercontent.com/pureelk/pureelk/master/pureelk.sh | bash -s install

(fixed url to reflect no longer in Dev)

This will download and install docker, setup all the dependencies for Pure ELK and let you know where to go from your browser to config your FlashArrays.

I had one small snag:

Connecting to the Docker Daemon!

media_1450716022076.png

My user was not in the right group to connect to docker the first time. The Docker install when it is not automated actually tells you to add your user to the “docker” group in order to

$sudo usermod -aG docker [username]

Log out and back in that did the trick. If you know a better way for the change to be recognized without logging out let me know in the comments.

I re-ran the install
curl -s https://raw.githubusercontent.com/pureelk/pureelk/dev/pureelk.sh | bash -s install

In about 4 minutes I was able to hit the management IP and start adding FlashArrays!

Quickly add all your FlashArrays

media_1450715719804.png

Click the giant orange PLUS button.

This is great if you have more than one FlashArray. If you only have one it still works. Everyone should have more Flash though right?

media_1450715771293.png

Fill in your FlashArray information. You can choose your time-to-live for the metrics and how often to pull data from the FlashArray

Success!

media_1450715937834.png

I added a couple of arrays for fun and then clicked “Go to Kibana”
I could have gone to
https://[server ip]:5601

Data Already Collecting

media_1450716109188.png

This is just the beginning. The next post I will share some of the pre-packaged dashboards and also some of the cusotmizations you can make in order to visualize all the Data PureELK is pulling from the REST API. Have fun with this free tool. It can be downloaded and setup in less than 10 minutes on a linux machine, 15 minutes if you need to build a new VM.

PureStorage + REST API + Splunk = Fun with Data about Data

A few months back I posted a powershell script to post Pure Storage data directly into VMware vCenter Operations Manager (now called vRealize Operations). Inspiration hit me like a brick when a big customer of mine said, “Do you have a plugin for Splunk?”

He already wrote some scripts in python to pull data from our REST API. He just said, “Sure wish I didn’t have to do this myself.” I took the hint. Now I am not a python person, so I did the best I could with the tools I have.
You will notice that the script is very similar to the one I wrote for vCOPS. That is because open REST API’s rock, if you don’t have one for your product you are wrong. 🙂

The formatting in WordPress ALWAYS breaks scripts when I paste them. So head over to GitHub and download the script today.
https://github.com/2vcps/post-rest2splunk/tree/master

Like before I schedule this as a task to run every 5 minutes. That seems to not explode the tiny Splunk VM I am running in VMware Fusion to test this out.

Dashboards. Check.

wpid1855-media_1429109420445.png

Some very basic Dashboards I created. I am not a Splunk ninja, perhaps you know one? I am sure people that have done this for a while can pull much better visuals out of this data.

wpid1856-media_1429109524852.png
wpid1857-media_1429109617758.png

Pivot Table

wpid1858-media_1429109962843.png

Stats from a Lab array some Averages computed by Splunk.

Gauge Report of Max Latency (that is micro seconds)

wpid1859-media_1429110138347.png

A 1000 of these is 1 millisecond 🙂 pretty nice.

From Wikipedia
A microsecond is an SI unit of time equal to one millionth (0.000001 or 10−6 or 1/1,000,000) of a second. Its symbol is μs. One microsecond is to one second as one second is to 11.574 days. A microsecond is equal to 1000 nanoseconds or 1/1,000 milliseconds.

Even if everything else didn’t help you at least you learned that today. Right?

The link to github again https://github.com/2vcps/post-rest2splunk/tree/master

Provision vSphere Datastores on Pure Storage Volumes with Powershell

A week or so ago our Pure Storage powershell guru Barks @themsftdude sent out some examples of using Powershell to get information via the Pure Storage REST API. My brain immediately started to think how we could combine this with PowerCLI to get a script to create the LUN on Pure and then the datastore on vSphere. So now provision away with Powershell! You know, if that is what you like to do. We also have a vCenter plugin if you like that better.

So now you can take this code and put it into a file New-PSDataStore.ps1

What we are doing:

1. Login to vCenter and the REST API for the Array.
2. Create the Volume on the Flash Array.
3. Place the new volume in the Hostgroup with your ESX cluster.
4. Rescan the host.
5. Create the new Datastore.

Required parameters:

-FlashArray The name of your array
-vCenter Name of your vCenter host
-vCluster Name of the cluster your hosts are in. If you don’t have clusters (what?) you will need to modify the script slightly.
-HostGroup The name of the hostgroup in the Pure Flash Array.
-VolumeName Name of the volume and datastore
-VolumeSize  Size of the volume. This requires denoting the G for Gigabytes or T or Terabytes
-pureUser The Pure FlashArray username
-pureUser The Pure FlashArray  password

[powershell]
# example usage
#.\new-PSdatastore.ps1 -FlashArray "Array" -vCenter "vcenter" -vCluster "clustername" -HostGroup "HostGroup" -VolumeName "NewVol" -VolumeSize 500G -pureUser pureuser -purePass purepass
#On the Volume Size parameter you must include the letter after the number I have tested <number>G for Gigabytes and <number>T for Terabytes
#Special thanks to Barkz www.themicrosoftdude.com @themsftdude for the kickstart on the API calls.
#Find me @jon_2vcps on the twitters. Please make this script better.
# If you do not have a stored PowerCLI credential you will be prompted for the vCenter credentials.
#Not an official supported Pure Storage product, use as you wish at your own risk.
#

Param(
[Parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string] $FlashArray,
[string] $VCenter,
[string] $vCluster,
[string] $HostGroup,
[string] $VolumeName,
[string] $VolumeSize,
[string] $pureUser,
[string] $purePass

)

Add-PSSnapin VMware.VimAutomation.Core

#cls
$vname=$VolumeName
$vSize=$VolumeSize
[System.Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
$FlashArrayName = $FlashArray
$vCenterServer = $VCenter
$esxHostGroup = $HostGroup
Connect-viserver -Server $vCenterServer

$workHost = get-vmhost -Location $vCluster | select-object -First 1

$AuthAction = @{
password = $purePass
username = $pureUser
}
$ApiToken = Invoke-RestMethod -Method Post -Uri "https://${FlashArrayName}/api/1.1/auth/apitoken" -Body $AuthAction

$SessionAction = @{
api_token = $ApiToken.api_token
}
Invoke-RestMethod -Method Post -Uri "https://${FlashArrayName}/api/1.1/auth/session" -Body $SessionAction -SessionVariable Session

Invoke-RestMethod -Method POST -Uri "https://${FlashArrayName}/api/1.1/volume/${vname}?size=${vSize}" -WebSession $Session
Invoke-RestMethod -Method POST -Uri "https://${FlashArrayName}/api/1.1/hgroup/${esxHostGroup}/volume/${vname}" -WebSession $Session
$volDetails = Invoke-RestMethod -Method GET -Uri "https://${FlashArrayName}/api/1.1/volume/${vname}" -WebSession $Session
$rescanHost = $workHost | Get-VMhostStorage -RescanAllHba
$volNAA = $volDetails.serial
$volNAA = $volNAA.substring(15)
$afterLUN = $workHost | Get-scsilun -CanonicalName "naa.624*${volNAA}"
New-Datastore -VMhost $workHost -Name $vname -Path $afterLUN -VMFS
[/powershell]

 

Virtual Storage Integrator 5.6 – What’s New

The Virtual Storage Integrator or VSI has been around for a while. Seems every release something new and exciting gets added that customer have asked for. The VSI 5.6 plugin for EMC is the latest version (9/13/2013) of the plugin to help streamline and simplify interactions between the vSphere client and the EMC storage used to support your Virtual Data Center/Private Cloud/Software Defined Data Center.

The VSI plugin can be downloaded for no extra charge if you have a current support.emc.com account (BTW so glad it is not powerlink anymore).

VSI Support and Downloads Page

You may just want to post a question on the EMC Community about the VSI. You can do that here.

Yeah community!

Enough background already what is new in the new version 5.6?

XtremIO Support

wpid1361-media_1378997478605.png

Awesome provisioning and visibility for the new all flash array from EMC. Ready now for the people with XtremIO and for the many waiting to get one. Coming soon!

Here is a quick demo of the XtremIO functionality. Select 720p for better viewing.

VPLEX Support

wpid1362-media_1378997599802.png

Our data mobility team is super excited about now supporting VPLEX provisioning in the VSI plugin. So now you are able to create the VPLEX datastores straight from the vSphere client. Very cool.
Update 9/23/13 Demo of VPLEX Provisioning with VSI

VMAX Provisioning with Striped Meta

We were all very excited when VMAX provisioning was added to the VSI plugin and now it is able to use the striped meta volume, which is a big deal for some VMAX users. This is an option now and you can select either method when provisioning to the VMAX.

Update 9/19/13 -> a demo from @drewtonnesen

Did you hear there is a new VNX?

wpid1364-media_1378997948493.png

The newest versions of the VNX are supported in VSI 5.6 and as you see in the slide the some of the coolest new features of the VNX will be available for use with the new VSI 5.6

I hope you are as excited about the newest release of the plugin. Remember that is supports vSphere 5.5 too!

If you have any questions please leave a comment of better yet start a thread on the community.

Some Reality for us Infrastructure Peeps or Apps are cool too

Don’t’ you just love double titles?

For many years I have been an infrastructure guy. I really liked how the cables, and processors and Memory and blinking lights worked. Applications were often the necessary evil tolerated so that I can play with cool technology. During my own journey toward learning about the cloud it becomes increasingly important to consider the function of the application. Six years ago me would totally punch me in the face right now. Traitor. J

1 – Don’t get your App messed up in my resource buckets of awesomeness

 

So the reality check to the Infrastructure geek in me is this: The application teams really think of what you do as the network. That is why when anything is ever wrong it is always “the network’s” fault. What we love to do is getting abstracted more and more. I will still contend that is very important and very hard to do. Whether you are building reference architectures or deploying a converged infrastructure appliance almost no one but us cares. They just want the data to do their jobs. So while we have really great discussions about speeds and feeds, the guy in the picture below just wants the app. From the hypervisor down we need to design with the application in mind or we will risk becoming like that goth dude locked in the server room on IT Crowd.

 

2 Honey badger don’t care about FCoE

My next post will get into what I have been researching regarding what is out there and hopefully help us (infra. peeps) understand our App/Dev brothers better.

You are probably an Infrastructure person if:

  1. You read this blog.
  2. You work mainly with Virtualization
  3. Storage Admin
  4. Network Admin
  5. You like to make fun of DBA’s

 

Extents vs Storage DRS

I was meeting with a customer today and had to stop for a second when they said they were using 10 TB datastores in vSphere 4.1.

At first I was going through my head of maybe NFS? No they are an all block shop. Oh wait yeah, extents. They were using 2 TB -512 byte luns to create a giant Datastore. I asked, why? The answer was simple, “so we only manage one datastore.”

I responded with well check out Storage DRS in vSphere 5! It gives you that one point to manage and automatic placement across multiple datastores. Additionally you actually can find which VM lives where, and use Storage Maintenance mode to do storage related maintenance. Right now they are locked into using extents. If they change their datastores into a Cluster the gain flexibility while not losing the ease of management.

I wanted to use the opportunity to list some information I think about Extents with VMware.

  1. Extents do not equal bad. Just have the right reason to use them, and running out of space is not one.
  2. If you lose one extent you don’t lose everything, unless that one is the first extent.
  3. VMware places blocks on extents in some sort of even fashion. It is not spill and fill. While not really load balancing you don’t kill just one lun at a time.

An extent with a datastore is like a stack of luns. Don’t knock out the bottom block!

 

Some points about Storage DRS.

  1. Storage DRS places VMDK’s based on IO and Space metrics.
  2. Storage DRS and SRM 5 don’t play nice, last time I checked (2/13/12).
  3. Combine Storage DRS with Storage Policy and you have a really easy way to place and manage VM’s on the storage. Just set the policy and check if it is compliant.

A Storage DRS cluster is multiple datastores appearing as one.

Some links on the topics:

Some more information from VMware on Extents
More on Storage DRS (SDRS)

In conclusion, SDRS may be removing some of the last reasons to use an extent (getting multiple lun performance with single point of management). Add that to being able to have up to 64 TB Datastores with VMFS and using extents will become even rarer than before. Unless you have another reason? Post it in the comments!

Storage Caching vs Tiering Part 2

Recently I had the privilege of being a Tech Field Day Delegate. Tech Field Day is organized by Gestalt IT. If you want more detail on Tech Field Day visit right here. In interest of full disclosure the vendors we visit sponsor the event. The delegates are under no obligation to review good or bad the sponsoring companies.

After jumping in with a post last week on tierless caching I wanted to jump in with my thoughts on a second Tech Field Day vendor. Avere presented a very interesting and technical presentation. I appreciated being engaged on an engineering level and not a marketing pitch.

Avere tiers everything. It is essentially a scale out NAS solution (they called it a FXT Appliance) that can front end any existing NFS. Described to me by someone else as file acceleration. The Avere NAS stores data internally on a cluster of NAS units. The “paranoia meter” lets you set how often the mass storage device is updated. If you need more availability or speed you add Avere devices. If you need more disk space you add to your mass storage. In their benchmarking tests they basically used some drives connected to a CentOS machine running NFS front-ended by Avere’s NAS units. They were able to get the required IOPS at a fraction of the cost of NetApp or EMC.

The Avere Systems blog provides some good questions on Tiering.

The really good part of the presentation is how they write between the tiers. Everything is optimized for that particular type of media, SSD, SAS or SATA.
When I asked about NetApp’s statements about tiering (funny they were on the same day). Ron Bianchini responded, “that when you sell hammers, everything is a nail.” I believe him.

So how do we move past all the marketing speak to get down to the truth when it comes to Caching and Tiering. I am leaning toward thinking of any location where data lives for any period of time as a tier. I think a cache is a tier. Really fast cache for reads and writes is for sure a tier. Different kinds of disks are tiers. So I would say everyone has tiers. The value comes in when the storage vendor innovates and automates the movement and management of that data.

My questions/comments about Avere.

1. Slick technology. I would like to see it work in the enterprise over time. People might be scared because it is not one of the “big names”.
2. Having came from Spinnaker. Is the plan to go long term with Avere, or build something to be purchased by a big guy?
3. I would like to see how the methods used by the Avere FXT appliance can be applied to block storage. Plenty of slow inexpensive iSCSI products that would benefit from a device like this on the front end.