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.
VAGRANT & 
DOCKER 
Ou carregue seus ambientes no bolso com Vagrant e Docker 
diogo.lucas@gmail.com
Primeiro, o bode na sala:
DOKKU
Servidor dokku 
Scripts dokku 
Deployment dokku 
Sugestões dokku?
voltaremos aokku ao dokku mais tarde
Ambientes: 
a) reprodutíveis 
b) portáveis
like so (demo)
olhando por baixo dos panos...
ANATOMIA DE UM ARQUIVO VAGRANT 
(SIM, ISSO É RUBY :)): 
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 
# Configur...
sim, o fluxo se resume a: 
$ git clone my-repo 
$ vagrant up
Ok, mas e se suas aplicações fossem portáteis?
PROBLEMÃO DE LOGÍSTICA ATÉ 1950: 
Como transportar e cobrar por cargas tão diferentes entre 
si?
A SOLUÇÃO:
PROBLEMÃO DE DEVOPS ATÉ 2013: 
Como deployar e promover aplicações tão diferentes entre 
si?
A SOLUÇÃO:
UM EXEMPLO COM MONGODB 
$ docker run --name exemplo-TDC -d mongo 
$ docker run -it --link exemplo-TDC:mongo  
--rm mongo s...
CONCEITOS: 
Dockerfile: descreve uma imagem 
Imagem: base (binários) para um container 
Container: unidade de execução
POR QUE UM DEV GOSTA DISSO? 
Portabilidade + Reprodutibilidade 
Ei, não dependo de burocratas todo o tempo!
POR QUE UM DEVOPS GOSTA DISSO? 
Automação + Reprodutibilidade 
Ei, é menos trabalho chato!
POR QUE UM ADMIN GOSTA DISSO? 
Ei, é menos trabalho!
POR QUE UM INFRA MANAGER GOSTA 
DISSO? 
Ei, é uma melhor densidade computacional! 
Ei, posso gastar menos!
MAS ESPEREM, 
TEM MAIS!
Docker + Heroku 
Dokku
Docker + Vagrant 
Prod-like na sua máquina
DOCKER-BASED 
PROMOTIONS 
Build: docker push 
Deploy: docker pull
DOCKER EXTRAS 
MesoSphere 
Kubernetes 
OpenShift 
Flynn 
Deis 
Fig
Momento holy sh#t
Q&A
O INCRÉDULO: OK, MAS QUAIS SÃO OS 
PROBLEMAS COM O DOCKER?
1. Alto no hype cycle 
2. Preocupações sobre segurança e estabilidade 
3. Rampa de equipe 
4. Use cases parciais
O EXPERIENTE: TÁ, MAS E PORQUE EU 
NÃO POSSO USAR SÓ PUPPET & AFINS? 
Poder, pode, mas não vai ser a mesma coisa: 
a) meno...
O EMPOLGADO: LEGAL, LEGAL, MUITO 
LEGAL! ONDE EU ASSINO?!? 
1. 
2. 
3. 
Crie seu próprio sandbox 
Ouça a própria Docker 
E...
Vagrant & Docker: carregue seus ambientes no bolso
Vagrant & Docker: carregue seus ambientes no bolso
Vagrant & Docker: carregue seus ambientes no bolso
Upcoming SlideShare
Loading in …5
×

Vagrant & Docker: carregue seus ambientes no bolso

3,915 views

Published on

Uma apresentação sobre Vagrant, Docker, e como estas ferramentas podem ser usadas para a criação de ambientes de fácil reprodução.

Published in: Technology
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes ,Download or read Ebooks here ... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m6jJ5M }
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Vagrant & Docker: carregue seus ambientes no bolso

  1. 1. VAGRANT & DOCKER Ou carregue seus ambientes no bolso com Vagrant e Docker diogo.lucas@gmail.com
  2. 2. Primeiro, o bode na sala:
  3. 3. DOKKU
  4. 4. Servidor dokku Scripts dokku Deployment dokku Sugestões dokku?
  5. 5. voltaremos aokku ao dokku mais tarde
  6. 6. Ambientes: a) reprodutíveis b) portáveis
  7. 7. like so (demo)
  8. 8. olhando por baixo dos panos...
  9. 9. ANATOMIA DE UM ARQUIVO VAGRANT (SIM, ISSO É RUBY :)): Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Configurando a imagem (Vagrant) de base para a VM config.vm.box = "cbumgard/nodejs" # Configurando o redirecionamento de portas config.vm.network "forwarded_port", guest: 1948, host: 1948 # Preparando a VM, usando shell config.vm.provision "shell", inline: "cd /vagrant;npm install", privileged: "false" # Configuração (desativada) de um IP fixo para acesso do host à máquina # config.vm.network "private_network", ip: "192.168.33.10" # Configuração (desativada) de uma pasta compartilhada entre o host e a VM # config.vm.synced_folder "../data", "/vagrant_data" end
  10. 10. sim, o fluxo se resume a: $ git clone my-repo $ vagrant up
  11. 11. Ok, mas e se suas aplicações fossem portáteis?
  12. 12. PROBLEMÃO DE LOGÍSTICA ATÉ 1950: Como transportar e cobrar por cargas tão diferentes entre si?
  13. 13. A SOLUÇÃO:
  14. 14. PROBLEMÃO DE DEVOPS ATÉ 2013: Como deployar e promover aplicações tão diferentes entre si?
  15. 15. A SOLUÇÃO:
  16. 16. UM EXEMPLO COM MONGODB $ docker run --name exemplo-TDC -d mongo $ docker run -it --link exemplo-TDC:mongo --rm mongo sh -c 'exec mongo "$MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT/test"' $ show dbs
  17. 17. CONCEITOS: Dockerfile: descreve uma imagem Imagem: base (binários) para um container Container: unidade de execução
  18. 18. POR QUE UM DEV GOSTA DISSO? Portabilidade + Reprodutibilidade Ei, não dependo de burocratas todo o tempo!
  19. 19. POR QUE UM DEVOPS GOSTA DISSO? Automação + Reprodutibilidade Ei, é menos trabalho chato!
  20. 20. POR QUE UM ADMIN GOSTA DISSO? Ei, é menos trabalho!
  21. 21. POR QUE UM INFRA MANAGER GOSTA DISSO? Ei, é uma melhor densidade computacional! Ei, posso gastar menos!
  22. 22. MAS ESPEREM, TEM MAIS!
  23. 23. Docker + Heroku Dokku
  24. 24. Docker + Vagrant Prod-like na sua máquina
  25. 25. DOCKER-BASED PROMOTIONS Build: docker push Deploy: docker pull
  26. 26. DOCKER EXTRAS MesoSphere Kubernetes OpenShift Flynn Deis Fig
  27. 27. Momento holy sh#t
  28. 28. Q&A
  29. 29. O INCRÉDULO: OK, MAS QUAIS SÃO OS PROBLEMAS COM O DOCKER?
  30. 30. 1. Alto no hype cycle 2. Preocupações sobre segurança e estabilidade 3. Rampa de equipe 4. Use cases parciais
  31. 31. O EXPERIENTE: TÁ, MAS E PORQUE EU NÃO POSSO USAR SÓ PUPPET & AFINS? Poder, pode, mas não vai ser a mesma coisa: a) menor reprodutibilidade e b) menor densidade potencial
  32. 32. O EMPOLGADO: LEGAL, LEGAL, MUITO LEGAL! ONDE EU ASSINO?!? 1. 2. 3. Crie seu próprio sandbox Ouça a própria Docker Entre na IASA/GUCloud (nudge nudge)

×