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
CSC509 Lecture 12
javiergs
PRO
0
140
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
What’s New in Compose Multiplatform - A Live Tour (droidcon London 2024)
zsmb
1
450
PLoP 2024: The evolution of the microservice architecture pattern language
cer
PRO
0
2.4k
イベント駆動で成長して委員会
happymana
1
270
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
270
外部システム連携先が10を超えるシステムでのアーキテクチャ設計・実装事例
kiwasaki
1
280
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.1k
Click-free releases & the making of a CLI app
oheyadam
2
100
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
340
From Subtype Polymorphism To Typeclass-based Ad hoc Polymorphism- An Example
philipschwarz
PRO
0
190
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
500
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
43
6.8k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
400
Why Our Code Smells
bkeepers
PRO
334
57k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
42
2.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Practical Orchestrator
shlominoach
186
10k
The Language of Interfaces
destraynor
154
24k
Writing Fast Ruby
sferik
627
61k
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