SlideShare una empresa de Scribd logo
1 de 42
Consuming Cinder from
Docker
John Griffith
SolidFire/NetApp
August 23, 2016
About me
• Contributing to OpenStack a while (longer than some, less than others)
• Have been pretty passionate about core Cinder and things like reference driver
• Worked at a little Storage Startup called SolidFire recently bought by NetApp
• Have an AWESOME job where I get to work on OSS and always try new things
• Can be opinionated and blunt at times… sorry about that
2
3
Maybe you showed up because you heard
rumors that I’d talk about Docker?
4
OpenStack Cinder -Block Storage as a Service
• Abstraction layer to provide a pool of Block Resources
• Use backend storage from different vendors, don’t have to care of
know what’s actually serving up the blocks
• Scale out… just keep plugging in back-ends
• Scheduler can figure out where to place volumes for you
5
It’s like having an infinite number of disks
That you can hot plug in and out of your Instances
Photo Credit: Roger Smith
6
Only really need a few things
• Create/Delete
• Attach/Detach
• Snapshot
7
Of course there’s more for those that want it
• Replication
• CG’s
• Backups
• Migration
• Imports/Exports
• Transfer ownership
• Extend
• ...
(This is me trying not to be opinionated and blunt… moving on)
8
I was told this would be a Docker talk!!
9
Yes, I’m going to talk about Docker
• Docker is the best geek bait EVER!!!
• “OpenStack in Containers”
• “Container Orchestration in OpenStack”
• “OpenStack on Kubernetes”
10
Unicorns for EVERYONE
• All sorts of interesting ideas and plans on
the horizon
• Let’s bypass some of the hype and just
talk about some cool stuff you can do
today
• Try to remember a little bit of the past
while we’re at it
11
History repeats itself in tech
• $NEW_THING is like pets vs cattle
• $NEW_THING needs better networking
• $NEW_THING needs persistent storage
• $NEW_THING is a different development paradigm
• $NEW_THING is about small ephemeral services
echo $NEW_THING
OpenStack
export NEW_THING=Containers
12
Just like we heard in OpenStack –Containers need
networking and storage options
• Volume Plugin capability for Docker introduced initially in 1.8
• Continues to mature
• List of Vendors racing to provide a plugin accelerating rapidly
• Nobody wants to be late to the party, especially those that were late to Cinder
13
Docker Volume Plugins –General things to know
• Docker provides a simple Volume API
• INCLUDES PROVISIONING!!!!!
• Driver runs as a daemon
• Most common right now are simple UNIX domain sockets
• Runs on same node as the Docker Engine
• json-rpc over http POST
• Works with Swarm, Engine and Compose
So I wrote a Cinder Plugin
• Written in Golang
• Focus on JUST Cinder
• Vendor neutral/independent
• Open Source
• Gladly welcome contributors and feedback
• Anticipating/Hoping for Cinder community support
14
15
Can’t I already do this?
Yep, you can
Cool stuff out there already
Adoption is the greatest compliment
16
Don’t get me wrong
Some of those existing plugins that wrap up Cinder
are pretty cool
Some offer additional benefits
Some might fit your use case better
Some of them you may have already invested in and
have relationships with the contributing vendors
Do your thing, that’s AWESOME
Don’t hate, we’re all in this together
17
Brace yourselves, it’s about to get terrifying…
Well… for a few people at least
18
These Plugins aren’t under an umbrella
• Docker Plugins are NOT in a Docker repo
• Cinder Docker Plugin isn’t in an OpenStack repo
19
Some OpenStack folks just had a stroke
For now: https://github.com/j-griffith/cinder-docker-driver
Licensed under the “unlicense”
Potential for inclusion under OpenStack some day? Or maybe Docker?
20
So how does this work
• It’s not “much” different than how we do things with OpenStack/Nova
• Create a volume
• Attach a volume
• It’s all the same stuff we’ve been doing for years, we just change the
consumer
• Cinder really doesn’t care what you’re doing on the other side
• By the way, we’re talking Docker, but it doesn’t have to be Docker either
21
I have to give a shout out to Docker on1.12
• Docker 1.12 was a HUGE step forward
• Swarm advancements are my favorite
• I can deploy a Swarm cluster wicked fast
• Swarm in OpenStack or Public Cloud is stupid easy
22
Recipe for a tasty Swarm Cluster with persistent data
Start with some Peanut Butter
• Basic OpenStack Cloud
• Compute Networking and Storage
Mix in a bit of Chocolate
• Docker 1.12
Top it off with some frosting
• Cinder Docker Driver
23
We’ll use docker-machine with the OpenStack driver –
Because we can, and it works pretty well
(Our OpenStack Cloud)
24
We have our ingredients, here’s the basic steps
1. docker-machine to create 3 Nova Instances and setup Docker
2. Create a Swarm Cluster
3. Install , configure and start the cinder-docker-driver
4. Deploy a Swarm service that creates and uses a Cinder Volume
25
Create our nodes –use env vars instead of args
We’ll use docker-machine and the built in OpenStack driver for this
There’s a LOT of arguments required to the cli, so let’s start by creating an env file rather
than typing everything in.
export OS_FLAVOR_ID=2export OS_DOMAIN_NAME=$OS_USER_DOMAIN_NAME
export OS_IMAGE_ID=d5c276bc-cb70-42c4-9291-96f40a03a74c
export OS_SSH_USER=ubuntu
export OS_KEYPAIR_NAME=jdg
export OS_PRIVATE_KEY_FILE=$HOME/.ssh/id_rsaexport OS_SSH_USER=ubuntu
export OS_TENANT_ID=$OS_PROJECT_ID
26
Create our nodes
This just does our ”nova boot ….” for us, creating the Instances based on env vars
It does a few additional things for us too though
• Install Docker
• Configure and Setup certs for Docker
• Verify Docker is up and running
• Create a node entry in the docker nodes db
➜ docker-machine create –d openstack swarm-1
➜ docker-machine create –d openstack swarm-2
➜ docker-machine create –d openstack swarm-3
27
We can view our nodes using docker-machine
➜ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER
ERRORS
swarm-1 - openstack Running tcp://172.16.140.157:2376 v1.12.0
swarm-2 - openstack Running tcp://172.16.140.159:2376 v1.12.0
swarm-3 - openstack Running tcp://172.16.140.161:2376 v1.12.0
28
Set a node up as a Swarm Manager
➜ eval $(docker-machine env swarm-1)
➜ SWARM-1-IP=$(docker-machine ip swarm-1)
➜ docker swarm init --advertise-addr $SWARM-1-IP –listen-addr $SWARM-1-IP:2377
Swarm initialized: current node (5oi3h06yci5mvsau6czcbbxqu) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join 
--token SWMTKN-1-33zfeg2ppr9043o4itdn2cznwn7yuy7na1fqg2aduoemihw93o
-3znh32dbpmb5goc8l1ia286it 172.16.140.157:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the
instructions.
29
Set our other two Instances as Workers
➜ eval $(docker-machine env swarm-2)
➜ docker swarm join --token SWMTKN-1-33zfeg2ppr9043o4itdn2cznwn7yuy7na1fqg2aduoemihw93o-
3znh32dbpmb5goc8l1ia286it 172.16.140.157:2377
This node joined a swarm as a worker.
➜ eval $(docker-machine env swarm-3)
➜ docker swarm join --token SWMTKN-1-33zfeg2ppr9043o4itdn2cznwn7yuy7na1fqg2aduoemihw93o-
3znh32dbpmb5goc8l1ia286it 172.16.140.157:2377
This node joined a swarm as a worker.
30
That’s it, you now have a Swarm Cluster!!!!
31
Now it’s time to install the Cinder Driver
on each Node
• Install the driver
• Copy over a config file
• Start the daemon
• Restart Docker
32
You can just use docker-machine from
your laptop…
➜ for each in $(docker-machine ls -q); do; docker-machine ssh $each "curl –sSL 
https://raw.githubusercontent.com/j-griffith/cinder-docker-driver/master/install.sh 
| sh -" ; done
➜ for each in $(docker-machine ls -q); do; docker-machine scp cdd.config.json 
$each:~/config.json; done
➜ for each in $(docker-machine ls -q); do; docker-machine ssh $each "sudo 
cinder-docker-driver --config config.json > cdd.log 2>&1 &" ; done
➜ for each in $(docker-machine ls -q); do; docker-machine ssh $each "sudo 
Service docker restart" ; done
33
About that install….
Config file is just OpenStack Creds
Creating a Service file for the driver has made
it’s way up pretty far on the TODO list
{
"Endpoint": "http://172.16.140.243:5000/v2.0",
"Username": "jdg",
"Password": “ABC123",
"TenantID": "3dce5dd10b414ac1b942aba8ce8558e7“
}
34
Now you can do cool things
Let’s build the simple counter application
• Redis container with Cinder Volume
• Web front end to take user input
We’ll run this as a Swarm service, so we can do things
like scale it, drain-nodes and move the containers
uninterrupted.
All while persisting our Redis data
35
Create a Docker network first so the Swarm
nodes have a layer to communicate on…
➜ eval $(docker-machine env swarm-1)
➜ docker network create demo-net
Bd45fad9911005ce2ff8e311a2738681d179589d8d06989a136e8020bc5a8155
36
Launch our services, start with the Redis
service…
➜ eval $(docker-machine env swarm-1)
➜ docker service create --name redis --network demo-net –-mount 
type=volume,src=counter-demo,dst=/data,volume-driver=cinder -p 6379:6379 redis
This will:
• Pull the Redis image if it’s not available
• Get/Create the volume on the Cinder backend
• Attach the Volume to the Swarm node
• Partition, Format and Mount the Volume
• Link the volume to the Redis Containers /data directory
• Start the Redis Container
37
You can see the attached volume on the
Swarm Node….
ubuntu@swarm-3:~$ ls /dev/disk/by-path/
ip-10.10.9.1:3260-iscsi-iqn.2010-01.com.solidfire:ayyb.uuid-59e99b3b-c7d6-45c2-924c-
virtio-pci-0000:00:04.0
virtio-pci-0000:00:04.0-part1
Same as we do for Nova Compute nodes… nothing really different except we add the file system
38
Now, the web service/frontend…
➜ docker service create --name web --network demonet -p 80:80 
jgriffith/jgriffith webbase
This will:
• Connect to our Redis container (regardless of what Swarm node it’s on)
• Expose port 80 to all of the Swarm Nodes (access from any Swarm Node IP)
• Count input/clicks and store them in the Redis DB
39
Can’t show you a live demo 
Next best thing…. Movies!!!
1. Create Swarm Cluster and install the Driver on
Nodes
2. Create our Service using a Cinder Volume
3. Demo the Service and fail it over to another Node
40
41
42

Más contenido relacionado

La actualidad más candente

Docker Container Orchestration
Docker Container OrchestrationDocker Container Orchestration
Docker Container OrchestrationFernand Galiana
 
Orchestrating Docker with OpenStack
Orchestrating Docker with OpenStackOrchestrating Docker with OpenStack
Orchestrating Docker with OpenStackErica Windisch
 
Cassandra and Docker Lessons Learned
Cassandra and Docker Lessons LearnedCassandra and Docker Lessons Learned
Cassandra and Docker Lessons LearnedDataStax Academy
 
Cassandra and docker
Cassandra and dockerCassandra and docker
Cassandra and dockerBen Bromhead
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker, Inc.
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introductionrajdeep
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyGiovanni Toraldo
 
[Open stack] heat + docker
[Open stack] heat + docker[Open stack] heat + docker
[Open stack] heat + dockerdotCloud
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1dotCloud
 
99cloud Docker Training module 2
99cloud Docker Training module 299cloud Docker Training module 2
99cloud Docker Training module 2Liang Bo
 
Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28Sadique Puthen
 
Scaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoScaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoVali-Marius Malinoiu
 
The age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster managementThe age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster managementNicola Paolucci
 
Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013Trevor Roberts Jr.
 
Cluster Lifecycle Landscape
Cluster Lifecycle LandscapeCluster Lifecycle Landscape
Cluster Lifecycle LandscapeMike Danese
 
Delivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerDelivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerJorrit Salverda
 
Networking in Kubernetes
Networking in KubernetesNetworking in Kubernetes
Networking in KubernetesMinhan Xia
 

La actualidad más candente (20)

Docker Container Orchestration
Docker Container OrchestrationDocker Container Orchestration
Docker Container Orchestration
 
Orchestrating Docker with OpenStack
Orchestrating Docker with OpenStackOrchestrating Docker with OpenStack
Orchestrating Docker with OpenStack
 
Cassandra and Docker Lessons Learned
Cassandra and Docker Lessons LearnedCassandra and Docker Lessons Learned
Cassandra and Docker Lessons Learned
 
Cassandra and docker
Cassandra and dockerCassandra and docker
Cassandra and docker
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introduction
 
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) ItalyClustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
Clustering with Docker Swarm - Dockerops 2016 @ Cento (FE) Italy
 
[Open stack] heat + docker
[Open stack] heat + docker[Open stack] heat + docker
[Open stack] heat + docker
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1Running Docker with OpenStack | Docker workshop #1
Running Docker with OpenStack | Docker workshop #1
 
99cloud Docker Training module 2
99cloud Docker Training module 299cloud Docker Training module 2
99cloud Docker Training module 2
 
Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28Introduction openstack-meetup-nov-28
Introduction openstack-meetup-nov-28
 
Scaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and PrestoScaling and Managing Cassandra with docker, CoreOS and Presto
Scaling and Managing Cassandra with docker, CoreOS and Presto
 
The age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster managementThe age of orchestration: from Docker basics to cluster management
The age of orchestration: from Docker basics to cluster management
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013Couch to OpenStack: Cinder - August 6, 2013
Couch to OpenStack: Cinder - August 6, 2013
 
Cluster Lifecycle Landscape
Cluster Lifecycle LandscapeCluster Lifecycle Landscape
Cluster Lifecycle Landscape
 
Demystifying kubernetes
Demystifying kubernetesDemystifying kubernetes
Demystifying kubernetes
 
Delivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and DockerDelivering Go.CD with Terraform and Docker
Delivering Go.CD with Terraform and Docker
 
Networking in Kubernetes
Networking in KubernetesNetworking in Kubernetes
Networking in Kubernetes
 

Similar a Consuming Cinder from Docker

Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Outlyer
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoHannes Hapke
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at NuxeoNuxeo
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on DockerRightScale
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsRamit Surana
 
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresOrchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresDocker, Inc.
 
Containers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkContainers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkRed Hat Developers
 
Docker introduction
Docker introductionDocker introduction
Docker introductionJo Ee Liew
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707Clarence Ho
 
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...Atlassian
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA
 
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017Frank Munz
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataInfluxData
 
Making kubernetes simple for developers
Making kubernetes simple for developersMaking kubernetes simple for developers
Making kubernetes simple for developersSuraj Deshmukh
 
Paolucci voxxed-days-berlin-2016-age-of-orchestration
Paolucci voxxed-days-berlin-2016-age-of-orchestrationPaolucci voxxed-days-berlin-2016-age-of-orchestration
Paolucci voxxed-days-berlin-2016-age-of-orchestrationGrzegorz Duda
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessDocker-Hanoi
 

Similar a Consuming Cinder from Docker (20)

Dockerize All The Things
Dockerize All The ThingsDockerize All The Things
Dockerize All The Things
 
Pp docker-swarm-doxlon-28th-march-2017
Pp docker-swarm-doxlon-28th-march-2017Pp docker-swarm-doxlon-28th-march-2017
Pp docker-swarm-doxlon-28th-march-2017
 
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
 
PDXPortland - Dockerize Django
PDXPortland - Dockerize DjangoPDXPortland - Dockerize Django
PDXPortland - Dockerize Django
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo[NYC Meetup] Docker at Nuxeo
[NYC Meetup] Docker at Nuxeo
 
Perspectives on Docker
Perspectives on DockerPerspectives on Docker
Perspectives on Docker
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
 
Orchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failuresOrchestrating Linux Containers while tolerating failures
Orchestrating Linux Containers while tolerating failures
 
Containers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkContainers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech Talk
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker HK Meetup - 201707
Docker HK Meetup - 201707Docker HK Meetup - 201707
Docker HK Meetup - 201707
 
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
AtlasCamp 2015: The age of orchestration: From Docker basics to cluster manag...
 
vodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in TestingvodQA(Pune) 2018 - Docker in Testing
vodQA(Pune) 2018 - Docker in Testing
 
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
From Docker Swarm to OCCS and Wercker: Live-hacking at Oracle CODE Mexico 2017
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
 
Making kubernetes simple for developers
Making kubernetes simple for developersMaking kubernetes simple for developers
Making kubernetes simple for developers
 
Paolucci voxxed-days-berlin-2016-age-of-orchestration
Paolucci voxxed-days-berlin-2016-age-of-orchestrationPaolucci voxxed-days-berlin-2016-age-of-orchestration
Paolucci voxxed-days-berlin-2016-age-of-orchestration
 
Docker basic
Docker basicDocker basic
Docker basic
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 

Más de Tesora

Model-Driven Operations
Model-Driven OperationsModel-Driven Operations
Model-Driven OperationsTesora
 
What's Next for OpenStack at Walmart
What's Next for OpenStack at WalmartWhat's Next for OpenStack at Walmart
What's Next for OpenStack at WalmartTesora
 
OpenStack: Upstream First
OpenStack: Upstream FirstOpenStack: Upstream First
OpenStack: Upstream FirstTesora
 
All of the Amazing OpenStack Resources
All of the Amazing OpenStack ResourcesAll of the Amazing OpenStack Resources
All of the Amazing OpenStack ResourcesTesora
 
What's the TCO for an OpenStack Cloud?
What's the TCO for an OpenStack Cloud? What's the TCO for an OpenStack Cloud?
What's the TCO for an OpenStack Cloud? Tesora
 
OpenStack: Past, Present, and Future
OpenStack: Past, Present, and FutureOpenStack: Past, Present, and Future
OpenStack: Past, Present, and FutureTesora
 
VMware and Container Orchestration
VMware and Container OrchestrationVMware and Container Orchestration
VMware and Container OrchestrationTesora
 
OpenStack Management at Hyperscale
OpenStack Management at HyperscaleOpenStack Management at Hyperscale
OpenStack Management at HyperscaleTesora
 
Stateful Applications On the Cloud: A PayPal Journey
Stateful Applications On the Cloud: A PayPal JourneyStateful Applications On the Cloud: A PayPal Journey
Stateful Applications On the Cloud: A PayPal JourneyTesora
 
So Your OpenStack Cloud is Built...Now What?
So Your OpenStack Cloud is Built...Now What? So Your OpenStack Cloud is Built...Now What?
So Your OpenStack Cloud is Built...Now What? Tesora
 
Secrets of Success: Building Community Through Meetups
Secrets of Success: Building Community Through Meetups Secrets of Success: Building Community Through Meetups
Secrets of Success: Building Community Through Meetups Tesora
 
The State of OpenStack Product Management
The State of OpenStack Product ManagementThe State of OpenStack Product Management
The State of OpenStack Product ManagementTesora
 
OpenStack in the Enterprise
OpenStack in the EnterpriseOpenStack in the Enterprise
OpenStack in the EnterpriseTesora
 
OpenStack by the Numbers
OpenStack by the NumbersOpenStack by the Numbers
OpenStack by the NumbersTesora
 
Running OpenStack in Production
Running OpenStack in ProductionRunning OpenStack in Production
Running OpenStack in ProductionTesora
 
Leveraging OpenStack to Run Mesos/Marathon at Charter Communications
Leveraging OpenStack to Run Mesos/Marathon at Charter CommunicationsLeveraging OpenStack to Run Mesos/Marathon at Charter Communications
Leveraging OpenStack to Run Mesos/Marathon at Charter CommunicationsTesora
 
Bridging OpenStack and Mobile Cloud
Bridging OpenStack and Mobile CloudBridging OpenStack and Mobile Cloud
Bridging OpenStack and Mobile CloudTesora
 
OpenStack at Scale Inside NetApp
OpenStack at Scale Inside NetAppOpenStack at Scale Inside NetApp
OpenStack at Scale Inside NetAppTesora
 
OpenStack at Bloomberg
OpenStack at BloombergOpenStack at Bloomberg
OpenStack at BloombergTesora
 
A Tale from the Upstream Path
A Tale from the Upstream PathA Tale from the Upstream Path
A Tale from the Upstream PathTesora
 

Más de Tesora (20)

Model-Driven Operations
Model-Driven OperationsModel-Driven Operations
Model-Driven Operations
 
What's Next for OpenStack at Walmart
What's Next for OpenStack at WalmartWhat's Next for OpenStack at Walmart
What's Next for OpenStack at Walmart
 
OpenStack: Upstream First
OpenStack: Upstream FirstOpenStack: Upstream First
OpenStack: Upstream First
 
All of the Amazing OpenStack Resources
All of the Amazing OpenStack ResourcesAll of the Amazing OpenStack Resources
All of the Amazing OpenStack Resources
 
What's the TCO for an OpenStack Cloud?
What's the TCO for an OpenStack Cloud? What's the TCO for an OpenStack Cloud?
What's the TCO for an OpenStack Cloud?
 
OpenStack: Past, Present, and Future
OpenStack: Past, Present, and FutureOpenStack: Past, Present, and Future
OpenStack: Past, Present, and Future
 
VMware and Container Orchestration
VMware and Container OrchestrationVMware and Container Orchestration
VMware and Container Orchestration
 
OpenStack Management at Hyperscale
OpenStack Management at HyperscaleOpenStack Management at Hyperscale
OpenStack Management at Hyperscale
 
Stateful Applications On the Cloud: A PayPal Journey
Stateful Applications On the Cloud: A PayPal JourneyStateful Applications On the Cloud: A PayPal Journey
Stateful Applications On the Cloud: A PayPal Journey
 
So Your OpenStack Cloud is Built...Now What?
So Your OpenStack Cloud is Built...Now What? So Your OpenStack Cloud is Built...Now What?
So Your OpenStack Cloud is Built...Now What?
 
Secrets of Success: Building Community Through Meetups
Secrets of Success: Building Community Through Meetups Secrets of Success: Building Community Through Meetups
Secrets of Success: Building Community Through Meetups
 
The State of OpenStack Product Management
The State of OpenStack Product ManagementThe State of OpenStack Product Management
The State of OpenStack Product Management
 
OpenStack in the Enterprise
OpenStack in the EnterpriseOpenStack in the Enterprise
OpenStack in the Enterprise
 
OpenStack by the Numbers
OpenStack by the NumbersOpenStack by the Numbers
OpenStack by the Numbers
 
Running OpenStack in Production
Running OpenStack in ProductionRunning OpenStack in Production
Running OpenStack in Production
 
Leveraging OpenStack to Run Mesos/Marathon at Charter Communications
Leveraging OpenStack to Run Mesos/Marathon at Charter CommunicationsLeveraging OpenStack to Run Mesos/Marathon at Charter Communications
Leveraging OpenStack to Run Mesos/Marathon at Charter Communications
 
Bridging OpenStack and Mobile Cloud
Bridging OpenStack and Mobile CloudBridging OpenStack and Mobile Cloud
Bridging OpenStack and Mobile Cloud
 
OpenStack at Scale Inside NetApp
OpenStack at Scale Inside NetAppOpenStack at Scale Inside NetApp
OpenStack at Scale Inside NetApp
 
OpenStack at Bloomberg
OpenStack at BloombergOpenStack at Bloomberg
OpenStack at Bloomberg
 
A Tale from the Upstream Path
A Tale from the Upstream PathA Tale from the Upstream Path
A Tale from the Upstream Path
 

Último

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 

Consuming Cinder from Docker

  • 1. Consuming Cinder from Docker John Griffith SolidFire/NetApp August 23, 2016
  • 2. About me • Contributing to OpenStack a while (longer than some, less than others) • Have been pretty passionate about core Cinder and things like reference driver • Worked at a little Storage Startup called SolidFire recently bought by NetApp • Have an AWESOME job where I get to work on OSS and always try new things • Can be opinionated and blunt at times… sorry about that 2
  • 3. 3 Maybe you showed up because you heard rumors that I’d talk about Docker?
  • 4. 4 OpenStack Cinder -Block Storage as a Service • Abstraction layer to provide a pool of Block Resources • Use backend storage from different vendors, don’t have to care of know what’s actually serving up the blocks • Scale out… just keep plugging in back-ends • Scheduler can figure out where to place volumes for you
  • 5. 5 It’s like having an infinite number of disks That you can hot plug in and out of your Instances Photo Credit: Roger Smith
  • 6. 6 Only really need a few things • Create/Delete • Attach/Detach • Snapshot
  • 7. 7 Of course there’s more for those that want it • Replication • CG’s • Backups • Migration • Imports/Exports • Transfer ownership • Extend • ... (This is me trying not to be opinionated and blunt… moving on)
  • 8. 8 I was told this would be a Docker talk!!
  • 9. 9 Yes, I’m going to talk about Docker • Docker is the best geek bait EVER!!! • “OpenStack in Containers” • “Container Orchestration in OpenStack” • “OpenStack on Kubernetes”
  • 10. 10 Unicorns for EVERYONE • All sorts of interesting ideas and plans on the horizon • Let’s bypass some of the hype and just talk about some cool stuff you can do today • Try to remember a little bit of the past while we’re at it
  • 11. 11 History repeats itself in tech • $NEW_THING is like pets vs cattle • $NEW_THING needs better networking • $NEW_THING needs persistent storage • $NEW_THING is a different development paradigm • $NEW_THING is about small ephemeral services echo $NEW_THING OpenStack export NEW_THING=Containers
  • 12. 12 Just like we heard in OpenStack –Containers need networking and storage options • Volume Plugin capability for Docker introduced initially in 1.8 • Continues to mature • List of Vendors racing to provide a plugin accelerating rapidly • Nobody wants to be late to the party, especially those that were late to Cinder
  • 13. 13 Docker Volume Plugins –General things to know • Docker provides a simple Volume API • INCLUDES PROVISIONING!!!!! • Driver runs as a daemon • Most common right now are simple UNIX domain sockets • Runs on same node as the Docker Engine • json-rpc over http POST • Works with Swarm, Engine and Compose
  • 14. So I wrote a Cinder Plugin • Written in Golang • Focus on JUST Cinder • Vendor neutral/independent • Open Source • Gladly welcome contributors and feedback • Anticipating/Hoping for Cinder community support 14
  • 15. 15 Can’t I already do this? Yep, you can Cool stuff out there already Adoption is the greatest compliment
  • 16. 16 Don’t get me wrong Some of those existing plugins that wrap up Cinder are pretty cool Some offer additional benefits Some might fit your use case better Some of them you may have already invested in and have relationships with the contributing vendors Do your thing, that’s AWESOME Don’t hate, we’re all in this together
  • 17. 17 Brace yourselves, it’s about to get terrifying… Well… for a few people at least
  • 18. 18 These Plugins aren’t under an umbrella • Docker Plugins are NOT in a Docker repo • Cinder Docker Plugin isn’t in an OpenStack repo
  • 19. 19 Some OpenStack folks just had a stroke For now: https://github.com/j-griffith/cinder-docker-driver Licensed under the “unlicense” Potential for inclusion under OpenStack some day? Or maybe Docker?
  • 20. 20 So how does this work • It’s not “much” different than how we do things with OpenStack/Nova • Create a volume • Attach a volume • It’s all the same stuff we’ve been doing for years, we just change the consumer • Cinder really doesn’t care what you’re doing on the other side • By the way, we’re talking Docker, but it doesn’t have to be Docker either
  • 21. 21 I have to give a shout out to Docker on1.12 • Docker 1.12 was a HUGE step forward • Swarm advancements are my favorite • I can deploy a Swarm cluster wicked fast • Swarm in OpenStack or Public Cloud is stupid easy
  • 22. 22 Recipe for a tasty Swarm Cluster with persistent data Start with some Peanut Butter • Basic OpenStack Cloud • Compute Networking and Storage Mix in a bit of Chocolate • Docker 1.12 Top it off with some frosting • Cinder Docker Driver
  • 23. 23 We’ll use docker-machine with the OpenStack driver – Because we can, and it works pretty well (Our OpenStack Cloud)
  • 24. 24 We have our ingredients, here’s the basic steps 1. docker-machine to create 3 Nova Instances and setup Docker 2. Create a Swarm Cluster 3. Install , configure and start the cinder-docker-driver 4. Deploy a Swarm service that creates and uses a Cinder Volume
  • 25. 25 Create our nodes –use env vars instead of args We’ll use docker-machine and the built in OpenStack driver for this There’s a LOT of arguments required to the cli, so let’s start by creating an env file rather than typing everything in. export OS_FLAVOR_ID=2export OS_DOMAIN_NAME=$OS_USER_DOMAIN_NAME export OS_IMAGE_ID=d5c276bc-cb70-42c4-9291-96f40a03a74c export OS_SSH_USER=ubuntu export OS_KEYPAIR_NAME=jdg export OS_PRIVATE_KEY_FILE=$HOME/.ssh/id_rsaexport OS_SSH_USER=ubuntu export OS_TENANT_ID=$OS_PROJECT_ID
  • 26. 26 Create our nodes This just does our ”nova boot ….” for us, creating the Instances based on env vars It does a few additional things for us too though • Install Docker • Configure and Setup certs for Docker • Verify Docker is up and running • Create a node entry in the docker nodes db ➜ docker-machine create –d openstack swarm-1 ➜ docker-machine create –d openstack swarm-2 ➜ docker-machine create –d openstack swarm-3
  • 27. 27 We can view our nodes using docker-machine ➜ docker-machine ls NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS swarm-1 - openstack Running tcp://172.16.140.157:2376 v1.12.0 swarm-2 - openstack Running tcp://172.16.140.159:2376 v1.12.0 swarm-3 - openstack Running tcp://172.16.140.161:2376 v1.12.0
  • 28. 28 Set a node up as a Swarm Manager ➜ eval $(docker-machine env swarm-1) ➜ SWARM-1-IP=$(docker-machine ip swarm-1) ➜ docker swarm init --advertise-addr $SWARM-1-IP –listen-addr $SWARM-1-IP:2377 Swarm initialized: current node (5oi3h06yci5mvsau6czcbbxqu) is now a manager. To add a worker to this swarm, run the following command: docker swarm join --token SWMTKN-1-33zfeg2ppr9043o4itdn2cznwn7yuy7na1fqg2aduoemihw93o -3znh32dbpmb5goc8l1ia286it 172.16.140.157:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
  • 29. 29 Set our other two Instances as Workers ➜ eval $(docker-machine env swarm-2) ➜ docker swarm join --token SWMTKN-1-33zfeg2ppr9043o4itdn2cznwn7yuy7na1fqg2aduoemihw93o- 3znh32dbpmb5goc8l1ia286it 172.16.140.157:2377 This node joined a swarm as a worker. ➜ eval $(docker-machine env swarm-3) ➜ docker swarm join --token SWMTKN-1-33zfeg2ppr9043o4itdn2cznwn7yuy7na1fqg2aduoemihw93o- 3znh32dbpmb5goc8l1ia286it 172.16.140.157:2377 This node joined a swarm as a worker.
  • 30. 30 That’s it, you now have a Swarm Cluster!!!!
  • 31. 31 Now it’s time to install the Cinder Driver on each Node • Install the driver • Copy over a config file • Start the daemon • Restart Docker
  • 32. 32 You can just use docker-machine from your laptop… ➜ for each in $(docker-machine ls -q); do; docker-machine ssh $each "curl –sSL https://raw.githubusercontent.com/j-griffith/cinder-docker-driver/master/install.sh | sh -" ; done ➜ for each in $(docker-machine ls -q); do; docker-machine scp cdd.config.json $each:~/config.json; done ➜ for each in $(docker-machine ls -q); do; docker-machine ssh $each "sudo cinder-docker-driver --config config.json > cdd.log 2>&1 &" ; done ➜ for each in $(docker-machine ls -q); do; docker-machine ssh $each "sudo Service docker restart" ; done
  • 33. 33 About that install…. Config file is just OpenStack Creds Creating a Service file for the driver has made it’s way up pretty far on the TODO list { "Endpoint": "http://172.16.140.243:5000/v2.0", "Username": "jdg", "Password": “ABC123", "TenantID": "3dce5dd10b414ac1b942aba8ce8558e7“ }
  • 34. 34 Now you can do cool things Let’s build the simple counter application • Redis container with Cinder Volume • Web front end to take user input We’ll run this as a Swarm service, so we can do things like scale it, drain-nodes and move the containers uninterrupted. All while persisting our Redis data
  • 35. 35 Create a Docker network first so the Swarm nodes have a layer to communicate on… ➜ eval $(docker-machine env swarm-1) ➜ docker network create demo-net Bd45fad9911005ce2ff8e311a2738681d179589d8d06989a136e8020bc5a8155
  • 36. 36 Launch our services, start with the Redis service… ➜ eval $(docker-machine env swarm-1) ➜ docker service create --name redis --network demo-net –-mount type=volume,src=counter-demo,dst=/data,volume-driver=cinder -p 6379:6379 redis This will: • Pull the Redis image if it’s not available • Get/Create the volume on the Cinder backend • Attach the Volume to the Swarm node • Partition, Format and Mount the Volume • Link the volume to the Redis Containers /data directory • Start the Redis Container
  • 37. 37 You can see the attached volume on the Swarm Node…. ubuntu@swarm-3:~$ ls /dev/disk/by-path/ ip-10.10.9.1:3260-iscsi-iqn.2010-01.com.solidfire:ayyb.uuid-59e99b3b-c7d6-45c2-924c- virtio-pci-0000:00:04.0 virtio-pci-0000:00:04.0-part1 Same as we do for Nova Compute nodes… nothing really different except we add the file system
  • 38. 38 Now, the web service/frontend… ➜ docker service create --name web --network demonet -p 80:80 jgriffith/jgriffith webbase This will: • Connect to our Redis container (regardless of what Swarm node it’s on) • Expose port 80 to all of the Swarm Nodes (access from any Swarm Node IP) • Count input/clicks and store them in the Redis DB
  • 39. 39 Can’t show you a live demo  Next best thing…. Movies!!! 1. Create Swarm Cluster and install the Driver on Nodes 2. Create our Service using a Cinder Volume 3. Demo the Service and fail it over to another Node
  • 40. 40
  • 41. 41
  • 42. 42