Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Use Datacenter Tools to Make Your Dev Life Easier
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Jochen Lillich
August 23, 2012
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Use Datacenter Tools to Make Your Dev Life Easier
Talk at DrupalCon Munich 2012 about using Chef and Vagrant in a development environment
Jochen Lillich
August 23, 2012
More Decks by Jochen Lillich
See All by Jochen Lillich
Under Pressure
geewiz
0
98
Monorepo vs Multirepo
geewiz
0
78
Dealing with IRQ conflicts in 2018
geewiz
0
82
Planning for the Unpredictable
geewiz
0
240
Captaining a Container Ship
geewiz
0
96
Content - Culture - Community
geewiz
0
410
Drupal on Docker
geewiz
0
280
Getting the most out of Varnish (DrupalCamp Galway 2014)
geewiz
0
240
DevOps with Drupal
geewiz
0
350
Other Decks in Programming
See All in Programming
The NotImplementedError Problem in Ruby
koic
1
710
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
510
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
3Dシーンの圧縮
fadis
1
740
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
280
dRuby over BLE
makicamel
2
330
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
320
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
120
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
Inside Stream API
skrb
1
690
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
We Are The Robots
honzajavorek
0
240
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
220
Side Projects
sachag
455
43k
Thoughts on Productivity
jonyablonski
76
5.2k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Being A Developer After 40
akosma
91
590k
First, design no harm
axbom
PRO
2
1.2k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Limits of Empathy - UXLibs8
cassininazir
1
350
Transcript
freistil.it Use datacenter tools to make your dev life easier
Jochen Lillich
About me
Jochen Lillich @geewiz * 1970 Linux Sysadmin & Trainer IT
Manager at WEB.DE, 1&1 Founder & CTO at freistil IT
freistil IT http://freistil.it @freistil “Ops for Devs” DrupalCONCEPT: Drupal IaaS
Challenge... Local development environments Manual configuration effort Mismatched software versions
Long onboarding times
...accepted! Minimize setup time Make Development = Production Reproduce setup
consistently on demand
Vagrant
“Vagrant uses Oracle’s VirtualBox to build configurable, lightweight, and portable
virtual machines dynamically.” http://vagrantup.com
$ gem install vagrant $ vagrant box add precise64 http://
files.vagrantup.com/precise64.box $ cd ~/myvm $ vagrant init precise64 $ vagrant up $ vagrant ssh Instant VM
Pre-installed OS Available from http://files.vagrantup.com Box
Box – Management $ vagrant box -h $ vagrant package
-h
Box – DIY VeeWee by Patrick Dubois https://github.com/jedi4ever/veewee
Vagrantfile Ruby DSL for VM configuration Can be used for
many VMs
Vagrant::Config.run do |config| config.vm.box = "precise64" config.vm.boot_mode = :gui config.vm.forward_port
80, 8080 end Vagrantfile
“Well, I’ve been doing that for ages with snapshots/ images/other...”
None
“No matter how complex the realities of your business, Chef
makes it easy to deploy servers and scale applications throughout your entire infrastructure.” http://www.opscode.com/chef/
Ruby DSL for system administration tasks Makes only necessary changes
(Idempotence) CM with Chef
Infrastructure as Code Cookbooks Recipes Resources Providers Nodes Attributes Roles
Resources Package Service File, Directory Template Command, Script Cron Git
...
Example package ”apache2” do action :install end service ”apache2” do
action [:enable, :start] end
Example (cont.) template ”/etc/apache2/apache2.conf” do source ”apache2.conf.erb” owner ”root” group
”root” mode 0644 notifies ”reload”, ”service[apache2]” end
Community sites http://wiki.opscode.com http://community.opscode.com http://github.com/opscode-cookbooks
+
Installation $ gem install librarian $ cd ~/myvm $ librarian-chef
init $ $EDITOR Cheffile $ librarian-chef install
Cheffile site ”http://community.opscode.com/api/v1” cookbook ’apache2’ cookbook ’php’ cookbook ’mysql’
roles/drupal.rb name "drupal" description "Drupal dev VM" run_list( "recipe[apache2]", "recipe[apache2::mod_expires]",
"recipe[apache2::mod_rewrite]", "recipe[apache2::mod_php5]", "recipe[php]", "recipe[php::module_mysql]", "recipe[mysql::client]", "recipe[mysql::server]" )
Vagrantfile config.vm.provision :chef_solo do |chef| chef.cookbooks_path = ”cookbooks” chef.roles_path =
”roles” chef.add_role ”drupal-dev” end
Kitchen magic $ vagrant provision
Now do some awesome stuff!
And finally... $ vagrant destroy
Tips Keep all building blocks local: Cache packages Store your
own base boxes Use a central cookbook repository
Conclusion Combining Vagrant and Chef gives us: Dedicated, consistent, disposable
dev setups Efficient onboarding of new devs
Thank you! Please rate my session: http://bit.ly/dc12chef