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
ある日突然あなたが管理しているサーバーにDDoSが来たらどうなるでしょう?知ってるようで何も知らなかったDDoS攻撃と対策 #phpcon.2024
akase244
2
7.7k
ErdMap: Thinking about a map for Rails applications
makicamel
1
550
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1k
Flatt Security XSS Challenge 解答・解説
flatt_security
0
710
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
12
2.1k
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
6
700
DMMオンラインサロンアプリのSwift化
hayatan
0
160
知られざるDMMデータエンジニアの生態 〜かつてツチノコと呼ばれし者〜
takaha4k
0
120
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
580
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
580
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
180
Featured
See All Featured
The Cost Of JavaScript in 2023
addyosmani
46
7.2k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Gamification - CAS2011
davidbonilla
80
5.1k
KATA
mclloyd
29
14k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Rails Girls Zürich Keynote
gr2m
94
13k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
3
170
Code Reviewing Like a Champion
maltzj
521
39k
Docker and Python
trallard
43
3.2k
jQuery: Nuts, Bolts and Bling
dougneiner
62
7.6k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
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