Containers and Docker @NetApp 09 Mars 2017 Christophe Danjou & Thibaud Lenik C
1. What are Containers? 2. Why Containers and Docker? Agenda 3. Using Docker with NetApp 2 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
What are Containers? 3 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Just a Hype? The Story with the Popcorn 4 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Just a Hype? The Story with the Popcorn 5 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution.
Just a Hype? Some facts! 6 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
History of Containers Old technology made new 2000 FreeBSD Jails 2001 Linux VServer 2004 Solaris Zone 2008 Linux LXC 2014 Docker 7 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Containers before Docker... Only for hardcore developers 8 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
What Is Docker? Implementing the Microservices Architecture Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications Docker enables applications to be quickly assembled from components and eliminates friction between dev, test, QA, and production Do one thing, do it well Ship faster, run anywhere Build Ship Run 9 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Containers are not Virtual Machines Containers versus virtual machines 10 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Container Components Image Storage Networking Volumes The container image holds the application code and binaries, supporting libraries, and other components needed to execute the application Stored in a repository Hosted publicly Docker Hub, Quay.io, and so on Hosted privately Docker Trusted Repository, Artifactory, and so on Layers are shared (Copy-on-Write) 11 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Docker Hub hub.docker.com Free for public images 12 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Container and Layers Docker image structure 13 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Container Components Image Storage Networking Volumes Union File System Used for container images Each modification is a layer on top of the previous set of modifications Only the top layer is writable Stored in /var/lib/docker of host system by default Can use btrfs, devicemapper, OverlayFS, ZFS, and/or AUFS depending on host OS 14 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Container Components Image Storage Networking Volumes Each container is mapped to a private, host-only, adapter The container ports can be mapped to the host to provide external connectivity Containers on the same host can communicate, containers on different hosts must have ports mapped 15 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Container Components Image Storage Networking Volumes Data volumes are attached to the container at the specified mount point Initialized when the container is created Shareable and reusable Persistent Default location of /var/lib/docker Host directories and files can be mounted as volumes 16 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Why Containers and Docker? 17 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. T
Applications Are Hard Monolithic applications Hard to update - single massive code base Single dimension of scalability Waterfall development practices Static, linear phases Requirements Analysis Design Code Test Deploy Apache WAR UI Service Image Service Search Service Tomcat Database 18 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. T
Simplify the Problem Microservices Each component is independently developed and scaled Everything is a platform DevOps Continuous Integration Finding and fixing bugs faster Continuous Deployment Releasing faster Load Balancer Tier App Tier UI Service Database Tier Image Service Search Service 19 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. T
Containers Benefit the Business Benefits of well designed containerized applications Higher infrastructure utilization for app processing Containers use less CPU, memory, and storage than VMs Reduce Hypervisor and GuestOS overhead (and licenses) No boot, only process instantiation seconds vs minutes Faster deployments of apps and their updates App development lifecycle is simplified because Dev = Stage = Prod environment Reduces set-up, testing, and documentation time and costs No Hypervisor, No Guest OS Developers are proving Time-to-Market efficiencies over monolithic or traditional virtualization architectures 20 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. T
DevOps Workflow Traditional development / deployments vs Containers Without Container With Container Developer Operator Developer Operator Request resources Provide resources Create Image Scripting deployment Adjust deployment Adjust deployment Repository Provide resources Dependences Install dependences App roll out App roll out 21 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. T
Real use cases Google s Gmail services and more Google use containers since 2008 2 Billions Container every week Spotify use Containers to serve 60 Millions customers www.leshop.ch use Containers for the whole services 22 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. T
Where runs the Docker Engine? Available Platforms Various Linux distributions RedHat / CentOS Ubuntu SUSE VMware Photon OS CoreOS... and many more Cloud Providers Amazon EC2 Container Service Microsoft Azure Google Container Engine Rackspace... and many many more Microsoft Windows 2016 23 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. T
Containers in production Challenges Networking HA Monitoring Security Storage and more... 24 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. T
Using Containers with NetApp 25 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Data doesn t really change with containers Structured Data Unstructured Data 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
...there are still many ways of storing it... SQL Object Stores NoSQL Filesystems 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
The Early Days Running Container Docker Engine App Container Data Container App Container NFS Mount NFS Server Data Containers NFS Mounts & directory mapping 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Docker Volumes on Local Storage docker volume create --name V1 docker run --name C1 -v V1:/foobar alpine ash docker run --name C2 -v V1:/foobar alpine ash Pros Works out of the box Reusable C1 and C2 could share data now Cons Not resilient to failure Data is stuck on host C1 C2 C3 V1 C4 C5 Open Questions What happens if my host fails? Backup? How can C5 access V1? 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Docker Data Volumes Since Docker 1.8 Data lives outside of a running container Directly on Docker Host or externally Open API for integration 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
The NetApp Docker Volume Plugin (ndvp) Drivers for all NetApp primary storage platforms ONTAP SolidFire E-Series Open source! Easy to use docker volume integration More information: http://nt-ap.com/1xjwtha 32 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
NetApp Docker Volume Plugin Developers can directly provision persistent storage for containers from CLI on ONTAP, E/EF-Series or SolidFire system https://github.com/netapp/netappdvp docker volume create -d netapp --name new_vol docker run -it -v new_vol:/mnt/new_vol alpine ash docker volume create -d solidfire -o type=gold -o size=10 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Docker Client 1. Client calls docker volume create -d netapp --name new_vol and docker run xyz Running Container C1 2. Client starts new container and references the volume Server + Docker Engine Mount inside container 3. Volume is mounted into Container Storage 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Persisting Container Data with Flocker Download from: https://github.com/netapp/netapp-flocker-driver 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
NetApp s Focus Abstraction Layer Compute with Container Engine Workload Mobility through Containers Storage Data Mobility powered by NetApp Data Fabric On Premise Data Center(s) Public Cloud(s) 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution.
Summary Data Volumes are the proposed solution from Docker Easiest way to persist information for stateful applications Integration into Orchestration Frameworks is growing...but too many people are doing duplicate work! 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Resources 47 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
ThePub @ netapp.github.io Code Repos @ GitHub Container Integration OpenStack integration Tech Blog Posts Resources Conference Talks Partner Solutions (e.g., RedHat, Mirantis) 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Further Reading Using Docker Volumes with Docker Compose https://netapp.github.io/blog/2016/06/14/using-netapp-docker-volume-plugin-with-docker-compose/ Volume Options for NetApp Docker Volume Plugin https://netapp.github.io/blog/2016/06/16/volume-options-with-the-netapp-docker-volume-plugin/ Using Kubernetes with persistent iscsi storage http://netapp.github.io/blog/2016/06/08/netapp-persistent-storage-in-kubernetes-using-ontap-and-iscsi/ Using Kubernetes with persistent NFS storage http://netapp.github.io/blog/2016/05/11/netapp-persistent-storage-in-kubernetes-using-ontap-and-nfs/ 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution. C
Thank you! 2016 NetApp, Inc. All rights reserved. NetApp Highly Confidential Information. Unreleased product plans may change, not for distribution.