Orchestrating Docker containers at scale

Similar documents
UP! TO DOCKER PAAS. Ming

Investigating Containers for Future Services and User Application Support

Migrating an Application into the Cloud with Docker and CoreOS

Who is Docker and how he can help us? Heino Talvik

agenda PAE Docker Docker PAE

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

CONTAINERS AND MICROSERVICES WITH CONTRAIL

ovirt and Docker Integration

Travis Cardwell Technical Meeting

Container-based virtualization: Docker

USING DOCKER FOR MXCUBE DEVELOPMENT AT MAX IV

Code: Slides:

Engineering Robust Server Software

An introduction to Docker

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Think Small to Scale Big

Lightweight Containerization at Facebook

Introduction to Containers

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

INFRASTRUCTURE AS CODE

Cloud I - Introduction

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

Introduction to containers

Amir Zipory Senior Solutions Architect, Redhat Israel, Greece & Cyprus

[Docker] Containerization

Docker und IBM Digital Experience in Docker Container

Taming your heterogeneous cloud with Red Hat OpenShift Container Platform.

Red Hat Roadmap for Containers and DevOps

Red Hat Atomic Details Dockah, Dockah, Dockah! Containerization as a shift of paradigm for the GNU/Linux OS

Introduction to Docker. Antonis Kalipetis Docker Athens Meetup

Docker A FRAMEWORK FOR DATA INTENSIVE COMPUTING

Red Hat OpenShift Roadmap Q4 CY16 and H1 CY17 Releases. Lutz Lange Solution

docker & HEP: containerization of applications for development, distribution and preservation

Docker and Oracle Everything You Wanted To Know

Deployment Patterns using Docker and Chef

SQL Server inside a docker container. Christophe LAPORTE SQL Server MVP/MCM SQL Saturday 735 Helsinki 2018

Containers. Pablo F. Ordóñez. October 18, 2018

/ Cloud Computing. Recitation 5 February 14th, 2017

Getting Started With Containers

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

Kubernetes The Path to Cloud Native

The Post-Cloud. Where Google, DevOps, and Docker Converge

Running MarkLogic in Containers (Both Docker and Kubernetes)

RED HAT'S CONTAINER STRATEGY. Lars Herrmann General Manager, RHEL, RHEV and Containers June 24, 2015

SAINT LOUIS JAVA USER GROUP MAY 2014

Welcome to Docker Birthday # Docker Birthday events (list available at Docker.Party) RSVPs 600 mentors Big thanks to our global partners:

DOCKER 101 FOR JS AFFICIONADOS. Christian Ulbrich, Zalari UG

Multi-Arch Layered Image Build System

Logging, Monitoring, and Alerting

A DEVOPS STATE OF MIND WITH DOCKER AND KUBERNETES. Chris Van Tuin Chief Technologist, West

Portable, lightweight, & interoperable Docker containers across Red Hat solutions

Docker All The Things

Kuber-what?! Learn about Kubernetes

AGILE DEVELOPMENT AND PAAS USING THE MESOSPHERE DCOS

Midterm Presentation Schedule

CS-580K/480K Advanced Topics in Cloud Computing. Container III

DevOps Course Content

Przyspiesz tworzenie aplikacji przy pomocy Openshift Container Platform. Jarosław Stakuń Senior Solution Architect/Red Hat CEE

What s Up Docker. Presented by Robert Sordillo Avada Software

A DEVOPS STATE OF MIND. Chris Van Tuin Chief Technologist, West

Real world Docker applications

Docker. Master the execution environment of your applications. Aurélien Dumez. Inria Bordeaux - Sud-Ouest. Tuesday, March 24th 2015

ASP.NET Core & Docker

CNA1699BU Running Docker on your Existing Infrastructure with vsphere Integrated Containers Martijn Baecke Patrick Daigle VMworld 2017 Content: Not fo

The four forces of Cloud Native

IBM Bluemix compute capabilities IBM Corporation

@briandorsey #kubernetes #GOTOber

VMworld 2017 Content: Not for publication #CNA1699BE CONFIDENTIAL 2

A Greybeard's Worst Nightmare

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

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

Index. Bessel function, 51 Big data, 1. Cloud-based version-control system, 226 Containerization, 30 application, 32 virtualize processes, 30 31

/ Cloud Computing. Recitation 5 September 26 th, 2017

Kubernetes 101. Doug Davis, STSM September, 2017

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

MySQL and Docker Strategies Patrick Galbraith Giuseppe Maxia

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

A REFERENCE ARCHITECTURE FOR DEPLOYING WSO2 MIDDLEWARE ON KUBERNETES

SBB. Java User Group 27.9 & Tobias Denzler, Philipp Oser

InterSystems Cloud Manager & Containers for InterSystems Technologies. Luca Ravazzolo Product Manager

DevOps in the Cloud A pipeline to heaven?! Robert Cowham BCS CMSG Vice Chair

Creating a Reproducible Build System for Docker Images

RED HAT ENTERPRISE LINUX ATOMIC HOST, CONTAINERS AND KUBERNETES

CONTINUOUS DELIVERY WITH DC/OS AND JENKINS

A DEVOPS STATE OF MIND. Chris Van Tuin Chief Technologist, West

Building A Better Test Platform:

DGX-1 DOCKER USER GUIDE Josh Park Senior Solutions Architect Contents created by Jack Han Solutions Architect

The age of orchestration

Cross platform enablement for the yocto project with containers. ELC 2017 Randy Witt Intel Open Source Technology Center

INDIGO PAAS TUTORIAL. ! Marica Antonacci RIA INFN-Bari

How to build and run OCI containers

CONTINUOUS DELIVERY WITH MESOS, DC/OS AND JENKINS

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

Infoblox Kubernetes1.0.0 IPAM Plugin

Building a Microservices Platform with Kubernetes. Matthew Mark

Knative: Building serverless platforms on top of Kubernetes

Docker and Security. September 28, 2017 VASCAN Michael Irwin

THE STATE OF CONTAINERS

Docker & why we should use it

One year of Deploying Applications for Docker, CoreOS, Kubernetes and Co.

Transcription:

Orchestrating Docker containers at scale Maciej Lasyk Jesień Linuksowa 2014 Szczyrk, 2014-11-09 1/64

Join Fedora Infrastructure! - learn Ansible - learn Docker with Fedora Dockerfiles http://fedoraproject.org/en/join-fedora 2/64

Agenda - Why use Docker? Brief history of envs evolution Docker what is it? To PaaS or not to PaaS Orchestration at scale 3/64

Quick survey - How many of you... - Knows what Docker is? - Played with Docker? - Runs it on production? 4/64

Why use Docker? With Docker we can solve many problems - it works on my machine reducing build & deploy time Infrastructure configuration spaghetti automation! Libs dependency hell Cost control and granularity 5/64

A brief story of envs evolution - classical approach (for & scp/ssh & conf.d) configuration management Bare vs IaaS vs PaaS Continuous Integration So when to use Docker? 6/64

Docker what is it? 7/64

Docker what is it? automates the deployment of any application as a lightweight, portable, self-sufficient container that will run virtually anywhere 8/64

Docker what is it? Java s promise: Write Once. Run Anywhere. Even on Windows now! https://blog.docker.com/2014/10/docker-microsoft-partner-distributed-applications/ 9/64

Docker what is it? Docker is lightweight ====================================================== Package Arch Version Repository Size ====================================================== Installing: docker-io x86_64 1.3.0-1.fc20 updates 4.3 M 10/64

Docker what is it? http://sattia.blogspot.com/2014/05/docker-lightweight-linux-containers-for.html 11/64

Docker how it works? http://blog.docker.com/2014/03/docker-0-9-introducing-execution-drivers-and-libcontainer/ 12/64

Docker how it works? - LXC & libcontainer control groups kernel namespaces layered filesystem - btrfs - devmapper thin provisioning & loopback mounts - no more AUFS - http://developerblog.redhat.com/2014/09/30/overview-storage-scalability-docker/ 13/64

Docker concepts - images - read only - act as templates - Dockerfile - like a makefile - commands order & cache'ing - extends the base image - results in a new image - Containers: instances running apps dockerfile + base image = docker container 14/64

Dockerfile FROM fedora MAINTAINER scollier <scollier@redhat.com> RUN RUN RUN RUN yum -y update && yum clean all yum -y install nginx && yum clean all echo "daemon off;" >> /etc/nginx/nginx.conf echo "nginx on Fedora" > /srv/www/index.html EXPOSE 80 CMD [ "/usr/sbin/nginx" ] 15/64

Docker registry http://osv.io/blog/blog/2014/06/19/containers-hypervisors-part-2/ 16/64

Docker registry - git like semantics - pull, push, commit - private and public registry - https://github.com/dotcloud/docker-registry - yum install docker-registry $ docker pull $ docker push $ docker commit 17/64

Docker images hierarchy base image -> child image -> grandchild image Git s promise: Tiny footprint with lightning fast performance 18/64

Docker images hierarchy http://blog.octo.com/en/docker-registry-first-steps/ 19/64

Docker security - Isolation via kernel namespaces Additional layer of security: SELinux / AppArmor / GRSEC Each container gets own network stack control groups for resources limiting f20 policy: https://git.fedorahosted.org/cgit/selinux-policy.git/tree/docker.te?h=f20-contrib What's there? seinfo -t -x grep docker sesearch -A -s docker_t (and the rest) or just unpack docker.pp with semodule_unpackage 20/64

Docker use cases CI Stack http://sattia.blogspot.com/2014/05/docker-lightweight-linux-containers-for.html 21/64

Docker use cases Continuous Integration - local dev - with Docker it's easy to standardize envs - deployment - rolling updates (e.g. w/ansible) - testing - unit testing of any commit on dedicated env - don't worry about cleaning up after testing - parrarelized tests across any machines 22/64

Docker use cases - version control system for apps - microservices - Docker embraces granularity - Services can be deployed independently and faster - parallelized tests across any machines - continuous delivery - PaaS 23/64

Docker history - 2013-01: dotcloud worked on own PaaS (Python based) 2013-03: Docker went public (AUFS, LXC) middle 2013: Red Hat joined, devmapper, SELinux late 2013: removed LXC, rewritten in Go 2014-02: stable 1.0 24/64

Docker popularity 25/64

Docker popularity 26/64

Orchestration at scale w/docker 27/64

Orchestration at scale w/docker This might be a little problem 28/64

Orchestration at scale w/docker This might be a little problem 29/64

Orchestration at scale w/docker 30/64

http://www.cloudssky.com/en/blog/docker-is-not-enough 31/64

To Paas or not to PaaS? 32/64

To Paas or not to PaaS? - you think PaaS will solve your problems? it will rather clone them :) running PaaS might be easy operating PaaS will be tough so is operating your apps tough enough to move? private PaaS or not? Rainbow and Unicorn Piss: http://blog.lusis.org/blog/2014/06/14/paas-for-realists/ 33/64

To Paas or not to PaaS? - flynn.io - Open source PaaS (Go) - Uses Docker to manage containers - Git push deployment - https://flynn.io - dokku - The smallest PaaS implementation you've ever seen - Less than 100 lines of Bash - Git push deployment - https://github.com/progrium/dokku - deis.io - Open source PaaS (Python) - Git push deployment - On top of CoreOS w/ Docker - http://deis.io/ 34/64

To Paas or not to PaaS? Remember, that PaaS might fail; plan & test for disaster! 35/64

Docker & CLI $ docker run -t -i fedora /bin/bash > yum -y update > yum -y install nginx $ docker commit 73fa45674fd docent/fedora 36/64

Docker & CLI Or via Dockerfile: $ docker build -t fedora rm. $ docker run --name=nginx fedora 37/64

FIG - http://www.fig.sh - for single host env 38/64

FIG - http://www.fig.sh - for single host env FROM python:2.7 ENV PYTHONUNBUFFERED 1 RUN mkdir /code WORKDIR /code ADD requirements.txt /code/ RUN pip install -r requirements.txt ADD. /code/ 39/64

FIG db: image: postgres web: build:. command: python manage.py runserver 0.0.0.0:8000 volumes: - /srv/app/code:/code ports: - "8000:8000" links: - db 40/64

FIG $ fig run web django-admin.py startproject figexample. $ fig up Management during runtime? $ fig run web python manage.py syncdb 41/64

Docker & Ansible Ansible + Docker Vs Docker + Ansible 42/64

Docker & Ansible Ansible docker core module: http://docs.ansible.com/docker_module.html - hosts: web sudo: yes tasks: - name: run tomcat servers docker: > image=centos command="service tomcat6 start" ports=8080 count=5 memory_limit=128mb link=mysql expose=8080 registry=... volume=... 43/64

Docker & Ansible Building image with Ansible: FROM ansible/centos7-ansible:stable ADD ansible /srv/example/ WORKDIR /srv/example RUN ansible-playbook web.yml -c local EXPOSE 80 ENTRYPOINT ["/usr/sbin/nginx", "-DFOREGROUND"] ansible/web.yml: - hosts: localhost tasks: - yum: pkg=nginx state=latest - copy: src: web.conf dest: /etc/nginx/conf.d/web.conf group: "nginx" mode: "0644" 44/64

CoreOS - Designed for massive server deployments Support Docker container out of the box Available on Linux, Mac, and Windows It's a Chrome OS fork Consists of couple of components: - SystemD not just a init system ;) - Fleet cluster level manager & scheduler - etcd light & distributed key / value store - Docker the only packaging method in CoreOS 45/64

CoreOS Fleet cluster level manager & scheduler https://coreos.com/using-coreos/clustering/ 46/64

CoreOS etcd light & distributed key / value store (used for configuration store) https://coreos.com/docs/#cluster-management 47/64

CoreOS Docker the only packaging method in CoreOS 48/64

CoreOS 49/64

CoreOS Cluster management with Fleet & SystemD [Unit] Description=My Service After=docker.service [Service] TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill hello ExecStartPre=-/usr/bin/docker rm hello ExecStartPre=/usr/bin/docker pull busybox ExecStart=/usr/bin/docker run --name hello busybox /bin/sh -c "while true; do echo Hello World; sleep 1; done" ExecStop=/usr/bin/docker stop hello 50/64

CoreOS Cluster management with Fleet & SystemD $ fleetctl load hello.service Unit hello.service loaded on 8145ebb7.../10.10.1.3 $ fleetctl start hello.service Unit hello.service launched on 8145ebb7.../10.10.1.3 $ fleetctl list-machines MACHINE IP METADATA 148a18ff-6e95-4cd8-92da-c9de9bb90d5a 10.10.1.1 491586a6-508f-4583-a71d-bfc4d146e996 10.10.1.2 c9de9451-6a6f-1d80-b7e6-46e996bfc4d1 10.10.1.3 $ fleetctl list-units UNIT MACHINE ACTIVE SUB hello.service c9de9451.../10.10.1.3 active running 51/64

CoreOS - scheduler - HA - dependencies https://coreos.com/docs/launching-containers/launching/launching-containers-fleet/ 52/64

Kubernetes - https://github.com/googlecloudplatform/kubernetes - Advanced cluster manager (more than 1k hosts is a fit) - Architecture: - master - minion - pod - replication controller - label 53/64

Kubernetes 54/64

SmartStack - automated service discovery and registration framework ideal for SOA architectures ideal for continuous integration & delivery solves works on my machine problem haproxy + nerve + synapse + zookeper = smartstack 56/64

SmartStack Synapse - discovery service (via zookeeper or etcd) - installed on every node - writes haproxy configuration - application doesn't have to be aware of this - works same on bare / VM / docker - https://github.com/airbnb/nerve 57/64

SmartStack 58/64

SmartStack Nerve - health checks (pluggable) - register service info to zookeper (or etcd) - https://github.com/airbnb/synapse 59/64

SmartStack 60/64

Summary 61/64

Summary w/ Docker Sky is the limit! 61/64

Freenode #docker Krk DevOPS meetups (http://www.meetup.com/krakow-devops/) https://github.com/docker/docker 62/64

sources? - docker.io documentation dockerbook.com slideshare! zounds of blogposts (urls provided) and some experience ;) 63/64

Thank you :) Orchestrating Docker containers at scale Maciej Lasyk Jesień Linuksowa 2014 2014-11-09, Szczyrk http://maciej.lasyk.info maciej@lasyk.info @docent-net 64/64