DOCKER
IN DEVELOPMENT
by
Quan Nguyen
Solutions Manager
FPT Technology Solutions
quanndm2@fpt.com.vn
WHO AM I?
Tech-a-holic, Coffee-a-holic,
Cocacola-a-holic
Graduated from FPT University
2008~2012: FPT Software
 Developer
 Technical lead
2012~now: FPT Technology Solutions
 Full-stack developer
 Products Manager
 Solutions Manager
 FPT-a-holic as well
WHAT WE WILL DISCUS TODAY?
Overview of Micro-service architect
(currently apply at FTS)
Why Docker in Micro-service architect?
Docker in (web apps) development.
Story
50%
Concept
20%
Application
20%
Usage
10%
TODAY'S CONTENTS
LET THE STORY BEGINS Once upon a time
TRAFFIC INSIGHT
Live Traffic Portal
NOTIS
Live Traffic on Mobile
http://notis.vn
THE CHALLENGES COME Life is not like a dream
CHALLENGE #01
Many languages (NodeJS, Python, C++, C#, Ruby, Scala, GoLang, …)
Many platforms/libraries (OpenCV2, OpenCV3, .NET, …)
Many environments (Ubuntu, Debian, Windows, …)
Many databases (MongoDB, PostgesSQL, Redis, MySQL, SQL Server, …)
Many other things (Active MQ, Rapid MQ, Mosquito, Hadoop, Spark, …)
Get right tool for the right job
SOLUTION #01
MONOLITHIC VS MICRO-SERVICES
WHEN ARCHITECTS DESIGN
WHEN DEVELOPERS DEVELOP
WHEN TESTERS TEST
CHALLENGE #02
CHALLENGE #02 – THE MATRIX FROM HELL
SOLUTION #02
SOLUTION #02
CHALLENGE #03
We have many micro-services for images/videos
processing.
Those services used GPU core (CUDA) to improve
speed.
The challenge is How to put those services on 01
GPU Server independently.
CHALLENGE #04 – WELCOME ON BOARD
Legacy
I told him:
 Get a new PC with Windows
 Install NodeJS
 Install MongoDB
 Install Redis
 Install VMWare with Debian VM
 Install PostgresSQL
 Install MySQL
 …
Nextday:
 Get code from GIT
 Configure for each thing
 Run each thing
With Docker
I told:
Get a new PC with Windows
Install Docker-Toolbox
Get code from GIT
Docker-compose up
And coffee time 
CHALLENGE #05 – TESTING
CHALLENGE #06 – DEPLOYMENT
DEMO TIME
THE SAMPLE MULTI SERVICES WEB APP
DockerCoinsMiner is the application for mining DockerCoins.
We have 4 services:
 Random Number (RNG): web service generating random bytes. (Ruby +
Sinatra)
 Hasher: web service computing hash (Python + Flask)
 Worker: background process using RNG and Hasher (Python)
 WebUI: web interface to watch progress (NodeJS + ExpressJS + Redis)
THE SAMPLE MULTI SERVICES WEB APP
DockerCoinsMiner is the application for mining DockerCoins.
How it works:
 Worker asks to RNG to give it random bytes
 Worker feeds those random bytes into hasher
 Each hash starting with 0 is a DockerCoin
 DockerCoins are stored in Redis
 Redis is also updated every second to track speed
 You can see the progress with the WebUI
DEMO
CHALLENGE #07 – SCALING
It’s a loooooong story:
Twelve-factor
Configure database
Service discovery
Ambassadors pattern
…
RECAP
OUR HERO
Q&A
TAKE AWAY
Ambassadors pattern
Docker-compose
Docker-machine
Service discovery
Docker
THANKS FOR LISTENING
by
Quan Nguyen
Solutions Manager
FPT Technology Solutions
quanndm2@fpt.com.vn

Docker in development (Story)

  • 1.
    DOCKER IN DEVELOPMENT by Quan Nguyen SolutionsManager FPT Technology Solutions quanndm2@fpt.com.vn
  • 2.
    WHO AM I? Tech-a-holic,Coffee-a-holic, Cocacola-a-holic Graduated from FPT University 2008~2012: FPT Software  Developer  Technical lead 2012~now: FPT Technology Solutions  Full-stack developer  Products Manager  Solutions Manager  FPT-a-holic as well
  • 3.
    WHAT WE WILLDISCUS TODAY? Overview of Micro-service architect (currently apply at FTS) Why Docker in Micro-service architect? Docker in (web apps) development. Story 50% Concept 20% Application 20% Usage 10% TODAY'S CONTENTS
  • 4.
    LET THE STORYBEGINS Once upon a time
  • 5.
    TRAFFIC INSIGHT Live TrafficPortal NOTIS Live Traffic on Mobile http://notis.vn
  • 6.
    THE CHALLENGES COMELife is not like a dream
  • 7.
    CHALLENGE #01 Many languages(NodeJS, Python, C++, C#, Ruby, Scala, GoLang, …) Many platforms/libraries (OpenCV2, OpenCV3, .NET, …) Many environments (Ubuntu, Debian, Windows, …) Many databases (MongoDB, PostgesSQL, Redis, MySQL, SQL Server, …) Many other things (Active MQ, Rapid MQ, Mosquito, Hadoop, Spark, …) Get right tool for the right job
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
    CHALLENGE #02 –THE MATRIX FROM HELL
  • 15.
  • 16.
  • 17.
    CHALLENGE #03 We havemany micro-services for images/videos processing. Those services used GPU core (CUDA) to improve speed. The challenge is How to put those services on 01 GPU Server independently.
  • 18.
    CHALLENGE #04 –WELCOME ON BOARD Legacy I told him:  Get a new PC with Windows  Install NodeJS  Install MongoDB  Install Redis  Install VMWare with Debian VM  Install PostgresSQL  Install MySQL  … Nextday:  Get code from GIT  Configure for each thing  Run each thing With Docker I told: Get a new PC with Windows Install Docker-Toolbox Get code from GIT Docker-compose up And coffee time 
  • 19.
  • 20.
  • 21.
  • 22.
    THE SAMPLE MULTISERVICES WEB APP DockerCoinsMiner is the application for mining DockerCoins. We have 4 services:  Random Number (RNG): web service generating random bytes. (Ruby + Sinatra)  Hasher: web service computing hash (Python + Flask)  Worker: background process using RNG and Hasher (Python)  WebUI: web interface to watch progress (NodeJS + ExpressJS + Redis)
  • 23.
    THE SAMPLE MULTISERVICES WEB APP DockerCoinsMiner is the application for mining DockerCoins. How it works:  Worker asks to RNG to give it random bytes  Worker feeds those random bytes into hasher  Each hash starting with 0 is a DockerCoin  DockerCoins are stored in Redis  Redis is also updated every second to track speed  You can see the progress with the WebUI
  • 24.
  • 25.
    CHALLENGE #07 –SCALING It’s a loooooong story: Twelve-factor Configure database Service discovery Ambassadors pattern …
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
    THANKS FOR LISTENING by QuanNguyen Solutions Manager FPT Technology Solutions quanndm2@fpt.com.vn