Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
DOCKER FOR POLYGLOTS
Nathan LeClaire, Open Source Engineer at Docker Inc.
WELCOME
• I appreciate your participation ! To speak at this
conference is an honor.
• Today we are going to talk about "D...
THANKYOU FOR
CONFERENCE
WHO AM I?
Nathan LeClaire (@upthecyberpunks)
Open Source Engineer, Docker Machine
I ❤ JAPAN
TOOLS OF MASSIVE
INNOVATION
TOOLS OF MASSIVE
INNOVATION
LET'S LOOK AT SOME FACTS
FACT:
VARIETY
• Developers want to use a variety of programming
languages
• "The right tool for the right job"
• This comp...
FACT:
TECHNOLOGY CHANGES RAPIDLY
• Front end web development alone has a huge
explosion of options including SASS, Grunt,
...
FACT:
TOOLING IS DIFFICULT
• For instance, Maven might be intimidating to a Go
developer.
• Python programmers might want ...
FACT:
"BUS FACTOR" RISK IS HIGH
• If "the person who sets up the environments" on
your team was hit by a bus tomorrow, wou...
FACT: DEPENDENCY HELL
Does this type of thing look familiar?
DOCKER CAN HELP
• Docker provides a way of distributing applications
• It also provides orchestration tools for developing...
MY DREAM:
SIMPLICITY
MY DREAM:
UNIFORMITY
MY DREAM:
PHOENIX DEVELOPMENT
WHAT IS A POLYGLOT?
"PROGRAMMING LANGUAGE"
WHAT IS A POLYGLOT?
"TOOLING LANGUAGE"
WHAT IS A POLYGLOT?
"DEVELOPER LANGUAGE"
"We need to add some migrations
to run for the database, a few
controllers, and a...
WHAT IS A POLYGLOT?
"OPERATOR LANGUAGE"
"Let's set up some automation
around our load balancers, store
these files in an S3...
DOCKER LETS YOU DEFINE
AN ENVIRONMENT SIMPLY
EXAMPLE
I DON'T KNOW ANYTHING
ABOUT LUA...
...AND ONLY A LITTLE
ABOUT NGINX.
SETTING UP OPENRESTY
MANUALLY
$ sudo apt-get install -y make build-essential libreadline-dev libncurses5-dev
libpcre3-dev ...
FORTUNATELYTHAT PROJECT
HAS GOOD DOCUMENTATION,
BUT WHAT IF IT DIDN'T?
WHAT IFYOU WANTTO INSTALL AUTOMATICALLY
ON ANOTHER COMPUTER?
OR EASILY SHAREYOUR APPLICATION WITH A
FRIEND OR COLLEAGUE?
REPLACE MANUAL METHOD
WITH ATINY BASH SCRIPT?
"YEAH, I KNOWYOU DEVELOP ON
DEBIAN, BUTTHIS NEEDSTO RUN ON
RHEL."
DEVELOPER
Installing software is
boring! I just want to
script nginx with Lua!
SOLUTION
WE CAN MAKE DOCKERFILE.
IT WILL RUN ON ANY OS WITH
COMPATIBLE KERNEL.
from debian:jessie
run apt-get update
run apt-get in...
BUILD, SHIP, & RUN
$ docker build -t nathanleclaire/openresty .
$ docker push nathanleclaire/openresty
$ # Now we can pull...
YOU CAN USE AUTOMATED BUILDS ON
DOCKER HUBTO LEARN FROM OTHER
PEOPLE
LOTS OF CONTRIBUTION TO
DOCKER BECAUSE OF DOCKER
DOCKER MACHINE
DOCKER COMPOSE
DOCKER SWARM
"Docker For Polyglots" - Nathan LeClaire - YAPC::Asia 2015
"Docker For Polyglots" - Nathan LeClaire - YAPC::Asia 2015
"Docker For Polyglots" - Nathan LeClaire - YAPC::Asia 2015
Upcoming SlideShare
Loading in …5
×

"Docker For Polyglots" - Nathan LeClaire - YAPC::Asia 2015

852 views

Published on

In this presentation Nathan LeClaire outlines some of the ways Docker can help polyglots (those who speak multiple languages) to be more efficient and happier in their workflows.

Published in: Technology
  • Be the first to comment

"Docker For Polyglots" - Nathan LeClaire - YAPC::Asia 2015

  1. 1. DOCKER FOR POLYGLOTS Nathan LeClaire, Open Source Engineer at Docker Inc.
  2. 2. WELCOME • I appreciate your participation ! To speak at this conference is an honor. • Today we are going to talk about "Docker For Polyglots". • A "polyglot" is someone who speaks multiple languages.
  3. 3. THANKYOU FOR CONFERENCE
  4. 4. WHO AM I? Nathan LeClaire (@upthecyberpunks) Open Source Engineer, Docker Machine
  5. 5. I ❤ JAPAN
  6. 6. TOOLS OF MASSIVE INNOVATION
  7. 7. TOOLS OF MASSIVE INNOVATION
  8. 8. LET'S LOOK AT SOME FACTS
  9. 9. FACT: VARIETY • Developers want to use a variety of programming languages • "The right tool for the right job" • This complicates the process of setting up development environments and running operations
  10. 10. FACT: TECHNOLOGY CHANGES RAPIDLY • Front end web development alone has a huge explosion of options including SASS, Grunt, Yeoman, etc. • Not every developer on your team is going to be an expert in tooling for every language but they still might want to contribute • More friction == less productivity
  11. 11. FACT: TOOLING IS DIFFICULT • For instance, Maven might be intimidating to a Go developer. • Python programmers might want to use Ruby sometimes but don't know how to use rbenv or rvm • Contributing to open source is very difficult for this reason.
  12. 12. FACT: "BUS FACTOR" RISK IS HIGH • If "the person who sets up the environments" on your team was hit by a bus tomorrow, would it be easy or hard to keep going? • Can any person on your team destroy their development environment and re-build it from scratch automatically?
  13. 13. FACT: DEPENDENCY HELL Does this type of thing look familiar?
  14. 14. DOCKER CAN HELP • Docker provides a way of distributing applications • It also provides orchestration tools for developing them • End game is to reduce friction to the point where transitioning between projects is seamless
  15. 15. MY DREAM: SIMPLICITY
  16. 16. MY DREAM: UNIFORMITY
  17. 17. MY DREAM: PHOENIX DEVELOPMENT
  18. 18. WHAT IS A POLYGLOT? "PROGRAMMING LANGUAGE"
  19. 19. WHAT IS A POLYGLOT? "TOOLING LANGUAGE"
  20. 20. WHAT IS A POLYGLOT? "DEVELOPER LANGUAGE" "We need to add some migrations to run for the database, a few controllers, and also some jobs to run in the background queue."
  21. 21. WHAT IS A POLYGLOT? "OPERATOR LANGUAGE" "Let's set up some automation around our load balancers, store these files in an S3 bucket and consider moving to a cross-cloud solution with overlay networking."
  22. 22. DOCKER LETS YOU DEFINE AN ENVIRONMENT SIMPLY
  23. 23. EXAMPLE
  24. 24. I DON'T KNOW ANYTHING ABOUT LUA... ...AND ONLY A LITTLE ABOUT NGINX.
  25. 25. SETTING UP OPENRESTY MANUALLY $ sudo apt-get install -y make build-essential libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make build-essential $ # Go to browser, click around on "Download Page" $ wget https://openresty.org/download/ngx_openresty-1.9.3.1.tar.gz $ tar xvf ngx_openresty-1.9.3.1.tar.gz $ cd ngx_openresty-1.9.3.1 $ ./configure; make; make install
  26. 26. FORTUNATELYTHAT PROJECT HAS GOOD DOCUMENTATION, BUT WHAT IF IT DIDN'T?
  27. 27. WHAT IFYOU WANTTO INSTALL AUTOMATICALLY ON ANOTHER COMPUTER? OR EASILY SHAREYOUR APPLICATION WITH A FRIEND OR COLLEAGUE?
  28. 28. REPLACE MANUAL METHOD WITH ATINY BASH SCRIPT?
  29. 29. "YEAH, I KNOWYOU DEVELOP ON DEBIAN, BUTTHIS NEEDSTO RUN ON RHEL."
  30. 30. DEVELOPER Installing software is boring! I just want to script nginx with Lua!
  31. 31. SOLUTION
  32. 32. WE CAN MAKE DOCKERFILE. IT WILL RUN ON ANY OS WITH COMPATIBLE KERNEL. from debian:jessie run apt-get update run apt-get install -y libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl wget make build-essential run mkdir -p /openresty workdir /openresty env OPENRESTY_VERSION 1.7.10.2 run wget http://openresty.org/download/ngx_openresty-${OPENRESTY_VERSION}.tar.gz run tar xzvf ngx_openresty-${OPENRESTY_VERSION}.tar.gz run cd ngx_openresty-${OPENRESTY_VERSION}/ && ./configure && make && make install env PATH /usr/local/openresty/nginx/sbin:$PATH add https://get.docker.com/builds/Linux/x86_64/docker-latest /docker run chmod +x /docker add . /app workdir /app entrypoint ["./entrypoint.sh"]
  33. 33. BUILD, SHIP, & RUN $ docker build -t nathanleclaire/openresty . $ docker push nathanleclaire/openresty $ # Now we can pull from anywhere! $ # On another computer... $ docker run -d -P nathanleclaire/openresty
  34. 34. YOU CAN USE AUTOMATED BUILDS ON DOCKER HUBTO LEARN FROM OTHER PEOPLE
  35. 35. LOTS OF CONTRIBUTION TO DOCKER BECAUSE OF DOCKER
  36. 36. DOCKER MACHINE
  37. 37. DOCKER COMPOSE
  38. 38. DOCKER SWARM

×