How to Install the New and Improved OpenShift Client Tools for Windows

Using a PaaS in the cloud just got a whole lot easier for Microsoft Windows Users.  OpenShift is happy to announce that we now have a streamlined install and configuration process for users of Windows that does not require Cygwin.

OpenShift is Red Hat's free, Cloud Application Platform as a Service (PaaS). As an application platform in the cloud, OpenShift manages the stack so you can focus on your code.  And best of all, OpenShift is free to use and try out.  On the free tier, each user is able to create three applications with 512mb of RAM and 1GB of disk space.  You can also add a database to your application such as MongoDB, MySQL, or PostgreSQL.  If you are ready to try out OpenShift, head on over to sign up for free.

What are you waiting for?  Let’s get started with using OpenShift on Windows.

Note:  If you want to watch a screencast of the install and configuration, check out this video.

Step 1:  Ensure you have the proper permissions

You must have access and permission to install new software on your system.  Depending on how your system is configured, you may need to disable User Account Control (UAC) or have the permission to accept new software installation.

 

Step 2:  Install the Ruby environment on your system

The OpenShift client tools are written in the Ruby programming language.  In order to execute and use the commands, you must have the appropriate runtime environment for your operating system.  We suggest that you use the RubyInstaller from rubyinstaller.org in order to ensure you have the correct packages to interact with OpenShift.

Point your browser to rubyinstall.org and click the red download button on the left side of the screen.

 

 

Download the latest version and select Run from the dialog choices.

 

 

Once the installation has started, you will be requested to accept the license agreement that is presented to you.  Review the license and click accept if you agree to the stated terms.

 

 

We will be interacting with OpenShift via the command line during this blog so ensure that you select ‘Add Ruby executables to your PATH’.  This will ensure that you can access the ruby and gem commands from your windows command prompt.

 

Step 3: Install the Git revision control software on your system

In order to deploy and push your application code up to your OpenShift servers, you will need to have the Git revision control system installed and accessible on your system.  To install this software, download the latest package from http://msysgit.github.com/ and follow the instructions.

 

As we did with Ruby above, we want Git to be available to us on the command line.  Select ‘Run Git from the Windows Command Prompt’ and click next.

On the next screen, make sure that ‘Checkout Windows-style, commit Unix-style line endings’ is checked and click next.

 

 

Step 4: Install the RHC command line tools

Now that we have Ruby and Git installed, we are ready to start the installation of the OpenShift command line tools.  In order to do this, open up a command prompt by clicking the windows logo and type in cmd.

 

 

You should be sitting at a command prompt at this point.  All we need to do now is issue the following command:

C:> gem install rhc

This will download and install the client tools as well as any required dependencies for the package.

 

Step 5: Use the RHC command line tools

Now that you have the client tools installed, you can begin using them by using the following command to list all of your existing applications:

C:> rhc domain show

If this is the first time you have used the RHC tools on your machine, it will take you through a guided setup to create your SSH key and then upload it to the server.  Make sure that you have already signed up for an OpenShift account and created a namespace before using the rhc domain show command.

There's a handy cheatsheet you can print out that explains what the most common rhc commands do at the bottom of this post.

That’s all there is to it to get up and running using the OpenShift client tools on Microsoft Windows. See you on the Cloud!