qcon sp - shorttalk - virtualização e provisionamento de ambientes com vagrant e puppet
DESCRIPTION
Você já parou pra pensar que sua stack de desenvolvimento (Apache, PHP, MySQL, etc) consome recursos de sua máquina do trabalho ou pessoal em momentos que você não está desenvolvendo? E quanto ao setup de ambiente e as muitas configurações que precisamos fazer a cada projeto novo que chega ou quando algum membro novo entra no time? Logo depois, como garantir que todos do time estão utilizando exatamente as mesmas versões para garantir máxima compatibilidade entre os diversos ambientes (local, staging, produção, etc)? Venha conhecer como a combinação entre duas tecnologias irá automatizar bastante processo manual economizando tempo e recursos e garantindo maior compatibilidade.TRANSCRIPT
![Page 3: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/3.jpg)
Lucas Arruda
DevOps @ CI&T
Open-Source enthusiast
~10 yrs on the road
Based on Campinas-SP
Zend Certified Engineer PHP 5.3
Drupal architect
![Page 4: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/4.jpg)
Common Scenario
![Page 5: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/5.jpg)
Each developer has its own favorite/predefined stack of technologies.
● OSX/Linux/Windows
● Distros/Versions
● Apache/Nginx
● WAMP/XAMPP/MAMP
● PHP 5.??/Rails/Node.js
● MySQL/MariaDB/SQLite
● Modules/Extensions
● Libraries & Dependencies
● PEAR/PECL/Composer
● Memcache/Varnish
![Page 6: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/6.jpg)
"If you've ever maintained a large application, one of the hardest parts is onboarding new resources."
"Running everything on a home machine and remembering to turn it all off in the end of the day is unfeasible."
"Develop on OSX and deploy on Ubuntu and you’ll be surprised with ugly encoding issues."
● version differences
● platform-related issues
● config and tweaking
● time consuming op.
● home station messed up
![Page 7: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/7.jpg)
BUT IT WORKS ON MY
MACHINE...
![Page 8: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/8.jpg)
It's important to build and maintain a software using the same requirements on all environments it will be deployed.
![Page 9: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/9.jpg)
Forcing developers to use the same OS is going to lead to problems, reduced productivity and promoting nerd-fighting.
![Page 10: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/10.jpg)
ChangeSuggestion
![Page 11: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/11.jpg)
Create and configure lightweight, reproducible and portable development environments.
Vagrant up!
![Page 12: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/12.jpg)
Boxes
Virtualization
Vagrantfile
![Page 13: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/13.jpg)
$ vagrant up
$ vagrant init
$ vagrant suspend
![Page 14: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/14.jpg)
Provisioning
![Page 15: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/15.jpg)
You can easily automate repetitive tasks, quickly deploy critical applications, and proactively manage changes.
Puppet
![Page 16: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/16.jpg)
Declarative Language
Modular
Reusable
![Page 17: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/17.jpg)
Puppet
package { “ruby”:ensure => latest
}
Not Puppet
# yum install ruby
# apt-get install ruby
# ports install ruby
# emerge ruby
# rpm -Uvh ruby-1.x.rpm
# gem install ruby
# up2date ruby
# fink install ruby
# pkg_add ruby
# pkg-get ruby
# rug install ruby
# pkgadd ruby
service { “apache”:ensure => running
}
![Page 18: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/18.jpg)
Q&Aciandt.com
puppetlabs.com
github.com/puppetlabs
forge.puppetlabs.com
docs.puppetlabs.com
vagrantup.com
github.com/mitchellh/vagrant
vagrantbox.es
docs.vagrantup.com
![Page 19: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/19.jpg)
THANKS FOR
BEINGHERE!
![Page 20: QCon SP - ShortTalk - Virtualização e Provisionamento de Ambientes com Vagrant e Puppet](https://reader034.vdocuments.site/reader034/viewer/2022042623/54b550d74a795979748b4779/html5/thumbnails/20.jpg)
ciandt.com
@lunascarruda
google.com/+LucasArruda
fb.com/lucasnarruda
linkedin.com/in/larruda
github.com/larruda
coderbits.com/larruda