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
Infrastructure as Ruby code
Search
Augusto Becciu
October 20, 2012
Programming
5
1.2k
Infrastructure as Ruby code
RubyConf Argentina 2012
Augusto Becciu
October 20, 2012
Tweet
Share
More Decks by Augusto Becciu
See All by Augusto Becciu
Building a Data Platform with Ruby glue
abecciu
0
440
Other Decks in Programming
See All in Programming
Jasprが凄い話
hyshu
0
180
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
5
1.1k
ML.NETで始める機械学習
ymd65536
0
240
Datadog Workflow Automation で圧倒的価値提供
showwin
1
280
kintone開発を効率化するためにチームで試した施策とその結果を大放出!
oguemon
0
170
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
200
Generating OpenAPI schema from serializers throughout the Rails stack - Kyobashi.rb #5
envek
1
390
From the Wild into the Clouds - Laravel Meetup Talk
neverything
0
170
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
150
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
630
TCAを用いたAmebaのリアーキテクチャ
dazy
0
210
ナレッジイネイブリングにAIを活用してみる ゆるSRE勉強会 #9
nealle
0
160
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
Six Lessons from altMBA
skipperchong
27
3.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
580
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
GraphQLとの向き合い方2022年版
quramy
44
14k
A better future with KSS
kneath
238
17k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
650
Building Your Own Lightsaber
phodgson
104
6.2k
Navigating Team Friction
lara
183
15k
Fireside Chat
paigeccino
35
3.2k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Statistics for Hackers
jakevdp
797
220k
Transcript
Infrastructure as Ruby Code Augusto Becciu
Who am I? • @abecciu {github, twitter} • Hacker •
Startups guy • Cur: CTO at • Prev: Dev / Ops Engineer at
Who are you?
Traditional Sysadmin • Manual (mostly) • Lack of process •
Bunch of shell and perl scripts • Fear of change • Monolithic architectures • Durable bare metal hardware • Vertical scalability
None
The Cloud Computing Evolution • Service Oriented Architectures • Horizontal
Scalability • Transition to virtualized ephemeral resources • Instant provisioning • OMG APIs !!!
Infrastructure as code Apply software engineering practices to systems administration
and operation.
Infrastructure as code • Automation • Repeatability • Agility •
Scalability Apply software engineering practices to systems administration and operation.
“Enable the reconstruction of the business from nothing but a
source code repository, an application data backup, and bare metal resources” Jesse Robins describes the goal brilliantly:
Hello Chef • Configuration management • Systems integration • Idempotence
• Declarative and imperative • Ruby everywhere
None
Let’s deploy RubyConfAR’s website!
We need to... • Install packages • Create directories •
Create users • Get the code • Install gems • Run migrations • Run the app server
None
None
None
None
None
None
None
Recipe
Attributes
Recipe
None
None
None
None
None
None
Syntax Check $ knife cookbook test rubyconfar
Static Analysis $ gem install foodcritic $ foodcritic rubyconfar http://acrmp.github.com/foodcritic/
Unit Testing $ gem install rspec $ gem install chefspec
$ rspec --color rubyconfar https://github.com/acrmp/chefspec https://github.com/acrmp/chefspec
Unit Testing
Integration Testing $ gem install minitest-chef-handler https://github.com/calavera/minitest-chef-handler https://github.com/btm/minitest-handler-cookbook
Integration Testing
Acceptance Testing $ gem install cucumber-nagios $ cucumber-nagios-gen project rubyconfar
$ cd rubyconfar $ ./bin/cucumber-nagios features/ http://auxesis.github.com/cucumber-nagios/
Acceptance Testing
None
Cloud Provisioning
Vagrant http://vagrantup.com/
Vagrant
Vagrant $ vagrant box add precise64 http://files.vagrantup.com/precise64.box $ vagrant up
$ vagrant provision $ vagrant destroy
$ gem install knife-ec2 $ knife ec2 server create -I
ami-2e845d33 -f t1.micro -r ‘recipe[rubyconfar]’ $ knife ec2 server delete instance_id
The Ruby cloud services library http://fog.io
None
Automate ALL the things!
Build your own awesome tools, it’s easy! + + gli
Net::SSH + http://net-ssh.rubyforge.org/ http://davetron5000.github.com/gli/
Thanks! is hiring! http://restorando.com/joinus