Unicorn+Nginx on Red Hat OpenShift

Although I’m completely buried in personal projects right now (cartridges for Ruby 1.9 and Unicorn+Nginx included), I wanted to share my experience of setting up Unicorn and Nginx on OpenShift for anyone who’s interested. This won’t be a massively in-depth post as the setup is actually quite simple if you’ve followed my previous post on Ruby hacking on OpenShift.

I’ve posted a quick README/HowTo on GitHub here which goes into more detail about how to get it set up. This is really just a quick fix for anyone who’s looking to use this combo as their server setup on OpenShift until I can finish my cartridge and send it off to the lovely people at Red Hat.

Good luck – if you have any problems, contact me via Twitter: @xiy

2 thoughts on “Unicorn+Nginx on Red Hat OpenShift

  1. Working on this but it is going slow may just wait for a cartridge

    I have rvm etc working but can’t start nginx message from; rhc-ctl-app -a lawbrooke -c start

    Using /var/lib/stickshift/503cd2d867ce438b89fd418d45719767/app-root/data//.rvm/gems/ruby-1.9.3-p125 with gemset lawbrooke
    /var/lib/stickshift/503cd2d867ce438b89fd418d45719767/app-root/data//.rvm/scripts/cd: line 45: cd: /var/lib/stickshift/503cd2d867ce438b89fd418d45719767/app-root/runtime/repo//lawbrooke: No such file or directory
    nginx: [emerg] too long parameter “#<Enumerat…" started in /var/lib/stickshift/503cd2d867ce438b89fd418d45719767/app-root/data//nginx/conf/nginx.conf:1
    Could not locate Gemfile
    Failed to start /var/lib/stickshift/503cd2d867ce438b89fd418d45719767/diy-0.1/lawbrooke_ctl.sh
    Cartridge return code: 121

    Exit Code: 1
    api_c: ["placeholder"]
    broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"]
    API version: 1.1.3

    Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s