Docker in development (Story)
-
Upload
quan-nguyen -
Category
Technology
-
view
545 -
download
0
Transcript of Docker in development (Story)
DOCKERIN DEVELOPMENTbyQuan NguyenSolutions ManagerFPT Technology [email protected]
WHO AM I?Tech-a-holic, Coffee-a-holic,Cocacola-a-holicGraduated from FPT University2008~2012: FPT Software Developer Technical lead2012~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.
Story50%
Concept20%
Application20%
Usage10%TODAY'S CONTENTS
LET THE STORY BEGINS Once upon a time
TRAFFIC INSIGHTLive Traffic Portal
NOTISLive Traffic on Mobilehttp://notis.vn
THE CHALLENGES COME Life is not like a dream
CHALLENGE #01Many 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 #03We 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 BOARDLegacyI 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 DockerI told:Get a new PC with Windows Install Docker-ToolboxGet code from GITDocker-compose upAnd coffee time
CHALLENGE #05 – TESTING
CHALLENGE #06 – DEPLOYMENT
DEMO TIME
THE SAMPLE MULTI SERVICES WEB APPDockerCoinsMiner 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 APPDockerCoinsMiner 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 – SCALINGIt’s a loooooong story:Twelve-factorConfigure databaseService discoveryAmbassadors pattern…
RECAP
OUR HERO
Q&A
TAKE AWAYAmbassadors patternDocker-composeDocker-machineService discoveryDocker
THANKS FOR LISTENINGbyQuan NguyenSolutions ManagerFPT Technology [email protected]