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
A Pragmatic Approach to Rails Deployments and Operations
Search
technicalpickles
May 28, 2012
Technology
2
420
A Pragmatic Approach to Rails Deployments and Operations
Lessons learned from deploying and managing hundreds of Rails applications
technicalpickles
May 28, 2012
Tweet
Share
Other Decks in Technology
See All in Technology
How to do well in consulting–Balkan Ruby 2024
irinanazarova
0
120
地理空間データ可視化・解析・活用ソリューション Pacific Spatial Solutions (PSS)
pacificspatialsolutions
0
330
MixIT 2024 - Pulumi : Gérer son infra avec son langage de programmation préféré
ju_hnny5
1
120
生成AIの変革の時代に、直近1年で直面した課題とその解決策
ktc_wada
0
510
Building Dashboards as a Hobby
egmc
0
360
今年のRubyKaigiはProfiler Year🤘
osyoyu
0
320
家族アルバム みてねにおけるGrafana活用術 / Grafana Meetup Japan Vol.1 LT
isaoshimizu
1
910
【NW X Security JAWS#3】L3-4:AWS環境のIPv6移行に向けて知っておきたいこと
shotashiratori
1
610
競技としてのKaggle、役に立つKaggle
yu4u
6
2.3k
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
150
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
7
1.3k
Grafana x PagerDuty Better Together
jacopen
1
250
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
65
14k
Typedesign – Prime Four
hannesfritz
36
2.1k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
4 Signs Your Business is Dying
shpigford
176
21k
Raft: Consensus for Rubyists
vanstee
133
6.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Fantastic passwords and where to find them - at NoRuKo
philnash
38
2.5k
How STYLIGHT went responsive
nonsquared
92
4.8k
Fireside Chat
paigeccino
22
2.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
13
8.3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
19
6.9k
Transcript
Lessons learned from deploying and managing hundreds of Rails applications
A Pragmatic Approach to Rails Deployments and Operations Monday, May 28, 12
Lessons learned from deploying and managing hundreds of Rails applications
Rails Deployments and Operations Monday, May 28, 12
o hai, im josh Monday, May 28, 12
•@techpickles •http://github.com/technicalpickles •http://technicalpickles.com Monday, May 28, 12
Monday, May 28, 12
Awesomeness Engineer of Supreme Versatility III Monday, May 28, 12
Managed hosting and operations Monday, May 28, 12
I’m talking about Rails Operations Monday, May 28, 12
WTF is Rails Operations? Monday, May 28, 12
Development and maintenance of a production Rails application Monday, May
28, 12
Before we dig in too deep... Monday, May 28, 12
Monday, May 28, 12
Does development generate revenue? Question Monday, May 28, 12
Monday, May 28, 12
•Takes place on laptops, desktop machines, staging servers Monday, May
28, 12
•Takes place on laptops, desktop machines, staging servers •No real
users Monday, May 28, 12
•Takes place on laptops, desktop machines, staging servers •No real
users •Unknown if it truly works Monday, May 28, 12
•Takes place on laptops, desktop machines, staging servers •No real
users •Unknown if it truly works •Tests are green, but... Monday, May 28, 12
Monday, May 28, 12
•Step 1: Development Monday, May 28, 12
•Step 1: Development •Step 2: Operations Monday, May 28, 12
•Step 1: Development •Step 2: Operations •Step 3: ...... Monday,
May 28, 12
•Step 1: Development •Step 2: Operations •Step 3: ...... •Step
4: PROFIT! Monday, May 28, 12
NO Monday, May 28, 12
but it CREATES potential revenue Monday, May 28, 12
Monday, May 28, 12
•Step 1: Development Monday, May 28, 12
•Step 1: Development •Step 2: ....... Monday, May 28, 12
•Step 1: Development •Step 2: ....... •Step 3: PROFIT Monday,
May 28, 12
Does operations generate revenue? Question Monday, May 28, 12
Monday, May 28, 12
•Lives on servers located in data centers and clouds Monday,
May 28, 12
•Lives on servers located in data centers and clouds •Real
users Monday, May 28, 12
•Lives on servers located in data centers and clouds •Real
users •Either code works, or it doesn’t Monday, May 28, 12
•Lives on servers located in data centers and clouds •Real
users •Either code works, or it doesn’t •Either the application is available or not Monday, May 28, 12
NO Monday, May 28, 12
but it PRESERVES potential revenue Monday, May 28, 12
Uh, what generates revenue? Question Monday, May 28, 12
Million Dollar Question Monday, May 28, 12
Monday, May 28, 12
•Working features (or at least that work enough) Monday, May
28, 12
•Working features (or at least that work enough) •Infrastructure to
keep the application up and running (or at least up enough) Monday, May 28, 12
•Working features (or at least that work enough) •Infrastructure to
keep the application up and running (or at least up enough) •A business model that works (or at least works enough) Monday, May 28, 12
•Working features (or at least that work enough) •Infrastructure to
keep the application up and running (or at least up enough) •A business model that works (or at least works enough) •??????????????????????? Monday, May 28, 12
Lessons learned Monday, May 28, 12
Common threads Monday, May 28, 12
Monday, May 28, 12
Monday, May 28, 12
Monday, May 28, 12
Pattern Configuration Management Monday, May 28, 12
duh. It’s about managing configuration. Monday, May 28, 12
You write code that manages your servers’ configuration Monday, May
28, 12
Monday, May 28, 12
•apache package is installed Monday, May 28, 12
•apache package is installed •apache service is running Monday, May
28, 12
•apache package is installed •apache service is running •deploy user
exists Monday, May 28, 12
•apache package is installed •apache service is running •deploy user
exists •cron jobs Monday, May 28, 12
•apache package is installed •apache service is running •deploy user
exists •cron jobs •etc Monday, May 28, 12
•Puppet •Chef •Moonshine Monday, May 28, 12
Automation Monday, May 28, 12
Monday, May 28, 12
Monday, May 28, 12
Pattern Staging Environments Monday, May 28, 12
Preproduction servers Monday, May 28, 12
Gives you a place to ensure correctness of deploy Monday,
May 28, 12
configuration management + staging servers = VERY YES Monday, May
28, 12
Monday, May 28, 12
Monday, May 28, 12
Repeat after me Monday, May 28, 12
Repeat after me • development Monday, May 28, 12
Repeat after me • development • staging Monday, May 28,
12
Repeat after me • development • staging • production Monday,
May 28, 12
capistrano-gitflow Monday, May 28, 12
Pattern Deploy early, deploy often Monday, May 28, 12
Although technically, I guess it’s the same A play on
release early, release often. Monday, May 28, 12
Monday, May 28, 12
Monday, May 28, 12
Antipattern Feeling Driven Development Monday, May 28, 12
Monday, May 28, 12
The front page feels slow Monday, May 28, 12
The primary key seems like it’s increasing rapidly Monday, May
28, 12
IO seems high Monday, May 28, 12
What does it even mean? Monday, May 28, 12
Counterpattern Science Driven Development Monday, May 28, 12
Monday, May 28, 12
Metrics everywhere! Monday, May 28, 12
•New Relic - http://newrelic.com •Scout - http://scoutapp.com Monday, May 28,
12
The front page is taking 10 seconds to load, but
we really need it to be loading in under 1 second The front page feels slow Monday, May 28, 12
The primary key is at 90% of it’s maximum, up
from 80% yesterday, and looks like it’ll run out overnight. The primary key seems like it’s increasing rapidly Monday, May 28, 12
IO fluctuates up to 90% sometimes, but doesn’t appear to
have a negative effect IO seems high Monday, May 28, 12
Monday, May 28, 12
Topic Monitoring Monday, May 28, 12
How do you know when everything is awful? Monday, May
28, 12
How would you prefer to know? Monday, May 28, 12
How would you prefer to know? •A late night phone
call? Monday, May 28, 12
How would you prefer to know? •A late night phone
call? •Angry tweets that you are down? Monday, May 28, 12
How would you prefer to know? •A late night phone
call? •Angry tweets that you are down? •You personally checking everything all the time? Monday, May 28, 12
How would you prefer to know? •A late night phone
call? •Angry tweets that you are down? •You personally checking everything all the time? •An automated system to let you know? Monday, May 28, 12
•Nagios •Scout •New Relic •Pingdom Monday, May 28, 12
What to monitor Monday, May 28, 12
Define urgency Monday, May 28, 12
Must be actionable Monday, May 28, 12
Single point of contact Monday, May 28, 12
Monday, May 28, 12
Pattern Vertical scaling Monday, May 28, 12
Now what? Your app is slow Monday, May 28, 12
Monday, May 28, 12
Resources are (relatively) cheap Monday, May 28, 12
Developers are (relatively) expensive Monday, May 28, 12
Monday, May 28, 12
Monday, May 28, 12
Antipattern Hipster Stack Monday, May 28, 12
Monday, May 28, 12
“I read a blog post about how mongo is totally
web scale” Monday, May 28, 12
Cargo cult operations Monday, May 28, 12
Monday, May 28, 12
Monday, May 28, 12
Monday, May 28, 12
If you’re still going to go hipster... •experiment in branches
•understand operational impact •Staging! Monday, May 28, 12
.... wait, what? Test in production Monday, May 28, 12
Fin. Monday, May 28, 12
Further Reading •Web Operations - John Allspaw and Jesse Robins
•Continuous Delivery - Jez Humble and David Farley •“Web Operations for Developers 101” Monday, May 28, 12
find me here
[email protected]
@techpickles Want to talk ops? Monday,
May 28, 12