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

Docker Use Case in Production

tnir
March 05, 2016

Docker Use Case in Production

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

tnir

March 05, 2016
Tweet

More Decks by tnir

Other Decks in Technology

Transcript

  1. DOCKER USE CASE IN PRODUCTION (USING COREOS AND DOCKER COMPOSE)

    商用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. 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)
  4. 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)
  5. [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]
  6. [PROBLEM] DEVELOPMENT PROCESS Repositories: Subversion (Trac), Mercurial (hg) -> Git

    Code review, CI/CD (Jenkins) Multiple deployments on a single codebase
  7. 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 :-)
  8. 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
  9. DOCKER FOR ALL ENGINEERS Advertise Docker for all our engineers

    CI status notifications to Slack TODO: in-house seminars
  10. 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 する手順
  11. [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
  12. OS/PLATFORM CANDIDATES Ubuntu CoreOS k8s on GCE Amazon ECS (Apr

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

    etcd -> unused fleet -> unused automatic update -> off
  14. 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%
  15. 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
  16. IMAGE MANAGEMENT Private image management Docker Registry Docker Hub Quay.io

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

    VM ✓ 1 container a VM ✓ 2 containers a VM Connections via HTTPS over VMs
  18. 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
  19. 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.
  20. SERVERLESS ARCHITECTURE Again, 0 infra/ops engineers in our company. PaaS?

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