CoreOS Test Drive

Vagrant setup

If you follow the CoreOS documentation and try to get a Vagrant cluster up and running the etcd cluster is not created by default.

After cloning the Vagrant CoreOS repo, cd into the cluster folder and run vagrant up. This will start 3 core-os clusters numbered core-01 to core-03. You can ssh into them by running vagrant ssh core-01

In my case the IP addresses of those coreos clusters are:

  • core-01: 192.168.65.2
  • core-02: 192.168.65.3
  • core-03: 192.168.65.4

Continue reading

Setting up simple OmniAuth authentication with Facebook

If you have watched Ryan Bates’ tutorial Simple OmniAuth you probably already know OmniAuth is awesome. :) Ryan doesn’t go into details about setting up OmniAuth with Facebook so this post has a couple of pointers to help out in that regard. It’s meant as a continuation to the screencast, so if you haven’t seen it start there.

Continue reading

Configuring Nginx and Unicorn

I first heard about Unicorn in an interview with 37Signal’s server admin Mark Imbriaco and it made me really curious. There are a few great resources explaining how Unicorn works and a neat benchmark comparing Mongrel, Passenger and Unicorn. I will share my experience playing with Nginx and Unicorn on a Debian Lenny box.

Continue reading

Handling paperclip attachments with the same name

This quick post is about some Paperclip-related code that I see quite frequently that could cause problems. It’s easy to miss this stuff in development and then get major headaches later.

Continue reading

Setting up a High Availability Ruby on Rails environment with keepalived, nginx, HA Proxy and Thin on Debian Lenny

Contents

  • Configure Keepalived and Nginx
  • Configure HA Proxy
  • Configure Thin

Overview

Nginx and HA Proxy have similar functions: they can both be used as reverse proxies and load balancers. In our case Nginx will be the reverse proxy and HA Proxy will be the load balancer. Nginx is great for dealing with SSL encryption, gzip compression or talking to a cache server (Varnish, memcached).

Continue reading