Continuing on from my previous article, here I will walk you through getting your blog installed on the Red Hat® OpenShift PAAS platform platform.


  • Ruby 1.8.7 or higher
  • Git
  • OpenShift RHC Tools

OpenShift Client Tools

In order to get started with OpenShift first follow the instructions for installing their client tools here: OpenShift Client Tools. You'll need these to interact with their platform.

The instructions provide examples for a number of various platforms.

If you prefer, you can watch the short installation video. The video below is the Mac OSX version.

Installing RHC tools on Mac OSX

Ruby, Git and RHC

If you have followed the instructions above correctly, you should now have Ruby, Git and the OpenShift RHC client installed.

To test you have Ruby installed run the following command:

$ ruby -e 'puts "Welcome to Ruby"'

If there is no output or an error you need to install Ruby but I doubt it if you're following this on a Mac.

You also need ot have Git installed again use the following command to test your Git installation:

$ git --version

Once all is in place you can then install the OpenShift client:

$ sudo gem install rhc

First time setup

If this is the first time you have setup this up you then need to run the following command, follow the prompts and chose the relevant options.

$ rhc setup

This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed.

I just hit Enter to use the server for OpenShift Online:

Successful installation

If your installation was successful you should see the following

Saving configuration to /Users/Niall/.openshift/express.conf

Created: /Users/Niall/.ssh/

You are using 0 of 3 total gears  
  The following gear sizes are available to you: small

Your client tools are now configured.  

Setting up your application (Gear)

Now that you have the required tools in place you can now setup an instance of Ghost.

NOTE: Previously the instructions showed you how to get up-and-running with a local instance to become familiar with Ghost. Here we will setup up your Production Ready codebase which will has everything preconfigured for deploying to the OpenShift platform.

OpenShift Ghost Quickstart

So to get started we're going to use the Quick Start guide here but with some additional notes:

Firstly create the application using the rhc command.

>rhc app create ghost nodejs-0.10 --env NODE_ENV=production --from-code

Next, so you can make modifications to your blog you'll want to clone a local copy of your remote repository. The URL for your application repository can be found in the application dashboard under "Source Code".

>git clone ssh:[email protected]/~/git/nodejs.git/
>cd nodejs/

This will create a folder with the source code of your application.

After making a change, add, commit, and push your changes.

>git add .
>git commit -m 'My changes'
>git push

NOTE: When you push changes the OpenShift server will report back its status on deploying your code.

The server will run any of your configured deploy hooks and then restart the application.

Coming up next...

Next I will walk you through the process of customising your domain name. I'll also discuss how to customise your blog in more detail.