Screencast - Deploying - 1

This is the first in a series of screencasts that will show you how to deploy a Rails app to a remote server.

The screencast below was recorded with a screen size of 1024×768; let me know if you need something smaller. Also tell me if there are any issues with audio, etc. I recorded this screencast on Windows because I like the BB Flashback screencast software.

The first screencast is about paying for and starting up a Linux system. If you wanted to follow along, you would need to perform the following steps:

  1. Register a domain (something like . . . metricsmine.com). You can do this at the websites of countless companies. I use godaddy.com for no especially good reason.
  2. Then you will need to find a company that will host your site. There are many options. In the screencast I’m going to create a VPS (Virtual Private Server) at slicehost.com. From the point of view of a user of a VPS, it looks like a real computer you can boot, reboot, install system software, create users, etc. I.e., you control almost all aspects of the system. These VPS vendors typically use virtualization software such as Xen. There are other options for hosting: You could use shared hosting from a service such as textdrive.com (this is where my personal blog lives), or more robust virtualization such as provided by Amazon. The VPS option is cheap (starts at $20/month or less), and gives you a lot of control.
  3. Once the system is established, I log into it as “root” with the “ssh” program. This is on all Mac OS and Linux systems. For Windows, you might install http://www.cygwin.com/, which has ssh, or you might use a program such as putty.
  4. Next we want to change the DNS settings, typically managed by the people with whom you registered your domain, so that the name you picked points to the new numeric IP address at your VPS.
  5. Finally, we install Apache (web server), and make a request to it over the Internet with our browser. In a later screencast, I’ll demonstrate setting up Ruby, Rails, and a few other things, including mod_rails (aka Passenger) which is a plugin for Apache so that your server can run Rails apps.

I should add that there are countless arguments for other ways to do this. Someone will likely tell you that you should prefer CentOS to Ubuntu; someone else may not like Slicehost; let another person will excoriate GoDaddy. You may hear someone claim that you have to manage your own DNS. I’ve used many different providers for all of these services, and you may find that you have to try different vendors before you have a combination that works for you. This is what works for me for getting small projects to a point where I can easily show them to others for relatively small dollars.



blog comments powered by Disqus