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
1.3k
5
Share
Infrastructure as Ruby code
RubyConf Argentina 2012
Augusto Becciu
October 20, 2012
More Decks by Augusto Becciu
See All by Augusto Becciu
Building a Data Platform with Ruby glue
abecciu
0
480
Other Decks in Programming
See All in Programming
関係性から理解する"同一性"の型用語たち
pvcresin
2
630
Oxcを導入して開発体験が向上した話
yug1224
4
270
RTSPクライアントを自作してみた話
simotin13
0
420
Swiftのレキシカルスコープ管理
kntkymt
0
210
OSもどきOS
arkw
0
380
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
260
TypeScriptだけでAIエージェントを作る フロント・エージェント・インフラのフルスタック実践
har1101
6
1.2k
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
540
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
430
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
410
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.3k
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
170
Featured
See All Featured
Amusing Abliteration
ianozsvald
1
190
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
WENDY [Excerpt]
tessaabrams
11
38k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
The Curious Case for Waylosing
cassininazir
1
370
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
350
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
KATA
mclloyd
PRO
35
15k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
430
Rails Girls Zürich Keynote
gr2m
96
14k
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