Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD...

43
© Electric Cloud | electric- cloud.com Nikhil Vaze | @therealnikhil | DOES 2015 CREATE YOUR OWN SELF-SERVICE CLOUD: DOCKER CONTAINERS AS PART OF A CD PIPELINE

Transcript of Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD...

Page 1: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Nikhil Vaze | @therealnikhil | DOES 2015

CREATE YOUR OWN SELF-SERVICE CLOUD: DOCKER CONTAINERS AS

PART OF A CD PIPELINE

Page 2: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Introductions

Nikhil Vazehttps://github.com/nikhilv@therealnikhil

Staff Software Engineer at Electric CloudFull stack engineer and loves to hack on things. Johns Hopkins University Alum

Page 3: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

DEV

OPS

Electric Cloud: Powering Continuous Delivery

ElectricFlow

Deploy

Pipeline Management and Visibility

ElectricAccelerator

Build & Test Acceleration

DevOps Automation Platform (ElectricFlow)

Build

DELIVERY

Plugs right in to your existing tools

CONTINUOUS

Build Test

Page 4: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

I spend my time on integrationsSource Control, Defect Tracking, Databases, Clouds, Testing tools , Application Servers….

Page 5: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Our integrations are going Open Source

https://electric-cloud.github.io/

Page 6: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Experience with DockerGeneral interest in Docker, containers and application deployment.

Docker Santa Clara Co-organizer: http://www.meetup.com/Docker-Santa-Clara/

Docker Hackathon 2014http://blog.docker.com/2014/07/dockercon-video-dockercon-hackathon-winners/

Lightning demo @ DOES ‘14 Docker and Application Deployment

Page 7: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Docker Survey: Keep your hands up if …

If you’ve heard of DockerYou’ve typed ‘docker run…’You use docker in dev/testYou use docker in production

You have exported a docker container and run it with systemd-nspawn

Page 8: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Overview: The pain of procuring new IT systems

Page 9: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Ring a bell?

Source Docker Con 2015: https://www.youtube.com/watch?v=RaSzmFkf4fM

Page 10: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Enterprises have not adopted the cloud

Source: Intel presentation @ OpenStack Silicon Valley 2015

Page 11: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Fortune 500 use case

Page 12: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Fortune 500 company (repeat picture)

Source Docker Con 2015: https://www.youtube.com/watch?v=RaSzmFkf4fM

Page 13: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Challenges

One group provides infrastructure. Another group provisions software on top of the infrastructure. Another group performs the data load onto the software/infrastructure.

Cons:Quite expensive. Front loaded. If you want this particular app loaded for testing. It will involve x thousands of dollars of cost.

Process encouraged bad behavior. Users were requesting infrastructure and never letting it go.

Page 14: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

(The Actual slide)

Page 15: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Enter Electric Cloud!

Page 16: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Page 17: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Question we (Electric Cloud) asked ourselves ~ early 2014

- Who else was facing this?

- Could we make this a feature?

- Does the introduction of Docker change things?

Page 18: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Dynamic Environments / Self Service Clouds

Page 19: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Answers we (Electric Cloud) gathered~ mid/late 2014

- Who else was facing this?- Common problem facing the industry

- Could we make this a feature?- Yes.

- Does the introduction of Docker change things?- Yes. And it’s the future.

Page 20: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

What are Dynamic environments?

Define once, provision repeatedly Define a blue print. Make it available to your users

Cloud ready Apply the blue print to your cloud

Configuration Management ready Already have a blue print in your CM tool? No problem!

Docker ready

Page 21: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Intro Docker*

Page 22: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Enter Docker

• https://docker.io/• Open Source• Used to wrap LXC, now has its own container implementation• Really, really fast. Start measuring in milliseconds

Page 23: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Docker 102 – Different drivers

Page 24: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Docker 102 containers vs. VMs

Page 25: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Docker 102 VMs vs. Docker

Page 26: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Docker 102, Docker Client, Docker Engine

Page 27: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Docker 102 Diagram of potential Flow dev

Page 28: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Why are people excited about containers?

Builds can be done inside the container, gives file system isolation and reproducibility.

Development/Production Parity. The container is the deployable artifact.

Container start up times measured in milliseconds

Microsoft getting on board!

Page 29: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Explanation of demo

Page 30: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Blog post I’ve extended for this following for this talk

Docker Service Discovery Using Etcd and Haproxy http://jasonwilder.com/blog/2014/07/15/docker-service-discovery/

Page 31: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Availability Zone ALoad Balancer

HA Proxy

Service Discovery

etcd

NoSQL Database

Couchbase

Application

Dockerized App in Prod

Page 32: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Availability Zone BAvailability Zone ALoad Balancer

HA Proxy

Service Discovery

etcd

NoSQL Database

Couchbase

Application Application

NoSQL Database

Couchbase

Multi AZ Dockerized App

Page 33: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

ComparisonBefore After

Page 34: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Load Balancer (HAProxy)

Page 35: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Couchbase

- NoSQL DB- One Dimensional or Multi Dimensional Scaling- Rebalancing

More info: http://blog.arungupta.me/

getting-started-with-couchbase-using-docker/

Page 36: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Front endCreated by Couchbase employees

Node.js, Angular.js and Express front end

Github: https://github.com/tleyden/try-cb-nodejs

Page 37: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Etcd (Service Registry)

etcd is a distributed, consistent key-value store for shared configuration and service discovery, with a focus on being:

Simple: curl'able user facing API (HTTP+JSON)

Secure: optional SSL client cert authentication

Fast: benchmarked 1000s of writes/s per instance

Reliable: properly distributed using Raft

Page 38: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Before I forget…

Page 39: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Try out our community edition!

http://electric-cloud.com/downloads/electricflow/communityedition

Page 40: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Demo

Page 41: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Wrap up

Page 42: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Automation & Self Service Clouds, FTW!

• Cloud may or may not be first step but doesn’t immediately empower all users.

• Self Service can reduce barriers for their users and improve productivity

• Docker makes things easier

• You need automation!

Page 43: Nikhil Vaze - Electric Cloud - Create your own self-service cloud: Docker containers as part of a CD Pipeline

© Electric Cloud | electric-cloud.com

Thank youNetworking

Other Systems

ISV, Internet & Entertainment

Heavy Industry

Financial Services

Automotive Medical Devices

Semiconductor

Aerospace /Defense

Mobile Devices

Q&A