Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Ruby Toolbox for DevOps
Richard Lee
December 08, 2012
Technology
22
860
Ruby Toolbox for DevOps
Presented at RubyConf Taiwan 2012.
Richard Lee
December 08, 2012
Tweet
Share
More Decks by Richard Lee
See All by Richard Lee
LIFF SDK 的開發者體驗與實用秘訣
dlackty
0
39
Account Kit after 1 year
dlackty
0
33
【Modern Web 2015】愛料理如何打造產品及技術團隊
dlackty
0
23
Chef & Immutable Infrasturcture
dlackty
7
370
Ruby & Friends - Taking Go as an example
dlackty
3
280
軟體上線之後的營運管理
dlackty
8
520
Using CocoaPods for Objective-C Library Management
dlackty
1
180
Does OpsWorks work?
dlackty
10
350
打造愛料理開發及營運團隊
dlackty
79
7.3k
Other Decks in Technology
See All in Technology
SBOMを利用したソフトウェアサプライチェーンの保護
masahiro331
0
150
#awsbasics [LT] サーバレスECにおける Step Functions の使い方
miu_crescent
0
810
Trusted Web プロトタイプ
finengine
0
310
AWSを始める人に向けた7つの大切なこと / 7 tips for AWS beginners
hiranofumio
1
610
金融スタートアップの上場準備で大事にしたマインドセット / 2022-08-04-the-mindset-in-preparing-for-ipo
stajima
0
290
ログ集約基盤をCloudWatchからOpenSearchに変えてみた
yuhta28
0
130
Sysdig Secure/Falcoの活用術! ~Kubernetes基盤の脅威モデリングとランタイムセキュリティの強化~
owlinux1000
0
180
EC/CRMの自社サービス開発をマネジメントするようになって1年でやってきたこととこれから / devio2022-takano-sho-road-to-good-development-team-management
masaru_b_cl
0
350
〇〇みたいな検索作ってと言われたときに考えること / thinking before developing search system like that one
ryook
4
2.6k
ログラスを支える技術的投資の仕組み / loglass-technical-investment
urmot
7
1.6k
もうつまらないとは言わせない!「わかりやすい」プレゼンを作るために気をつけたいこと
torisoup
4
1.3k
Djangoで組織とユーザーの権限管理をやってみよう #devio2022
seiichi1101
0
330
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
16
8.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
349
27k
The MySQL Ecosystem @ GitHub 2015
samlambert
239
11k
Testing 201, or: Great Expectations
jmmastey
21
5.5k
A Tale of Four Properties
chriscoyier
149
21k
Embracing the Ebb and Flow
colly
73
3.4k
In The Pink: A Labor of Love
frogandcode
131
21k
The Brand Is Dead. Long Live the Brand.
mthomps
46
2.7k
Git: the NoSQL Database
bkeepers
PRO
415
59k
Music & Morning Musume
bryan
35
4.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
226
15k
Streamline your AJAX requests with AmplifyJS and jQuery
dougneiner
127
8.5k
Transcript
Ruby Toolbox for DevOps Richard Lee (@dlakty)
self.intro do |richard|
6.years.ago
5.years.ago
2.years.ago
2.years.ago
1.year.ago
end
None
Huh? A Recipe Sharing Website?
Huh? A Recipe Sharing Website? Social Network
Website Operation API Mobile Products
Website Recipe Content Management Social Features Q&A for Cook
Website Operation
Operation Server Infrastructure Monitoring Analysis
Website Operation Mobile Products
Mobile Products iPhone / iPad Android Mobile Web! > 50%
Traffic!
Website Operation API Mobile Products
API RESTFul JSON API Multi Device Authentication Push Notification
Website Operation API Mobile Products
DevOps
What?
Website Operation API Mobile Products Developer
Website Operation API Mobile Products Operator
Website Operation API Mobile Products DevOp
DevOps Learning tools / techniques of Helps Your Startup
Development Continuous Integration Server Provisioning Deployment Monitoring polydice.workflow do |w|
Code Actually nothing special here. Current stack: Rails 3.2 Ruby
1.9.3 RSpec Redis MySQL memcached
Continuous Integration
Continuous Testing Document generation Code quality testing Deploy and more!
So, give me a Ruby CI Server!
Travis CI is not currently a good fit for closed
in-house installations
Do you really know what a CI server usually do?
Continuous Testing Document generation Code quality testing Deploy and more!
Not black magic Write your rake tasks!
CI Server Received push hooks Run some scripts Send notifications
& Show reports
Jenkins Everywhere
Janky for Help! A Sinatra app as JSON bridge Built
on Jenkins Controlled by Hubot Designed for / by GitHub
None
None
Tips: Your every project needs a scripts folder
scripts/ bootstrap cibuild
Sever Provisioning
chef + vargrant = awesome!
Why this is important? I can do that manually!
None
Save your time for fixing up problems.
Machines in Chef Client Node API client for provisioning and
management. Your any controlled servers.
Objects in Chef Cookbook Data bag Certain steps to install
/ configure resources on nodes Data storages for cookbook to configure resources. (Encrypted / Unencrypted)
Our Cookbook For Capistrano
Role The bridge between cookbooks & node. Define a run
list for node. Some example: Web role’s run list :[“nginx”, “rails”] Database role’s run list :[“mysql”]
Our Base Role
Provisioning EC2
Why ?
Chef v.s. Puppet Basically the same thing / idea Puppet
uses customized DSL for cookbook Chef just uses Ruby
Vagrant VirtualBox VM from command line Integration with Chef /
Puppet
Vagrantfile Configure which roles to run. Then, > vagrant up
Deployment
We use No surprise, right?
Lots of tweaks Git-based deployment Speed up Campfire notification
Git-based deployment
Campfire notification
Lots of details. Ask me if you’re interested.
Monitoring
Unit test => Developer Monitoring => Operator
god lograge
god Process monitoring Restart process for certain conditions Really important
for unicorn Integrated with Capistrano
Super easy Configuration
lograge Turn your multiline logs into one line Dec 08
13:18:11 web1 rails: method=GET path=/recipes/14628 format=html controller=recipes action=show status=200.00 duration=296.24 view=177.28 db=96.89 redis=1.38 tire=0.00 ip=111.250.xxx.xxx referer=http://icook.tw/ recipes/fulltext_search?query=%E7%B3%96%E9%86%8B%E6%8E%92%E9%AA%A8 Good for grep & analysis
lograge custom options Add as much things for monitoring as
possible!
Conclusion
Ruby is expressive.
Tons of DSLs for solving different problems.
Make developers happy.
Make operators happy.
Make your customers happy. boss investors
None
Email: dlackty@gmail.com Twitter & GitHub & App.net: @dlackty Thank You!
We’re hiring!
Q & A?