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.
moreDEVsonDEVOPSwith
DOCKERORCHESTRATION
All the Things you have to Know in OrdertousedockerwithOrchestrationinProductionl...
2.
@liuggio Giulio De Donato
@liuggiowelcometothebundle.com
moreDEVsonDEVOPSwith
DOCKERORCHESTRATION
All the Things you have to Know in OrdertousedockerwithOrchestrationinProductionl...
@liuggio Giulio De Donato
1 Docker Container!==
@liuggio Giulio De Donato
Virtualization !== ContainerContainer are mostly syscalls2
@liuggio Giulio De Donato
3 It is all about
while true;
do mkdir x; cd x;
done
bomb() {
bomb | bomb &
}; bomb
ISOLATION
@liuggio Giulio De Donato
4 DevOps is ...
TheperfectStorm
● VELOCITY
● Variation
● VisualizationLEAD TIME
Threewaydevops:
@liuggio Giulio De Donato
Infrastructure like a
managed application
5
Infrastructure like a
managed application
@liuggio Giulio De Donato
6 Use the FORCE
One process per container
@liuggio Giulio De Donato
7 Use the FORCE
log to StdErr and StdOut
@liuggio Giulio De Donato
Can’t touch this8
@liuggio Giulio De Donato
9 Use the FORCE
Env. Variable all the things
/etc/php5/fpm/pool.d/www.conf
clear_env = no
[www]
...
@liuggio Giulio De Donato
10 Containers communication is easy
NGINX PHP-FPM
Data (code)
php-cli
@liuggio Giulio De Donato
Cache
DB
10 Containers communication is easy
Backend
expose
po...
NGINX PHP-FPM
Data (code)
php-cli
@liuggio Giulio De Donato
Cache
DB
10 Containers communication is easy
N
N
N
N
PHP
PHP
P...
NGINX PHP-FPM
Data (code)
php-cli
@liuggio Giulio De Donato
10 Containers communication is easy
N
N
N
N
PHP
PHP
PHP
CLI
ex...
NGINX PHP-FPM
Data (code)
php-cli
@liuggio Giulio De Donato
10 Containers communication is easy
Cache
DB
...SubNet
@liuggio Giulio De Donato
10 Containers communication is easy
...Microservices
NGINX
PHP-FPM
Data (code)
php-cli
Cache
DB
...
@liuggio Giulio De Donato
10 Containers communication is easy
NOT FOR HUMAN!!!!
@liuggio Giulio De Donato
11 Orchestration !== Automation
● Kubernetes
● DockerCloud
● DOCKERUCP
● MESOS
● Provisioningtool(BASHISM/…)
● …
DockerOrchestrationframeworks/tools
@liuggio Giulio De Donato
DEMO
Devops:
The last human action
happens when you commit?
@liuggio Giulio De Donato
@liuggio Giulio De Donato
12 Understand your processes
CODE TEST DEPLOY
@liuggio Giulio De Donato
13 Blue Green Deployment
Load
Balancer
Web Blue
Web Green
@liuggio Giulio De Donato
12 My pipeline (contd)
CODE
BUILD
CHOOSE
NODES
Register
Services
RUN
Containers
(blue-green)
Int...
@liuggio Giulio De Donato
14
Container registry and
service discovery
CONSUL
@liuggio Giulio De Donato
12 My pipeline (contd)
CODE
BUILD
CHOOSE
NODES
Register
Services
RUN
Containers
(blue-green)
Int...
@liuggio Giulio De Donato
15 Graceful Deployment (contd)
Load
Balancer
Web
New Web
Feature
@liuggio Giulio De Donato
16 You’ll need a lot of disk space
@liuggio Giulio De Donato
17 Resources ...
@liuggio Giulio De Donato
18
CONTAINER SERVICE A
CONTAINER SERVICE A
CONTAINER SERVICE A
CONTAINER SERVICE B
CONTAINER SER...
@liuggio Giulio De Donato
18 DNS SRV is your friend
CONTAINER SERVICE A
CONTAINER SERVICE A
CONTAINER SERVICE A
CONTAINER ...
@liuggio Giulio De Donato
18 DNS SRV is your friend
$ dig @192.168.99.100 bash_server.service.dc1.consul. SRV
@liuggio Giulio De Donato
$consulHost = "bash_server.service.dc1.consul.";
$results = dns_get_record($consulHost, DNS_SRV)...
@liuggio Giulio De Donato
19 Use a log handler -visualize-
@liuggio Giulio De Donato
20 Fast is better
a
b
c
Small Images eg. Alpine ~5mb
DockerFile use layer cache wisely
Build cou...
WinningKeys
DEMO --- THE PERFECT ORCHESTRATION
EasilyDEPLOY
(LASTFEATUREPUSHED gracefully)
EasilyRollback
(LASTPUSHEDFEATU...
THE PERFECT ORCHESTRATION
Processes respect your needs and:
- The Lead time is SHORT
- The Feedback is FAST
- The Improvem...
fewthings you have to Know in Ordertousedockerwith
OrchestrationinProductionlikeIdid,butnotreallylikeidid,
becauseIcried,I...
@liuggio Giulio De Donato
● http://www.infoq.com/articles/continuous-deployment-containers
● devops 2.0 the book
● www.wel...
More developers on DevOps with Docker orchestration
Upcoming SlideShare
Loading in …5
×

More developers on DevOps with Docker orchestration

Few things you have to Know in Order to use docker with Orchestration in Production like I did, but not really like i did, because I cried, I really cried hard! Three way devops, pipeline...

  • Login to see the comments

  • Be the first to like this

More developers on DevOps with Docker orchestration

  1. 1. moreDEVsonDEVOPSwith DOCKERORCHESTRATION All the Things you have to Know in OrdertousedockerwithOrchestrationinProductionlikeIdidbutnotreallylikeididitbecauseIcried,Ireallycriedhard,sopleasedonotcrybecauselifeisshortandyoushouldspendyourtimeenjoyingit.
  2. 2. 2. @liuggio Giulio De Donato @liuggiowelcometothebundle.com
  3. 3. moreDEVsonDEVOPSwith DOCKERORCHESTRATION All the Things you have to Know in OrdertousedockerwithOrchestrationinProductionlikeIdidbutnotreallylikeididitbecauseIcried,Ireallycriedhard,sopleasedonotcrybecauselifeisshortandyoushouldspendyourtimeenjoyingit.
  4. 4. @liuggio Giulio De Donato 1 Docker Container!==
  5. 5. @liuggio Giulio De Donato Virtualization !== ContainerContainer are mostly syscalls2
  6. 6. @liuggio Giulio De Donato 3 It is all about while true; do mkdir x; cd x; done bomb() { bomb | bomb & }; bomb ISOLATION
  7. 7. @liuggio Giulio De Donato 4 DevOps is ...
  8. 8. TheperfectStorm
  9. 9. ● VELOCITY ● Variation ● VisualizationLEAD TIME Threewaydevops:
  10. 10. @liuggio Giulio De Donato Infrastructure like a managed application 5 Infrastructure like a managed application
  11. 11. @liuggio Giulio De Donato 6 Use the FORCE One process per container
  12. 12. @liuggio Giulio De Donato 7 Use the FORCE log to StdErr and StdOut
  13. 13. @liuggio Giulio De Donato Can’t touch this8
  14. 14. @liuggio Giulio De Donato 9 Use the FORCE Env. Variable all the things /etc/php5/fpm/pool.d/www.conf clear_env = no [www] env[MY_ENV_VAR_1] = 'value1' env[MY_ENV_VAR_2] = 'value2'
  15. 15. @liuggio Giulio De Donato 10 Containers communication is easy
  16. 16. NGINX PHP-FPM Data (code) php-cli @liuggio Giulio De Donato Cache DB 10 Containers communication is easy Backend expose port 80 ...Services
  17. 17. NGINX PHP-FPM Data (code) php-cli @liuggio Giulio De Donato Cache DB 10 Containers communication is easy N N N N PHP PHP PHP CLI expose port 80 Load balancer ...Scale
  18. 18. NGINX PHP-FPM Data (code) php-cli @liuggio Giulio De Donato 10 Containers communication is easy N N N N PHP PHP PHP CLI expose port 80 Load balancer NODE 3 NODE 2 NODE 1 ...Nodes
  19. 19. NGINX PHP-FPM Data (code) php-cli @liuggio Giulio De Donato 10 Containers communication is easy Cache DB ...SubNet
  20. 20. @liuggio Giulio De Donato 10 Containers communication is easy ...Microservices NGINX PHP-FPM Data (code) php-cli Cache DB NGINX PHP-FPM Data (code) php-cli Cache DB NGINX PHP-FPM Data (code) php-cli Cache DB NX FPM ode) cli Cache DB NGINX PHP-FPM Data (code) php-cli Cache DB NGINX PHP-FPM Data (code) php-cli Cache DB NGINX PHP-FP Data (cod php-cli NGINX PHP-FPM Data (code) php-cli Cache DB Cache DB NGINX PHP-FPM Data (code) php-cli Cache DB NGINX PHP-FPM Data (code) php-cli Cach DB NGINX PHP-FPM Data (code) php-cli Cache DB NGINX PHP-FPM Data (code) php-cli Cache DB NGINX PHP-FPM Data (code) php-cli Cache DB NGINX PHP-FPM Data (code) php-cli C
  21. 21. @liuggio Giulio De Donato 10 Containers communication is easy NOT FOR HUMAN!!!!
  22. 22. @liuggio Giulio De Donato 11 Orchestration !== Automation
  23. 23. ● Kubernetes ● DockerCloud ● DOCKERUCP ● MESOS ● Provisioningtool(BASHISM/…) ● … DockerOrchestrationframeworks/tools
  24. 24. @liuggio Giulio De Donato DEMO
  25. 25. Devops: The last human action happens when you commit? @liuggio Giulio De Donato
  26. 26. @liuggio Giulio De Donato 12 Understand your processes CODE TEST DEPLOY
  27. 27. @liuggio Giulio De Donato 13 Blue Green Deployment Load Balancer Web Blue Web Green
  28. 28. @liuggio Giulio De Donato 12 My pipeline (contd) CODE BUILD CHOOSE NODES Register Services RUN Containers (blue-green) Integration tests Configure Proxy with color Post Integration test PUSH to registry TEST PULL CONTAINER YOUR CUSTOMERS ARE HAPPY
  29. 29. @liuggio Giulio De Donato 14 Container registry and service discovery
  30. 30. CONSUL
  31. 31. @liuggio Giulio De Donato 12 My pipeline (contd) CODE BUILD CHOOSE NODES Register Services RUN Containers (blue-green) Integration tests Configure Proxy with color Post Integration test PUSH to registry TEST PULL CONTAINER YOUR CUSTOMERS ARE HAPPY
  32. 32. @liuggio Giulio De Donato 15 Graceful Deployment (contd) Load Balancer Web New Web Feature
  33. 33. @liuggio Giulio De Donato 16 You’ll need a lot of disk space
  34. 34. @liuggio Giulio De Donato 17 Resources ...
  35. 35. @liuggio Giulio De Donato 18 CONTAINER SERVICE A CONTAINER SERVICE A CONTAINER SERVICE A CONTAINER SERVICE B CONTAINER SERVICE B CONTAINER SERVICE B
  36. 36. @liuggio Giulio De Donato 18 DNS SRV is your friend CONTAINER SERVICE A CONTAINER SERVICE A CONTAINER SERVICE A CONTAINER SERVICE B CONTAINER SERVICE B CONTAINER SERVICE B
  37. 37. @liuggio Giulio De Donato 18 DNS SRV is your friend $ dig @192.168.99.100 bash_server.service.dc1.consul. SRV
  38. 38. @liuggio Giulio De Donato $consulHost = "bash_server.service.dc1.consul."; $results = dns_get_record($consulHost, DNS_SRV); // $result["host"] // $result["port"] // $result["pri"] // $result["weight"] // $result["class"] // $result["ttl"] // $result["type"] // $result["target"] DNS SRV is your friend18
  39. 39. @liuggio Giulio De Donato 19 Use a log handler -visualize-
  40. 40. @liuggio Giulio De Donato 20 Fast is better a b c Small Images eg. Alpine ~5mb DockerFile use layer cache wisely Build could be slow (if you don’t follow the docker-way) d Bad performance on large files
  41. 41. WinningKeys DEMO --- THE PERFECT ORCHESTRATION EasilyDEPLOY (LASTFEATUREPUSHED gracefully) EasilyRollback (LASTPUSHEDFEATUREgracefully) Visualize Share/Test/Commit/Merge Infrastructure liuggio
  42. 42. THE PERFECT ORCHESTRATION Processes respect your needs and: - The Lead time is SHORT - The Feedback is FAST - The Improvement loop is INFINITE @liuggio Giulio De Donato
  43. 43. fewthings you have to Know in Ordertousedockerwith OrchestrationinProductionlikeIdid,butnotreallylikeidid, becauseIcried,Ireallycriedhard,sopleasedonotcrybecauselifeis shortandyoushouldspendyourtimeenjoyingit. ThankYou @liuggiojoind.in/talk/4b24e
  44. 44. @liuggio Giulio De Donato ● http://www.infoq.com/articles/continuous-deployment-containers ● devops 2.0 the book ● www.welcometothebundle.com/isolate-a-process-with-no-container-like-docker ● https://github.com/opencontainers/runtime-spec/blob/master/config-linux.md#namespaces ● https://www.opencontainers.org/news/faqs/who-will-be-initial-technical-leadership ● http://www.cyberciti.biz/faq/unix-linux-chroot-command-examples-usage-syntax/ ● http://s0.cyberciti.org/uploads/faq/2013/01/bash-chroot-ls-demo.gif ● https://www.flockport.com/lxc-vs-docker/ ● http://ramirose.wix.com/ramirosen ● https://lwn.net/Articles/532593/ ● https://lwn.net/Articles/531114/ ● https://unsplash.com/photos/6wQId4r0uA4 CREDITS

×