Monday, 30 July 2012

Installation steps Open-shift client tools

From the command line

If you'd like to use our powerful command line client, the steps below will get you installed and running in minutes.
The OpenShift client tools are packaged as a Ruby Gem. To run OpenShift on your platform, you'll need Ruby 1.8.7 or newer, the ability to install a gem (on Linux this will require root access), and the Git version control tool. More details are available about installing the client tools in the Developer Center.

1. Install the client tools

Fedora and Red Hat Enterprise Linux

  1. Install the OpenShift prerequisites via YUM
    $ sudo yum install rubygems git

    (RHEL 6.2 only) If you are using RHN Classic, you may need to add the RHEL 6.2 Optional Channel in order to install the 'rubygems' package.
    $ sudo rhn-channel --add --channel=rhel-x86_64-server-optional-6
  2. Install the gem:
    $ sudo gem install rhc

Other Linuxes

  1. Install the required packages: Ruby 1.8.7 or newer, rubygems, and git
  2. Install the gem:
    $ sudo gem install rhc



  1. From the Windows Command Prompt install the gem:
    $ gem install rhc



  1. Install the gem:
    $ sudo gem install rhc

To update to the latest version of the client tools, use the gem update command:
$ sudo gem update rhc

2. Setup your environment

Using your OpenShift login and password, run rhc setup to connect to OpenShift and create a unique namespace for your applications.
$ rhc setup

Starting Interactive Setup for OpenShift's command line interface

We'll help get you setup with just a couple of questions.

To connect to enter your OpenShift login (email or Red Hat login id):
The wizard will help you upload your SSH keys so you can communicate with Git, check to see if you are missing any required configuration, and then help you create a domain name. On OpenShift, domain names make up part of your app's url. They are also unique across all OpenShift users so choose wisely and be creative!

3. Create your first application

Now you can create an application.
$ rhc app create -a myapp -t php-5.3
Password: (type... type... type...)
This will create a remote git repository for your application, and clone it locally in your current directory.

4. Make a change, publish

Getting an application running is only the first step. Now you are on the road to making it your own. Here's an example for the php framework.
$ cd myapp
$ vim php/index.php
(Make a change...  :wq)
$ git commit -a -m "My first change"
$ git push
Use whichever IDE or editor works best for you. Chances are, it'll have git support. Even if it doesn't, you're just two simple commands away from glory!
Now, check your URL - your change will be live.

5. Next steps

While this has gotten you started, there is a lot more information out there to really get you going. Check out the following pages for videos, blogs, and tutorials:
Red Hat Open-shift Origin logical view (click to enlarge)
    Red Hat OpenShift Origin logical view

    No comments:

    Post a Comment