Deploying Docker Containers
-
Upload
hugo-henley -
Category
Technology
-
view
297 -
download
9
description
Transcript of Deploying Docker Containers
![Page 2: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/2.jpg)
Quem sou eu?
Arquiteto de Soluções da STI
Engenheiro de Software
Nerd :)
Apaixonado por tecnologia
![Page 3: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/3.jpg)
![Page 4: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/4.jpg)
#quemnunca?
• Perdeu horas tentando descobrir porque o seu software não funcionava em produção e era aquela lib que faltava…
• Ficou dias tentando configurar a máquina para rodar o projeto da empresa
• Contratou um web designer e teve que ajudá-lo a instalar até o banco de dados da sua app. Que sentido faz?
![Page 5: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/5.jpg)
Desenvolvedores devem…
• Ter mais tempo para focar no negócio!
• Entregar software que funciona sem dificuldades e que sejam independentes do ambiente
• Deployar, deployar, deployar…
![Page 6: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/6.jpg)
Suas aplicações devem…
• Escalar com facilidade
• Ser facilmente deployáveis
• Rodar em ambientes isolados
![Page 8: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/8.jpg)
Qual a solução?
![Page 9: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/9.jpg)
Docker? Containers?
![Page 10: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/10.jpg)
Um paralelo com a Engenharia …
![Page 11: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/11.jpg)
![Page 12: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/12.jpg)
![Page 13: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/13.jpg)
Solução…
![Page 14: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/14.jpg)
![Page 15: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/15.jpg)
![Page 16: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/16.jpg)
![Page 17: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/17.jpg)
![Page 18: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/18.jpg)
O deploy é feito em containers leves e auto-suficientes.
![Page 19: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/19.jpg)
![Page 20: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/20.jpg)
#comofaz?
![Page 21: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/21.jpg)
![Page 22: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/22.jpg)
Docker?• Permite criar containers leves e auto-suficientes que podem
conter qualquer tipo de aplicação/serviço
• Se é possível rodar em um Kernel Linux, pode rodar no Docker !
• Não é uma Virtual Machine!
• É um Virtual Environment!
• Escrito em Go :)
![Page 23: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/23.jpg)
![Page 24: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/24.jpg)
Virtual Machines
Server
Host OS
Hypervisor
Guest OS
Bin/Libs
App A
Guest OS
Bin/Libs
App B
![Page 25: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/25.jpg)
Virtual Environments
Server
Host OS
Docker Engine
Bin/Libs
App A
Bin/Libs
App B
![Page 26: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/26.jpg)
Há um ganho incrível de performance.
![Page 27: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/27.jpg)
Performance
[An Updated Performance Comparison of Virtual Machines and Linux Containers]
Quase não há overhead!
![Page 28: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/28.jpg)
Deploy
![Page 29: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/29.jpg)
Fluxo Padrão
Your machineServer
![Page 30: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/30.jpg)
![Page 31: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/31.jpg)
Deploying Containers
Server
Host OS
Docker Engine
Your Machine Server
Ambiente de Desenvolvimento = Ambiente de ProduçãoAmbiente de Desenvolvimento = Ambiente de ProduçãoAmbiente de Desenvolvimento = Ambiente de ProduçãoAmbiente de Desenvolvimento = Ambiente de Produção
![Page 32: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/32.jpg)
Como faço pra rodar o meu Linux Container?
![Page 33: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/33.jpg)
1docker pull ubuntu
![Page 34: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/34.jpg)
docker run -i -t ubuntu:14.04 /bin/bash2
![Page 35: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/35.jpg)
![Page 36: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/36.jpg)
Só isso?
![Page 37: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/37.jpg)
![Page 38: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/38.jpg)
Onde eu configuro o meu container?
![Page 39: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/39.jpg)
Dockerfile
![Page 40: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/40.jpg)
Dockerizing a Redis Service
Dockerfile
![Page 41: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/41.jpg)
Dockerizing a MySQL Database
![Page 42: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/42.jpg)
Criando o container MySQL
![Page 43: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/43.jpg)
![Page 44: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/44.jpg)
Observações
• Tempo de boot do container?
• As migrações rodam dentro do container! Você não precisa ter o MySQL instalado na sua máquina
• Possibilidade de criar vários containers, cada um com um serviço
• Ganhamos isolamento e velocidade!
![Page 45: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/45.jpg)
Fácil escalar…
…
…
![Page 46: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/46.jpg)
Linking Containers
Redis Server App / Linux
![Page 48: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/48.jpg)
![Page 49: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/49.jpg)
Quem está usando?
![Page 50: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/50.jpg)
Onde fazer deploy?
![Page 51: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/51.jpg)
Cloud Computing
![Page 52: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/52.jpg)
![Page 53: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/53.jpg)
![Page 54: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/54.jpg)
![Page 55: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/55.jpg)
Elastic Beanstalk• Serviço que permite deploy de forma fácil e
rápida de aplicações Java, .NET, PHP, Node.js, Python, Ruby e Docker
• Suporta Apache, Nginx, Passenger e IIS
• Você faz upload do seu código
• O Elastic Beanstalk se encarrega do provisionamento e monitoramento da sua aplicação
![Page 56: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/56.jpg)
![Page 57: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/57.jpg)
![Page 58: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/58.jpg)
• Dockerfile
• Dockerrun.aws.json
O que é necessário?
![Page 59: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/59.jpg)
Dockerrun.aws.json
![Page 60: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/60.jpg)
Testando…
[https://github.com/awslabs/eb-py-flask-signup/tree/docker]
![Page 62: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/62.jpg)
![Page 63: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/63.jpg)
![Page 64: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/64.jpg)
[http://eb-docker-env-vbxvmms6fz.elasticbeanstalk.com]
![Page 65: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/65.jpg)
![Page 66: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/66.jpg)
DESAFIO!
![Page 67: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/67.jpg)
Rodem seu próximo projeto em containers na AWS! :)
![Page 68: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/68.jpg)
Dica para os alunos…
![Page 69: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/69.jpg)
E o mais importante…
O mercado quer solucionadores de problemas!
![Page 70: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/70.jpg)
![Page 71: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/71.jpg)
Atenção! Descontos!
![Page 74: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/74.jpg)
Estamos contratando!
![Page 75: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/75.jpg)
8 sistemas em desenvolvimento> 40 sistemas em produção
![Page 76: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/76.jpg)
Horário Flexível!
Aprendizado constante
Tecnologia de Ponta
![Page 77: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/77.jpg)
![Page 78: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/78.jpg)
12 e 13 de Novembro
![Page 79: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/79.jpg)
Empresas confirmadas
![Page 80: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/80.jpg)
Dúvidas?
![Page 81: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/81.jpg)
Obrigado!
![Page 82: Deploying Docker Containers](https://reader035.fdocumentos.com/reader035/viewer/2022081720/557d90e9d8b42ad6698b4fc1/html5/thumbnails/82.jpg)
http://github.com/hugohenley
Hugo Henley
hugohenley
http://hugohenley.github.io