up! to docker paas - .up! to docker paas ming jin ... • puppet + powershell dsc • winrm •...

Download UP! TO DOCKER PAAS - .UP! TO DOCKER PAAS Ming Jin ... • Puppet + PowerShell DSC • WinRM • Dnscmd

Post on 28-Jul-2018

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • UP! TO DOCKER PAAS Ming Jin(mjin@thoughtworks.com)

    March 15, 2015 1

  • WHO AM I

    2

    Ming Jin Head of Cloud Solutions of

    ThoughtWorks China

    Architect, Agile Consulting

    Solutions and Consulting on

    DevOps & Cloud

    Email: mjin@thoughtworks.com

  • ABOUT THOUGHTWORKS

    3500 12 32 Employees Countries Offices

  • to name a few

    ABOUT THOUGHTWORKS

    Agile Continuous Delivery Selenium CruiseControl

    Open Source Lean Enterprise SIP JRuby

    MoCo

    Continuous Integration Books

    Tech Radar

  • AGENDA

    Background Docker 101 GoTo Docker What We Learned?

    5

  • Background

    6

  • SOFTWARE DELIVERY

    7

    Deployment pipeline Product Manageme

    nt Delivery

    Team

    Product Backlog

    Did we build the right thing? Whats next?

    feedback

    feedback

    usage data A/B tests traffic analysis customer feedback

    on change

    on demand

    Is my software production-ready right now?

  • Manual Build/Test/Package, trivial and error prone

    Different Environments, tools

    Lack of release readiness feedback

    8

    Application Lifecycle

    Package Build Deployment

    IT Services

    Environment Middleware Repository

    Virtualization

    VM Virtual Network Virtual Disk

    Infrastructure

    Server Storage Network

    Manual Operations are trivial and error prone

    Lack of IT asset management

    System admin as the bottle neck

    Manual deployments of Middleware, DB and etc.

    Different configurations for different environments

    Couldnt manage changes in time

    Different Technologies and tools

    Lack of monitoring of hardware performance

    No capacity planning Couldnt do HA

    IT CHALLENGES

  • Cloud Control

    Cloud Management

    Cloud Service

    Infrastructure

    Cloud Application

    DevO

    ps Cloud

    IAA

    S Cloud

    Power Storage X86 Servers Networking

    Resource View

    VM Virtual Disk Networking Monitoring

    Policies Templates Monitoring

    ITSM

    IDE

    DevOps Apps

    Service Engine Ticket Policy Engine

    BaaS Mobile BigData Database

    Elastic Architecture Cloud Services

    Code Quality

    Continuous

    Test

    Continuous Deploy

    MIddleware Batch Processing

    AppStore Monitor Service Portal

    IT Operation Apps

    ITSM

    Service Catalog Scheduler

    Bare Metal Container

    Cloud Engine

    GOTO CLOUD STRATEGY

  • CASE: CLOUDIFY LARGE INFRASTRUCTURE

    A World Leading Software Delivery Consultancy ~800 employees +100s of projects ScaleWorks to manage their whole Infrastructure

    and provide self-service facility.

    Before: ~100 vSphere ESXi/Hyper-V/XenServer Hosts ~5T Storage (DAS, NFS, SAN) ~200 Virtual Networks ~1000 Virtual Machines (Windows, CentOS,

    Ubuntu)

    After: VM Provisioning Lead-Time Shortened to ~3 min ~60% TCO for VM Creation Eliminated 10

    ScaleWorks help improve the IT efficiency and reduce the service lead time, were all happy with it.

  • IAAS CLOUD + DEVOPS

    Dev

    Tester

    VM Instance CRUD Environment Instance CRUD VM Instances over XenServer Isolated Windows Domains DnsMasq as DNS Proxy

    Scenarios: Technologies:

    ScaleWorks + MySQL Puppet + PowerShell

    DSC WinRM Dnscmd Windows DC DnsMasq XenServer

    Add new Zone on Windows DC Create new Instances Register Instances to Windows DC Configure A-Records/Cnames on

    DC Configure new Instances Version Configurations with PS

    DSC

    Environment Creation:

    Windows DC1

    Windows DC2

    Web App

    DB FC

    Env1

    CI Agent2

    DnsMasq

    CI Agent1

    PowerShell DSC

    ScaleWorks

    Local NuGet Repo Git Repo Jenkins

    Build Pipeline

    Nagios

    XenServer

    Deployment Pipeline

    MySQL

    ENV Description

  • Cloud is Good, can we do better?

    12

  • MISMATCH OF IAAS AND APPLICATION

    IaaS is VM based, a bit heavy for developers

    IaaS is Resource focused, a bit far from Application level

    Resource Density is not Efficient ENOUGH

    13

  • Docker 101

    14

  • $ sudo apt-get update

    $ sudo apt-get install docker.io

    $ source /etc/bash_completion.d/docker.io

    $ curl -sSL https://get.docker.com/ubuntu/ | sudo sh

    Easy to install, easy to start a container: $ docker run -i -t ubuntu /bin/bash

    Use existing container images from docker Hub, or build your own. Expose ports for services running in container, daemonize containers.

    DOCKER BASICS

  • Fair use from h-p://blog.octo.com/en/docker-registry-first-steps/

    BUILDING DOCKER IMAGES

  • CONFIGURING DOCKER IMAGES

  • COREOS BASICS

    Linux distribution Rolling upgrades Minimal OS Docker support etcd and fleet tools to manage distributed applications

    based on containers.

    Cloud-init support Systemd units

    18

  • KUBERNETES BASICS

    Docker application orchestration Google GCE, rackspace, Azure providers Deployable on CoreOS Container replication HA services

    19

  • DOCKER: SO FAR THE BEST CHOICE FOR PAAS

    20

    Web

    App

    DB

    LB

    Application Stack

    Portability

    Productivity

    Docker

    RPM APT

    War NuGet

    Gem

    VM

    Bare Metal

    LXC

    Solaris Zone KVM

    VSphere

    Package

    Container

    PC

    Blade

  • GoTo Docker Strategy

    21

  • GOTO DOCKER STRATEGY

    Docker-Enabled VM Service Kubernete-Enabled Stack Application-Centric Services

    22

  • GOTO DOCKER: DOCKER-ENABLED VM

    CoreOS VM Based Docker Service Docker REST API integration (SSL)

    23

  • GOTO DOCKER: COREOS PROVISIONING

    24

  • GOTO DOCKER: COREOS PROVISIONING

    25

  • GOTO DOCKER: KUBERNETES-ENABLED STACK

    Kubernetes based Docker Cluster Service Kubernetes REST API integration (SSL)

    26

  • GOTO DOCKER: KUBERNETES PROVISIONING

    ScaleWorks to start nodes with coreOS template

    User data to pass cloud-init configs

    Master.yaml for Kubernetes Master

    Node.yaml for Kubernetes Minions

    Start Kube* Service units with SystemD

    27

  • GOTO DOCKER: APPLICATION-CENTRIC SERVICES

    Application Centric Services Use Dockerfile to Boot/Configure Single Component

    Dockerfile Detection User Topology file to Orchestrate Multiple

    Components

    TOSCA? App.yml

    28

  • GOTO DOCKER: APPLICATION-AWARE SERVICES

    29

  • CASE STUDY: DOCKER PAAS

    Dev

    Tester

    Docker based Environment Kubernetes as Docker Clustering DnsMasq as DNS Proxy Iptables routing for VPN Sharing VM Instance CRUD Environment Instance CRUD

    Scenarios: Technologies:

    ScaleWorks + MySQL Puppet Kubernetes Docker DnsMasq + Iptables

    Routing XenServer + Fedora Private Docker Registry

    Create new Kubernetes Environment

    Configure Network Settings Initiate Docker Cluster Configure Docker Instances Deploy Applications

    Environment Creation:

    VLAN

    Kubernetes Mater

    Network

    Ansible

    ScaleWorks

    Local Docker Registry Git Repo Jenkins

    Build Pipeline

    Nagios

    XenServer

    Deployment Pipeline

    MySQL

    ENV Description

    Kubernetes Minion

    DnsMasq

    iptables

    Kubernetes Minion

    Controller Scheduler

    VPN

    Web App Env1 DB

    Env2 Web App DB

    * https://bitbucket.org/wenbo_liu_tw/dockerpaas * https://bitbucket.org/wenbo_liu_tw/fdockeron

  • What We Learned?

    31

  • LESSONS

    Docker is AWESOME! Build, Ship and Run Any App, Anywhere High Resource Density Active Communities and Ecosystem Easy to Extend / Integrate

    API RESTful API/Kubernetes RESTful API

    Work Closely with the End Developers

    32

  • DevOps

    Keep Refining Best Practices & Better Services

  • THANK YOU For questions or suggestions:

    Ming Jin

    mjin@thoughtworks.com

Recommended

View more >