Skip to content

Deploying on OpenShift

vra5107 edited this page Oct 6, 2012 · 3 revisions
  • Create an account with Openshift.
  • Install rhc gem using the following command.
sudo gem install rhc
  • Complete rhc setup using the OpenShift's get-started page.
  • Log into your OpenShift account and create an application using the web interface.
    • This will create a git repo on openshift.
    • Once application creation is completed a git repo link is provided.
  • Clone the repo to your local workstation using link provided. Url looks something like this.
ssh://54038126c5ca47f5aa549052cc11cd8d@${app-name}-${namespace}.rhcloud.com/~/git/${app-name}.git/
  • Let's say you have cloned it to $HOME/projects/app
$ cd app

$ mv config.ru config.ru.orig

$ cd ..

$ ramaze create app

$ cp $HOME/app/* $HOME/projects/app/ 

$ cd $HOME/projects/app
  • Openshift uses bundler to manage dependencies. Install bundler using
$ sudo gem install bundler
  • Create a Gemfile and Gemfile.lock
  • Add the following entries to Gemfile
gem 'ramaze', '2012.04.14'
gem 'sequel', '3.40.0'
gem 'pg', '0.14.1'
  • Run bundle install. This will update Gemfile.lock file with dependencies.
  • Add all the files to git, commit and push.
  • What's great about Openshift is for every push, it stops the server, builds, redepoys application and starts the server.
  • Now go to the application link provided on your application creation page, you should see the Welcome to Ramaze Page.
Clone this wiki locally