„Screw it! — Moving my Rails app to production takes more time than developing it!“
Your Rails application is the heart of your business. Built with utmost care, adhering to best practices and tested extensively. You trust your codebase and you can hardly await your first customers.
But before you can lean back and monitor your dashboard for incoming sales, there is an intermediate step you postponed for as long as possible: Moving your application from your development machine into the wild.
You already tried hosting your application with a PaaS like Heroku, EngineYard or Ninefold only to find out that they do not quite cut it for you:
- A PaaS is basically going to cost you twice to four times the amount of a VPS (depending on the number of simultaneous requests and whether you need background jobs) — but it will give you much less power. Throw in support for a handful of third-party services and you can easily spend hundreds per month for a single application.
- They make you worry about data integrity.With new leaks being exploited every other day, having your valuable customer data stored on someone else's server does not contribute to peaceful sleep. Neither does having to rely on someone else to apply the latest patch to a system library.
- They prevent you from becoming a better developer.No specific Ruby versions, no cutting-edge application servers, no exotic database — only what the service provides. This weakens your skills by completely shielding you from operations (a topic serious developers must not neglect) and prevents you from learning new marketable skills.
You are on a point where you have outgrown hosting with a PaaS and realize that running your own infrastructure is the way to go.
But there is a wealth of information to digest before you are even able to provision a Rails stack and a lot of questions need to be answered.
„Moving to production defeats Rails' agility in minutes.“
Imagine yourself having all the needed information to spin up a server from the ground up — without needing to hunt down every tiny drip of wisdom — plus a dedicated workflow to turn this information into a blueprint to apply to any bare naked machine:
- You spin up a Rails server in minutes.Setting up and configuring a Rails server requires a lot of steps, but you only have to worry about them once (when you build your server's blueprint which will make provisioning of every future machine a no-brainer — be it in your staging or production environment).
- You deploy your app with a single command.Worry-free deployments mean that you can push new releases as soon as they are ready. Not having to rely on some highly opinionated deployment tool means that you can tweak each of your applications' deployment process to be most efficient.
- You learn marketable skills no tool can replace.Rails is based on Rack — and so are many other great web frameworks. Why not use your knowledge to host and deploy your Sinatra/Hanami/Camping apps the same way?
You application development reaches a whole new level:
„There will no longer be a difference between running your app locally and serving it to your customers.“
The problem is gathering all the necessary knowledge, most of which is burried inside of half-assed blog posts and outdated tutorials. Finding and evaluating this information takes days, weeks or even months of trial-and-error — time you would rather spend on developing awesome products for your customers.
Unfortunately, up until 4 years ago there has not been a single resource providing you with distilled information on how to efficiently build your environment in such a way.
Then there was. And now it is back in its awesome third edition.