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
430
Other Decks in Programming
See All in Programming
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
Full stack testing :: basic to basic
up1
1
930
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
440
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
140
Zoneless Testing
rainerhahnekamp
0
120
第5回日本眼科AI学会総会_AIコンテスト_3位解法
neilsaw
0
170
わたしの星のままで一番星になる ~ 出産を機にSIerからEC事業会社に転職した話 ~
kimura_m_29
0
180
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
130
Итераторы в Go 1.23: зачем они нужны, как использовать, и насколько они быстрые?
lamodatech
0
700
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
350
선언형 UI에서의 상태관리
l2hyunwoo
0
140
CSC305 Lecture 25
javiergs
PRO
0
130
Featured
See All Featured
Docker and Python
trallard
42
3.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
The Invisible Side of Design
smashingmag
298
50k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
28
2.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Building an army of robots
kneath
302
44k
Faster Mobile Websites
deanohume
305
30k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
YesSQL, Process and Tooling at Scale
rocio
169
14k
How to Ace a Technical Interview
jacobian
276
23k
How STYLIGHT went responsive
nonsquared
95
5.2k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
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