Intercity is our upcoming server management application for Ruby on Rails teams. In this post I wanted to give you a short summary on what some of the features will be and give you a hint at the underlying mechanics that make everything work.
Installing your servers for Ruby on Rails
Now, the most important part of Intercity is that it can install and configure your VPS to run Ruby on Rails apps. An ip-address, a clean Ubuntu installation and a user with sudo / root access is all you need to start using Intercity with your server.
Most virtual private server companies will set up a clean Ubuntu installation or offer you to install it manually. This means Intercity works with most (if not all) VPS vendors.
Now, how do we set up your server?
A Rails configuration from community best practices
The Rails setup that we install on your servers is commonly used by developers in our community. We’ve bundled up all those best practices so you can use them on your own server.
The software that we install is as follows:
- nginx webserver
- unicorn for running the Rails application with rolling restarts
- MySQL server
- Deploy your apps using Capistrano
Making sure you sleep at night while your server happily hums into the night
I usually have two concerns when “manually” managing a server:
The first is of course: what if it crashes, something loses data, the hosting company quits, someone
TRUNCATE‘s the database, etc. This is a manner of just making backups. But, making backups is not that easy. There’s all these things you need to worry about like what you’re going to backup, where you’re going to place it, are you going to be able to restore a backup in a manner of minutes, etc. Intercity will help you with a great backup strategy.
The second is a bit more subtle, but maybe as important as backups: you want to know if you’re server is still ok. This means you want frequent health checks in terms of memory, harddisk space, traffic to name a few. Now we’re not going to re-invent nagios but we are going to offer you a few simple status pages and e-mail notifications that will keep you confident that your server is still okay, all the time.
How does it work?
There’s quite some stuff going on under the hood, but in summary, Intercity does the following things when setting up your server:
- Generate a specific SSH key and add it to your server so the Intercity dashboard is able to reach your server.
- Generates a set of secure passwords that will be used for MySQL and your application databases.
- Upload our chef recipes to your server and runs chef-solo to start the installation.
- The Chef recipes will install nginx, MySQL and desired ruby versions on your server.
- A directory structure for each of your Rails apps is generated so they can be deployed using Capistrano.
You can add and remove as many apps from each server as you’d like. Whenever you apply changes to your server, we re-run the chef recipes with the new configuration and your new apps will be added.
We want more
We’ll keep posting updates to this blog in the coming weeks. For more information, also check out the Intercity website at http://intercityup.com.