Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker Use Case in Production

8c5062689b241827e7532be41ff19e20?s=47 tnir
March 05, 2016

Docker Use Case in Production

Docker Meetup Tokyo #6 (2016-03-05) (商用Docker利用事例 (CoreOS/Composeを利用して)



March 05, 2016

More Decks by tnir

Other Decks in Technology



    商用DOCKER 利用事例 (COREOS/COMPOSE を利用して) 2016-03-05 Docker Meetup Tokyo #6 by / Takuya Noguchi @tn961ir
  2. @TNIR Takuya Noguchi ( 野口 卓也) Software Engineer iRidge, Inc.

    Twitter: @tn961ir Facebook: takuya.noguchi.961 LinkedIn: takuyanoguchi
  3. IRIDGE, INC. an O2O solution company established in 2008 50+

    members (incl. 20+ engineers)
  4. MY WORKS OEM to private IaaS (a Telecom) BI system

    development for geo-location data API service development for partners' integration Mobile payment service "C-less" Operations & Monitoring PyCon APAC & JP 2013/14/15 (sponsor) Resource management (cost, code, security, performance)
  5. PROBLEMS ON DEVELOPMENT Cost, Ops, QA & security Development process

    (e.g. multiple deployments on a single codebase) Multicloud platforms (AWS, GCP, CloudStack, OpenStack, other IaaSs)
  6. [SOL] OPS & COST 0 infra enginneers (vs. 12 server-side

    eng) Started to use Google App Engine (2009) Moved to AWS (Tokyo) (2011) Moved to GCP (APAC) (2014) GCP が支える、 次世代 O2O ソリュー ション [cloud.google.com/?hl=ja]
  7. [PROBLEM] DEVELOPMENT PROCESS Repositories: Subversion (Trac), Mercurial (hg) -> Git

    Code review, CI/CD (Jenkins) Multiple deployments on a single codebase
  8. CANDIDATES FOR CODE & CI Code BitBucket GitLab GitHub Enterprise

    CI Jenkins wercker GitLab CI
  9. ALL-IN-ONE SOLUTION GitLab (OSS) fork code review CI/CD Docker support

  10. ALL-IN-ONE SOLUTION (2) Says "GitHub Enterprise for the poor" Good

    oppotunities for us: to unify development/deployment process to customize for me to catch up Rails stack :-)
  11. CI WITH DOCKER . g i t l a b

    - c i . y m l : p y t e s t :  i m a g e : u b u n t u : 1 4 . 0 4  s e r v i c e s :   - m y s q l : 5 . 6 . 2 8  s c r i p t :   - s c r i p t s / b o o t s t r a p . s h   - p y . t e s t p y t e s t : d j a n g o 1 9 m y s q l 5 7 :  i m a g e : u b u n t u : 1 4 . 0 4  s e r v i c e s :   - m y s q l : 5 . 7 . 1 1  s c r i p t :   - s c r i p t s / b o o t s t r a p . s h   - p i p i n s t a l l D j a n g o = = 1 . 9 . 3   - p y . t e s t
  12. DOCKER FOR ALL ENGINEERS Advertise Docker for all our engineers

    CI status notifications to Slack TODO: in-house seminars
  13. DOCKER (CI) FOR ANDROID/IOS Docker (CI) for iOS/Android Engineers QA

    enmtknt posted in Feb 26, 2016 TODO: Docker for our Android projects GitLab CI でXcode プロジェクトをCI する手順

  15. [PROBLEM] CONVENTIONAL ARCHITECUTRE Microservices Several services a person (previously) web2.py

    on GAE (no Asia region!!!) (current) Python 2/Django on Ubuntu 12.04/14.04 deb/pip package dependency vagrant/VirtualBox development environment problems Fabric/Ansible for deployment EC2 on AWS used like on-premise All eng in charge doesn't have time for/interest in Docker
  16. [SOLUTION] NEW ARCHITECUTRE Golang latest (1.4.x) Docker Cloud native Google

    Cloud Platform
  17. CONSIDERATIONS Build (CI) Deployment (CD) OS/Platform Image Management Container Management


  19. WHEN TO DEPLOY midnight (once a week) daytime (every day

    we want)
  20. BUILD & DEPLOYMENT Fig (Docker Compose) with Ansible CI: GitLab

    CI with Docker support
  21. OS/PLATFORM CANDIDATES Ubuntu CoreOS k8s on GCE Amazon ECS (Apr

    2015 GA in Tokyo) GCP GKE (Aug 2015 GA) (Project Atomic) (Snappy Ubuntu)
  22. ADVANTAGES ON COREOS minimal OS footprint (lightweight!) cluster -> unused

    etcd -> unused fleet -> unused automatic update -> off
  23. COREOS RELEASE CHANNELS 3 Channels Stable (1.8) // Beta (1.9)

    // Alpha (1.10)
  24. coreos.com/os/docs/latest/update-strategies.html

  25. COREOS RELEASE CHANNELS (2) The Company prefer stability(!) while I

    prefer the cutting edge. Mixed channels I chose: Beta (1.9) for 50% hosts Stable (1.8) for 50% hosts Alpha (1.10) for 0%
  26. REBOOT STRATEGIES Update is fully manual. # c l o

    u d - c o n f i g c o r e o s :  u p d a t e :   r e b o o t - s t r a t e g y : o f f

  28. IMAGE MANAGEMENT Private image management Docker Registry Docker Hub Quay.io

    ✓ G Container Repository ✓ Build on each node with Dockerfile + Blue-Green deployment
  29. CONTAINER MANAGEMENT Docker Compose + Ansible num of containers a

    VM ✓ 1 container a VM ✓ 2 containers a VM Connections via HTTPS over VMs
  30. OPS AFTER DEPLOYMENTS ON PRODUCTION Did almost nothing after the

    deployment Except for CoreOS update Manual CoreOS update a month Logging: default (j s o n - f i l e ) Heavy disk usage d o c k e r l o g s is slow TODO: f l u n t d driver to forward to G Cloud Logging
  31. MONITORING Datadog Mackerel ✓ Google Cloud Monitoring (Stackdriver before 2014)

    ✓ Munin etc.
  32. DOCKER SUMMARY Docker was simply introduced and it has been

    served in production for more than 1.5 yrs as well. Docker is also utilized for development and CI. Cloud vendor-unlocked! Docker Compose for production still works for our service.

  34. SERVERLESS ARCHITECTURE Again, 0 infra/ops engineers in our company. PaaS?

    App Engine (Asia or Tokyo) AWS Lambda G Cloud Functions (Alpha)


  37. WANTED Docker/Go/Python/Android engineers iridge.jp/rec or Tw: @tn961ir