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
Deploying Rails apps with Capistrano
Search
Bruno Sutic
October 01, 2014
Technology
0
84
Deploying Rails apps with Capistrano
Bruno Sutic
October 01, 2014
Tweet
Share
More Decks by Bruno Sutic
See All by Bruno Sutic
Readline + irb/pry = <3
brunosutic
0
120
Moreutils
brunosutic
0
45
The venerable "expect"
brunosutic
0
56
Capistrano vs Mina: Capistrano demo talk
brunosutic
0
440
Configuring tmux
brunosutic
0
74
Introduction to Arel
brunosutic
1
220
Tmux osnove
brunosutic
0
170
Other Decks in Technology
See All in Technology
社会人力と研究力ー博士号をキャリアの武器にするー
kentaro
2
110
10ヶ月かけてstyled-components v4からv5にアップデートした話
uhyo
5
460
白金鉱業Meetup_Vol.18_生成AIはデータサイエンティストを代替するのか?
brainpadpr
4
240
Новые мапы в Go. Вова Марунин, Clatch, МТС
lamodatech
0
1.9k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
7
63k
Dataverseの検索列について
miyakemito
1
180
GraphQLを活用したリアーキテクチャに対応するSLI/Oの再設計
coconala_engineer
0
200
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
2
470
Serverlessだからこそコードと設計にはこだわろう
kenichirokimura
2
450
genspark_presentation.pdf
haruki_uiru
1
200
10分で学ぶ、RAGの仕組みと実践
supermarimobros
0
870
大規模サーバーレスプロジェクトのリアルな零れ話
maimyyym
3
150
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Git: the NoSQL Database
bkeepers
PRO
430
65k
The Invisible Side of Design
smashingmag
299
50k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
How to train your dragon (web standard)
notwaldorf
91
6k
Producing Creativity
orderedlist
PRO
344
40k
Making Projects Easy
brettharned
116
6.2k
Thoughts on Productivity
jonyablonski
69
4.6k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
4 Signs Your Business is Dying
shpigford
183
22k
Transcript
Deploying Rails apps with Capistrano +
About: Bruno Sutic, github.com/bruno-/ Rails & Javascript developer Ideal Project
Group, Chicago Worked on a Capistrano plugins: github.com/capistrano-plugins/
Goals • motivate Rails devs to try Capistrano • make
Capistrano vs Heroku comparison • demo app deployment
What is Capistrano? • Capistrano is a deployment tool. It
gets the app running on the server. • Other deployment strategies: - manual (zip + ftp) - Mina - Heroku - Engine Yard - Docker - Chef, Puppet…
Heroku PROS • Free! • Really simple • Single click
add-ons CONS • Paid plans are expensive • Closed (and expensive) add-on ecosystem • Technical lock-in
Heroku is great, but expensive. Capistrano is the alternative.
What is Capistrano? • Ruby gem • built on top
of ssh and Rake (think tasks) • mature and battle tested v1.1.0 in March 2006 • scalable • technology agnostic: used for deploying apps in Ruby, PHP + other
What Capistrano is *not*? • server installation / provisioning tool
think: `apt-get install nginx` • server configuration tool think: updating IPtables • Chef, Puppet, Ansible are better for these tasks
How does it work? • built on top of `ssh`
$ ssh my_server “echo ‘foo’” $ scp some_file.txt my_server:/dir/
How does it work? $ ssh my_server “git clone github.com/myapp”
$ ssh my_server “service nginx restart” 2) git clone myapp 1) ssh my_server Dev machine Server Git repo (Github)
Capistrano downsides • more work (than i.e. Heroku) • requires
learning • capistrano itself • dev ops: server installation, configuration, hardening • familiarity with ssh
Quiz
Capistrano vs Heroku quiz Situation: • Ruby on Rails beginner
• Created first app for practice How do you deploy?
Capistrano vs Heroku quiz Situation: • Rails dev team •
Long term customer • Big app, will need scaling How do you deploy?
Capistrano vs Heroku quiz Situation: • Experienced Rails dev •
Small app built over the weekend How do you deploy? Both are fine! (it depends )
Demo time
Capistrano demo STEPS 1. make a Rails app ✅ 2.
buy & setup a server ✅ 3. setup Capistrano 4. deploy STACK • Nginx • Unicorn • PostgreSQL
Next steps • www.capistranorb.com • capistrano github • https://gist.github.com/bruno-/9808201