Reliably Deploying Rails Applications

Reliably Deploying Rails Applications

Ben Dixon

Mastering Rails program deployment

This ebook will exhibit you from begin to end how to:

Setup a VPS from Scratch
Setup extra servers in minutes
Use Capistrano three to installation quick and reliably
Automate dull upkeep tasks

If you've obtained purposes on Heroku that are costing you a fortune, this may offer you the instruments you must circulation them onto a VPS. This contains working numerous Rails purposes on a unmarried VPS - nice for small part projects.

If you're already working your app on a VPS however the install approach is flaky - it occasionally doesn't restart or so much the incorrect model of the code - this publication presents a template for making the method trouble free.
Section 1: Chef

How to automate provisioning new servers with chef. through the tip you'll be capable to get a brand new server up and able to use inside of minutes.

Many typical Rails procedure configurations are supported out of the field with the instance code (MySQL, PostgreSQL, MongoDB and Redis). For the rest, specific directions for developing your individual customized configurations are supplied.

The goal of this part is to construct a re-usable blueprint you should use everytime you have to setup a brand new VPS.
Section 2: Capistrano 3

Using Capistrano three to automate each point of deployment, from updating code to dealing with resources and history workers.

Particular consciousness is paid to establishing 0 downtime deployment - crucial if you're iterating quickly and wish to installation numerous instances in step with day. This incorporates a part on universal gotchas akin to failing to reload the gemfile on deployment in addition to a close advisor to troubleshooting while it is going wrong.

I've spent countless numbers of hours combing via weblog posts, documentation and tweaking config records. This has acquired me to the degree the place deploying to a VPS is as effortless as - in reality usually more uncomplicated than - deploying to Heroku. with the intention to do an identical, this booklet will prevent loads of time.
Current of completion & Feedback

The first part - provisioning a server with chef - is entire, together with directions for PostgreSQL, MySQL and MongoDB. This contains a "Five minute VPS" quickstart part for the impatient.

The moment part - deploying with Capistrano three - is usually on hand and contains the entire info had to get 0 downtime deployments operating with Rails 3/4 and Unicorn. in addition to distinctive pattern code, it contains entire directions for deploying Sidekiq staff, a close part on Configuring 0 Downtime deployment and directions for configuring NGinx Virtualhosts and SSL

Over the following few months I'll be including extra chapters which cross into aspect on backups and database administration in addition to enhancing the e-book in response to the suggestions I've bought up to now (please hold this coming!). I'll additionally proceed so as to add extra chapters as and whilst I encounter new counsel and tricks.

Any suggestions on content material, constitution or corrections very gratefully bought, you may get me on twitter (@talkingquickly) or utilizing the leanpub talk about button below.

Show sample text content

Download sample