Package your Java Application using Docker and Kubernetes. Arun

Similar documents
Container Orchestration on Amazon Web Services. Arun

Kubernetes: Twelve KeyFeatures

Kubernetes introduction. Container orchestration

An Introduction to Kubernetes

Scaling Jenkins with Docker and Kubernetes Carlos

Container-Native Storage

agenda PAE Docker Docker PAE

Federated Prometheus Monitoring at Scale

Understanding and Evaluating Kubernetes. Haseeb Tariq Anubhavnidhi Archie Abhashkumar

@briandorsey #kubernetes #GOTOber

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

Triangle Kubernetes Meet Up #3 (June 9, 2016) From Beginner to Expert

A REFERENCE ARCHITECTURE FOR DEPLOYING WSO2 MIDDLEWARE ON KUBERNETES

Kuber-what?! Learn about Kubernetes

OpenShift + Container Native Storage (CNS)

Kubernetes 101. Doug Davis, STSM September, 2017


UP! TO DOCKER PAAS. Ming

Think Small to Scale Big

You Have Stateful Apps - What if Kubernetes Would Also Run Your Storage?

Important DevOps Technologies (3+2+3days) for Deployment

Kubernetes: What s New

What s New in K8s 1.3

Kubernetes made easy with Docker EE. Patrick van der Bleek Sr. Solutions Engineer NEMEA

Bringing Security and Multitenancy. Lei (Harry) Zhang

Launching StarlingX. The Journey to Drive Compute to the Edge Pilot Project Supported by the OpenStack

Operating Within Normal Parameters: Monitoring Kubernetes

WHITE PAPER. Kubernetes Deployment Models: The Ultimate Guide

Kubernetes objects on Microsoft Azure

What s New in Red Hat OpenShift Container Platform 3.4. Torben Jäger Red Hat Solution Architect

Backup strategies for Stateful Containers in OpenShift Using Gluster based Container-Native Storage

Introduction to Kubernetes Storage Primitives for Stateful Workloads

How to build scalable, reliable and stable Kubernetes cluster atop OpenStack.

DevOps Workflow. From 0 to kube in 60 min. Christian Kniep, v Technical Account Manager, Docker Inc.

Red Hat Roadmap for Containers and DevOps

Kubernetes: Integration vs Native Solution

OpenShift 3 Technical Architecture. Clayton Coleman, Dan McPherson Lead Engineers

GoDocker. A batch scheduling system with Docker containers

Building an on premise Kubernetes cluster DANNY TURNER

What s New in K8s 1.3

Fixing the "It works on my machine!" Problem with Docker

Kubernetes Integration with Virtuozzo Storage

Building a Kubernetes on Bare-Metal Cluster to Serve Wikipedia. Alexandros Kosiaris Giuseppe Lavagetto

Table of Contents HOL CNA

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

Kuberiter White Paper. Kubernetes. Cloud Provider Comparison Chart. Lawrence Manickam Kuberiter Inc

Kubernetes 1.9 Features and Future

More Containers, More Problems

Managing Compute and Storage at Scale with Kubernetes. Dan Paik / Google

VMWARE PIVOTAL CONTAINER SERVICE

JFOKUS 2017 EXPERIENCES FROM USING DISCOVERY SERVICES IN A MICROSERVICE LANDSCAPE

/ Cloud Computing. Recitation 5 February 14th, 2017

Raw Block Volume in Kubernetes Mitsuhiro Tanino, Principal Software Engineer, Hitachi Vantara

Orchestration in Docker

/ Cloud Computing. Recitation 5 September 26 th, 2017

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

Zero to Microservices in 5 minutes using Docker Containers. Mathew Lodge Weaveworks

Managing and Protecting Persistent Volumes for Kubernetes. Xing Yang, Huawei and Jay Bryant, Lenovo

Kubernetes. Introduction

Running MarkLogic in Containers (Both Docker and Kubernetes)

Two years of on Kubernetes

Kubernetes, Persistent Volumes and the Pure Service Orchestrator. Simon Dodsley, Director of New Stack Technologies

Continuous delivery while migrating to Kubernetes

RED HAT GLUSTER TECHSESSION CONTAINER NATIVE STORAGE OPENSHIFT + RHGS. MARCEL HERGAARDEN SR. SOLUTION ARCHITECT, RED HAT BENELUX April 2017

Onto Petaflops with Kubernetes

Code: Slides:

Evolution of Kubernetes in One Year From Technical View

Red Hat Containers Roadmap. Red Hat A panel of product directors

DevOps Technologies. for Deployment

Containers Infrastructure for Advanced Management. Federico Simoncelli Associate Manager, Red Hat October 2016

CONTINUOUS INTEGRATION CONTINUOUS DELIVERY

Kubernetes - Networking. Konstantinos Tsakalozos

Continuous Delivery of Micro Applications with Jenkins, Docker & Kubernetes at Apollo

Designing MQ deployments for the cloud generation

Why Kubernetes Matters

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Cloud Native Java with Kubernetes

利用 Mesos 打造高延展性 Container 環境. Frank, Microsoft MTC

Internals of Docking Storage with Kubernetes Workloads

FROM MONOLITH TO DOCKER DISTRIBUTED APPLICATIONS

Hacking and Hardening Kubernetes

Red Hat Enterprise Linux Atomic Host 7 Getting Started with Kubernetes

Scheduling in Kubernetes October, 2017

EASILY DEPLOY AND SCALE KUBERNETES WITH RANCHER

So, I have all these containers! Now what?

TensorFlow on vivo

Installation and setup guide of 1.1 demonstrator

KubeNow Documentation

Above the clouds with container-native storage

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

VMWARE PKS. What is VMware PKS? VMware PKS Architecture DATASHEET

Enterprise Kubernetes

What s New in Kubernetes 1.10

Taming Distributed Pets with Kubernetes

AGILE RELIABILITY WITH RED HAT IN THE CLOUDS YOUR SOFTWARE LIFECYCLE SPEEDUP RECIPE. Lutz Lange - Senior Solution Architect Red Hat

Table of Contents. Section 1: Overview 3 NetScaler Summary 3 NetScaler CPX Overview 3

Webinar Series. Cloud Native Storage. May 17, 2017

VMware Integrated OpenStack with Kubernetes Getting Started Guide. VMware Integrated OpenStack 4.1

OpenStack Magnum Pike and the CERN cloud. Spyros

개발자와운영자를위한 DevOps 플랫폼 OpenShift Container Platform. Hyunsoo Senior Solution Architect 07.Feb.2017

Transcription:

Package your Java Application using Docker and Kubernetes Arun Gupta, @arungupta

Docker Captain Java Champion JavaOne Rock Star (4 years) NetBeans Dream Team Silicon Valley JUG Leader Author Runner Lifelong learner 2

Docker Workflow 3

Orchestration Frameworks Developer Core concepts Cluster Single container Multi-container Service discovery & LB Persistent Volumes Ops Multiple master Scheduler Rules and constraints Monitoring Rolling Update Cloud/commercial support Local development 4

Core Concepts: Docker Manager docker swarm init --listen-addr <ip>:2377 5

Core Concepts: Docker Worker docker swarm join --token <worker_token> <manager>:2377 6

Core Concepts: Add More Workers docker swarm join --token <worker_token> <manager>:2377 7

Core Concepts: Primary/Secondary Master docker swarm join --manager --token <manager_token> --listenaddr <master2>:2377 <master1>:2377 8

Core Concepts: Cluster Raft Consensus Group primary secondary secondary Container Swarm Manager Swarm Manager Swarm Manager Swarm Worker Swarm Worker Swarm Worker Swarm Worker Swarm Worker Gossip Network Strongly consistent Replicated (Raft based) Extremely fast (in-memory reads)

Core Concepts: Replicated Service docker service create --replicas 3 --name web jboss/wildfly 10

Core Concepts: Node Failure X 11

Core Concepts: Desired!= Actual 12

Core Concepts: Reconcile 13

Core Concepts: Container Failure X 14

Core Concepts: Desired!= Actual 15

Core Concepts: Reconcile 16

Core Concepts: Scale docker service scale web=6 17

Core Concepts: Global Service docker service create --mode=global --name=prom prom/prometheus 18

Core Concepts: Kubernetes Pods: colocated group of containers that share an IP, namespace, storage volume Replica Set: manages the lifecycle of Node Docker Pod pods and ensures specified number are running (next gen Replication Controller) Service: Single, stable name for a set of pods, also acts as LB Label: used to organize and select group of objects db port 8091 port 8091 Containers 2016 Couchbase Inc. 19

Core Concepts: Kubernetes Master Node: Machine or VM in the cluster API Server (pods, services, ) Master: Central control plane, provides unified view of the cluster etcd: distributed key-value store used Scheduler Controller Manager to persist Kubernetes system state Worker: Docker host running kubelet Kubelet Proxy Worker etcd etcd etcd (node agent) and proxy services Runs pods and containers Docker Monitored by systemd (CentOS) or monit (Debian) 2016 Couchbase Inc. 20

Kubernetes Cluster Internet kubectl Kubelet Proxy Worker Load Balancer Master Docker API Server (pods, services, ) Scheduler Controller Manager Kubelet Proxy Worker etcd etcd etcd Docker 21 2016 Couchbase Inc.

Service Discovery & LB: Docker Docker Compose Define and run multi-container applications Configuration defined in one or more files docker-compose.yml (default) docker-compose.override.yml (default) Multiple files specified using -f Deployed as Docker Stack Great for dev, staging, and CI 22

Service Discovery with Docker docker stack deploy --compose-file=docker-compose.yml webapp 23

Stack Service Task 24

Load Balancing: Docker Load Balancer docker service create --replicas 3 --name web -p 8080:8080 jboss/ wildfly 25

Service Discovery: Kubernetes Service: Abstract a set of pods as a single IP and port Simple TCP/UDP load balancing Creates environment variables in other pods or DNS resolution Stable endpoint for pods to reference Allows list of pods to change dynamically 2016 Couchbase Inc. 26

Service Discovery with Kubernetes 2016 Couchbase Inc. 27

Couchbase Service: Kubernetes Node Couchbase Service 2016 Couchbase Inc. 28

Service and Replica Set: Kubernetes frontend Couchbase Service backend 2016 Couchbase Inc. 29

Docker Volumes: Persistent Containers Implicit Per-Container Explicit Per-Container Per-Host Multi-Host What? Default sandbox Explicit volume Directory on host Storage on distributed file systems Location /var/lib/docker/ volumes on the host /var/lib/docker/ volumes on the host Mounted within container Ceph, GlusterFS, NFS, Container crash Directory unavailable Directory unavailable Yes Yes Host crash Directory unavailable Directory unavailable No Yes Shared No Yes Yes (host only) Yes (cluster wide) 30

Docker Volume Plugin Batteries included, but replaceable Includes default driver for host-based volumes Plugins enables containers to be integrated with external storage systems For example, Amazon EBS, Azure Storage and GCE Persistent Disks 31

Docker Volume Plugin Architecture Docker Client Docker Host local Storage Backend Storage Backend Plugin Client Plugin Daemon Storage Backend Storage Backend 32

Docker Volume Plugin with Portworx Docker Client Docker Host Portworx Client PX-Dev portworx Amazon EBS 33

Kubernetes Volume Directory accessible to the containers in a pod Volume outlives any containers in a pod Common types hostpath nfs awselasticblockstore gcepersistentdisk 2016 Couchbase Inc. 34

http://blog.couchbase.com/2016/july/stateful-containers-kubernetes-amazon-ebs Kubernetes Persistent Volume 1 2 3 Provision Network Storage Request Storage Use Claim PersistentVolume PersistentVolumeClaim Claims are mounted as volumes 2016 Couchbase Inc. 35

Kubernetes Volume: Persistent Container Pod Couchbase Docker Container Replication Controller Publicly accessible Service master worker worker Amazon Web Services Kubernetes Cluster Storage 2016 Couchbase Inc. 36

Kubernetes Volume: Persistent Container master worker worker EBS Amazon Web Services 2016 Couchbase Inc. http://blog.couchbase.com/2016/july/stateful-containers-kubernetes-amazon-ebs 37

https://github.com/arun-gupta/couchbase-kubernetes/tree/master/cluster-petset-portworx Kubernetes: Persistent Containers with Portworx master worker worker Amazon Web Services SSD EBS SAN 2016 Couchbase Inc. HDD S3 38

Development: Docker Docker Community Edition Docker for Mac/Windows/Linux Monthly edge and quarterly stable releases Native desktop or cloud provider experience 39

Development: Kubernetes Single node cluster minikube Multi-node cluster kops kube-aws (CoreOS + AWS) kube-up (deprecated) Google Cloud, Azure, Tectonic, 40

21 21 Rolling Update: Docker 21 21 21 21 docker service update web --image wildfly:2 --update-parallelism 2 --update-delay 10s 41

Rolling Update: Kubernetes webapp-rc 1 1 1 Application Service webapp-rc-xxxx 2 2 2 etcd 2016 Couchbase Inc. https://github.com/arun-gupta/kubernetes-java-sample/tree/master/rolling-update 42

Monitoring: Docker docker container stats CLI Docker Remote API docker system events CLI In-built Prometheus endpoint cadvisor 43

Monitoring: Docker 44

Monitoring: Kubernetes Master Kubelet cadvisor Worker Kubelet cadvisor Worker Kubelet cadvisor Worker InfluxDB + Grafana Heapster 45 2016 Couchbase Inc.

2016 Couchbase Inc.

Monitoring: Docker and Kubernetes 2016 Couchbase Inc. 47

References Docker: docker.io Kubernetes: kubernetes.io Slides: https://github.com/javaee-samples/docker-java 48

www.developersummit.com www.modsummit.com