What's New in Docker - February 2017

82
Patrick Chanezon, Docker Inc. @chanezon Container as a Service with Docker February 2017

Transcript of What's New in Docker - February 2017

Page 1: What's New in Docker - February 2017

Patrick Chanezon, Docker Inc.@chanezon

Container as a Servicewith Docker

February 2017

Page 2: What's New in Docker - February 2017

French

Polyglot

Platforms

Software Plumber

San Francisco

Developer Relations

@chanezon

Page 3: What's New in Docker - February 2017

1995 2015

Page 4: What's New in Docker - February 2017
Page 5: What's New in Docker - February 2017

PublicHybridPrivate

Ops Devops Developers

Page 6: What's New in Docker - February 2017

Linux Container Ecosystem

flockerglusterfs

weavecalicomidokuracisconuage

Cloud

OS

Plugins

Orchestration

Page 7: What's New in Docker - February 2017

Agility

Page 8: What's New in Docker - February 2017
Page 9: What's New in Docker - February 2017
Page 10: What's New in Docker - February 2017

Agile methodologies (circa 1999)

Page 11: What's New in Docker - February 2017
Page 12: What's New in Docker - February 2017

Low MTBIAMSH

MTBIAMSH (Mean Time Between Idea And Making Stuff Happen)

Page 13: What's New in Docker - February 2017

Agility == $$

Page 14: What's New in Docker - February 2017

Devops

Page 15: What's New in Docker - February 2017

25

Mainframe

Page 16: What's New in Docker - February 2017

Client-Server

26

Page 17: What's New in Docker - February 2017

27

Web

Page 18: What's New in Docker - February 2017

28

Cloud - Devops

Page 19: What's New in Docker - February 2017

Devops• Cultural movement • Inspired by agile methods• People, Processes & Tools• Continuous delivery• Infrastructure as code• Cross silo collaboration• Small iterations• Feedback loop, measurement

Image from Patrick Deboishttp://www.slideshare.net/jedi4ever/devops-the-war-is-over-if-you-want-ithttp://www.slideshare.net/jedi4ever/devopsdays-downundervfinal

Page 20: What's New in Docker - February 2017

Devops: singing Kumbaya?

Page 21: What's New in Docker - February 2017

28

http://highscalability.com/blog/2013/11/19/we-finally-cracked-the-10k-problem-this-time-for-managing-se.html

Server/Sysadmin

1999: 5(Windows) - 50 (Linux)2015: 10k-20kx2000

Page 22: What's New in Docker - February 2017

28

https://blog.docker.com/2014/12/dockercon-europe-keynote-continuous-delivery-in-the-enterprise-by-henk-kolk-ing/Henk Kolk, ING, DockerCon EU 2014

People, Processes, Products

deployment time: 9 months -> 15 min1500 deployments/week

Page 23: What's New in Docker - February 2017

Docker

Page 24: What's New in Docker - February 2017

The world needstools of mass innovation

Page 25: What's New in Docker - February 2017

A programmable Internet would be the ultimate tool of mass innovation

Page 26: What's New in Docker - February 2017

A commercial product,

built ona development platform,

built oninfrastructure,

built onstandards.

Docker is building a stack to program the Internet

Page 27: What's New in Docker - February 2017

Isolation using Linux kernel featuresnamespaces pid mnt net uts ipc user

cgroups memory cpu blkio devices

Page 28: What's New in Docker - February 2017

Image layers

Page 29: What's New in Docker - February 2017

Dockerfile

FROM java:8MAINTAINER Patrick Chanezon <[email protected]>EXPOSE 8080COPY spring-doge/target/*.jar /usr/src/spring-doge/spring-doge.jarWORKDIR /usr/src/spring-dogeCMD java -Dserver.port=8080 -Dspring.data.mongodb.uri=$MONGODB_URI -jar spring-doge.jarHEALTHCHECK --interval=5m --timeout=3s --retries=3 \ CMD curl -f http://localhost:8080/ || exit 1

Page 30: What's New in Docker - February 2017

Using Docker to compile your jar/war

https://registry.hub.docker.com/_/maven/

docker run -it --rm \-v $PWD:/usr/src/spring-doge \-v maven:/root/.m2 \-w /usr/src/spring-doge \maven:3.3-jdk-8 \mvn package

Page 31: What's New in Docker - February 2017

Build an imagedocker build -t chanezon/spring-doge .FROM java:8MAINTAINER Patrick Chanezon <[email protected]>EXPOSE 8080COPY spring-doge/target/*.jar /usr/src/spring-doge/spring-doge.jarWORKDIR /usr/src/spring-dogeCMD java -Dserver.port=8080 -Dspring.data.mongodb.uri=$MONGODB_URI -jar spring-doge.jarHEALTHCHECK --interval=5m --timeout=3s --retries=3 \ CMD curl -f http://localhost:8080/ || exit 1

Page 32: What's New in Docker - February 2017

Analyzing imagesdocker images javadocker history java:8

Page 33: What's New in Docker - February 2017

Run a containerdocker run \—env MONGODB_URI=mongodb://mongo:27017/test \-p 8090:8080 \chanezon/spring-doge

Page 34: What's New in Docker - February 2017

docker-compose: running multiple containers Run your stack with one command: docker-compose

up Describe your stack with one file: docker-compose.ymlversion: '2'services: web: image: chanezon/spring-doge ports: - "8080:8080" links: ["mongo"] environment: - MONGODB_URI=mongodb://mongo:27017/test mongo: image: mongo

Page 35: What's New in Docker - February 2017

docker stack deploy Deploy your stack with one command: docker stack deploy

Describe your stack with one file: docker-compose.ymlversion: '3'services: web: image: chanezon/spring-doge ports: - "8004:8080" environment: - MONGODB_URI=mongodb://mongo:27017/test depends_on: - mongo deploy: replicas: 2 update_config: parallelism: 2 delay: 10s restart_policy: condition: on-failure mongo: image: mongo

Page 36: What's New in Docker - February 2017

Demo

Page 37: What's New in Docker - February 2017

• Spring Boot, Spring Data• AngularJS front-end• docker 1.12• compose 1.8.1

Spring Boot App using MongoDB

https://github.com/joshlong/spring-doge

https://github.com/chanezon/docker-tips/https://github.com/chanezon/spring-doge

Page 38: What's New in Docker - February 2017

Docker Java Labs

https://github.com/docker/labs/tree/master/developer-tools/

• Wildfly and Couchbase J2EE App• Debugging a Java app in Docker using Eclipse

Page 39: What's New in Docker - February 2017

What’s New?

Page 40: What's New in Docker - February 2017

1.

Developer experience

Page 41: What's New in Docker - February 2017

1. Get out of the way

The best tools…

2. Adapt to you

3. Make thepowerful simple

Page 42: What's New in Docker - February 2017

Docker for Mac Docker for Windows

Page 43: What's New in Docker - February 2017

2.

Orchestration

Page 44: What's New in Docker - February 2017

Introducing the best way to orchestrate Docker: Docker.

Docker 1.12: now with orchestration built-in.

Page 45: What's New in Docker - February 2017

Swarm mode

Service API

Cryptographic node identity

Built-in routing mesh

Docker 1.12: now with orchestration built-in.

Page 46: What's New in Docker - February 2017

Using the beta? You already have 1.12 installed.

> docker swarm init> docker service create

Page 47: What's New in Docker - February 2017

3.

Ops experience

Page 48: What's New in Docker - February 2017

Deep integration with native load-balancers, templates,SSH keys, ACLs, scaling groups, firewall rules…

Page 49: What's New in Docker - February 2017
Page 50: What's New in Docker - February 2017

Docker & Microsoft• Build

• Docker Toolbox & Kitematic for Windows• Docker for Windows beta• Docker engine on Windows Server 2016 TP4• yo-docker to dockerize existing projects• Visual Studio Docker Tools

• Ship• VSTS extension for Docker beta

• Run• Azure Docker agent• ACS• Docker datacenter on Azure ARM template• Azure Container Service

Page 51: What's New in Docker - February 2017

Docker Store

Page 52: What's New in Docker - February 2017

What’s New in Docker 1.13• Compose file support for Swarm mode service deployment

• docker stack deploy --compose-file=docker-compose.yml my_stack• System commands

• docker system df• docker system prune

• Monitoring• docker service logs• Prometheus experiment endpoint

• Build• docker build —squash

• CPU management —cpus 2.5• Docker for AWS & Azure GA

Page 53: What's New in Docker - February 2017

Docker CaaS

Page 54: What's New in Docker - February 2017

5

XaaS Pyramid

Platform As A Service

Infrastructure As A Service

SoftwareAs A Service

Page 55: What's New in Docker - February 2017
Page 56: What's New in Docker - February 2017
Page 57: What's New in Docker - February 2017

5

Goldilocks and the 3 XaaS

Just rightToo highToo lowIaaS PaaS CaaS

Page 58: What's New in Docker - February 2017

5

Goldilocks and the 3 XaaS

Platform As A Service

Infrastructure As A Service

SoftwareAs A Service

Too high

Too low

Just right

Container As A Service

Page 59: What's New in Docker - February 2017

Example

“- When do you guys support FORTRAN?- Sorry it’s not supported by Cloud Foundry yet”

Page 60: What's New in Docker - February 2017

Goals

+ +

Agility Portability Control

Page 61: What's New in Docker - February 2017

BUILDDevelopment Environments

SHIPRegistry: Secure Content &

Collaboration

RUNControl Plane: Deploy,

Orchestrate, Manage, Scale

Networking Volumes MonitoringLoggingConfig MgtCI/CD

IT OperationsDevelopers IT Operations

Docker CaaS Workflow

Page 62: What's New in Docker - February 2017

Docker Universal Control Plane

Integrated Security

Docker EngineContainer runtime, orchestration, networking, volumes, plugins

Docker Trusted Registry

Operating Systems Config Mgt Monitoring LoggingCI/CD ..more..Images Networking Volumes

VirtualizationPublic Cloud Physical

Docker Datacenter

Docker Datacenter platform

Page 63: What's New in Docker - February 2017

Usable Security

Secure defaults with tooling that is native to both dev and ops

The Key Components of Container Security

Infrastructure Independent

Trusted Delivery

Safer Apps

Everything needed for a full functioning app is delivered safely and guaranteed to not be tampered with

All of these things in your system are in the app platform and can move across infrastructure without disrupting the app

+

+

=

Page 64: What's New in Docker - February 2017

Usable Security

Integrated Security with Docker Datacenter

Infrastructure Independent

Trusted Delivery

Safer Apps

Image Scanning

TLS EncryptionEncryption at Rest

App Secrets

Image Signing & Verification

Public CloudVirtualizationPhysical

Users & RBAC

Dev/Ops Workflow

+

+

=

Secure by default runtime

Page 65: What's New in Docker - February 2017

Docker Universal Control Plane

Page 66: What's New in Docker - February 2017

UCP Permission Model

Page 67: What's New in Docker - February 2017

What’s New in Docker Datacenter

Page 68: What's New in Docker - February 2017

What’s New in Docker Datacenter on Docker 1.13

Application Services Content Trust and Distribution

Platform Enhancements

• Secrets Management

• HTTP Routing Mesh (GA)

• Docker Compose for Services

• Access control for Secrets and Volumes

• Image Content Cache

• On premises image security scanning and vulnerability monitoring

• Registry Webhooks

• DTR install command from UI

• UI Enhancements

• Additional LDAP configs

• Templates for AWS, Azure

Page 69: What's New in Docker - February 2017

Integrated Secrets Management

WorkerWorker

Manager

Internal Distributed Store

Raft Consensus Group

ManagerManager

Worker

External App

Web UI

• Management– Admins can add/remove/list/update

secrets in the cluster– Exposed to a container via a ”/secrets”

tmpfs volume• Authorization

– Tag secrets to a specific service– Admins can authorize secrets access

to users/teams via RBAC• Rotation

– Use GUI to update a secret to all containers in a service

• Auditing– Each user request for secret access

logged in cluster for auditing

Page 70: What's New in Docker - February 2017

Security Scanning: Get a full BOM for a Docker Image

Page 71: What's New in Docker - February 2017

Security Scanning: Vulnerabilities and Licensing for Each Component

Page 72: What's New in Docker - February 2017

Security Scanning: Set Automated Policy for Scanning

Page 73: What's New in Docker - February 2017

Security Scanning: Online and Offline Updates

Page 74: What's New in Docker - February 2017

Compose for Services

• Deploy stacks (services, volumes, networks, secrets) using new Compose file v3.1 format

• Manage and monitor stacks directly from UCP UI

Page 75: What's New in Docker - February 2017

Built in HTTP Routing Mesh (Now GA!)

• Extend TCP routing mesh to HTTP hostname routing for services

• HTTPS support via SNI protocol

• Support for multiple HRM networks for enhanced app isolation

• External LB routes hostnames to nodes

• Can add hostname routing via UI

• Non-service containers continue to use Interlock ref arch

WorkerWorkerWorker

External Load Balancer

Traffic via DNS (http to port 80 or other)

Foo.com Bar.com Qux.com

R RR

Page 76: What's New in Docker - February 2017

Docker Use Cases

Page 77: What's New in Docker - February 2017

Docker users alreadyrunning in production

60%

Docker in Production

Docker Survey: State of ApplicationsQ1 2016

Cluster HQ: State of Container Usage June 2016

Companies running container technology in production

(500+ employees)

Page 78: What's New in Docker - February 2017

Across the EnterpriseHealthcareMedia Financial Services

…And More

E-commerce / Consumer

Services TechGovernment

Page 79: What's New in Docker - February 2017

Docker Enabling Critical Transformations

80%Docker is central to

cloud strategy

Docker Survey: State of App development : Q1 - 2016

3 out 4 Top initiatives revolve around applications

44%Looking to adopt DevOps

App Modernization

DevOpsCloud

Page 80: What's New in Docker - February 2017

The Data Shows Hybrid Infrastructure and Applications

2016 Docker Use Cases

Docker Survey: State of App development : Q1 - 2016

Docker Workloads

Page 81: What's New in Docker - February 2017

• Spring Boot, MongoDB, compose, swarm, networking• https://github.com/joshlong/spring-doge• https://github.com/chanezon/docker-tips/orchestration-

networking• Java EE 7 / Angular App with Docker Swarm by @mgreau

Compose for build and deploy, Wildfly, Apache, Angular, Mysql, Redis, batch and API apps• https://github.com/mgreau/docker4dev-tennistour-app

• Java EE Docker & Kubernetes by @arun-gupta• https://github.com/javaee-samples/docker-java

Java Examples

Page 82: What's New in Docker - February 2017

THANK YOU