OpenShift Getting Started Guide

Installing OpenShift client tools on your computer Getting Started Guide

OpenShift Getting Started Guide Installing OpenShift client tools on your computer Edition 2.0.15

Copyright © 2012 Red Hat, Inc.

The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.

Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.

Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.

Linux® is the registered trademark of Linus Torvalds in the United States and other countries.

Java® is a registered trademark of Oracle and/or its affiliates.

XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.

All other trademarks are the property of their respective owners.

1801 Varsity Drive Raleigh, NC 27606-2072 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701

OpenShift is a free, auto-scaling, Platform as a Service (PaaS), providing the fastest and easiest on- ramp to the cloud. This document gets you started with OpenShift, and helps you install OpenShift client tools. Preface v 1. Getting Help ...... v 1.1. Do You Need Help? ...... v 1.2. We Need Feedback! ...... v 1. About OpenShift 1 1.1. Registering for an Account ...... 1 2. OpenShift Client Tools 3 2.1. Overview ...... 3 2.2. Installing Client Tools ...... 3 2.2.1. Installing on Windows ...... 3 2.2.2. Installing on Mac OS X ...... 7 2.2.3. Installing on Ubuntu and Debian ...... 9 2.2.4. Installing on openSUSE ...... 11 2.2.5. Installing on Fedora ...... 12 2.2.6. Installing on Red Hat Enterprise Linux ...... 14 2.3. Configuring Client Tools ...... 16 2.4. Where To Go From Here ...... 20 A. Revision History 21

iii iv Preface

1. Getting Help

1.1. Do You Need Help?

If you experience difficulty with a procedure or other information described in this documentation, visit the Red Hat Knowledgebase at http://kbase.redhat.com to search or browse through technical support articles about Red Hat products, or visit the Red Hat Customer Portal at http://access.redhat.com. You can also access the OpenShift web site at https://openshift.redhat.com/ to find blogs, FAQs, forums, and other sources of information.

Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/ listinfo. Click the name of any mailing list to subscribe to that list or to access the list archives.

1.2. We Need Feedback!

If you find a typographical or any other error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla: http:// bugzilla.redhat.com/ against the product OpenShift.

When submitting a bug report, be sure to mention the manual's identifier: Docs Getting Started Guide

If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily.

v vi Chapter 1.

About OpenShift OpenShift is a free, auto-scaling, Platform as a Service (PaaS) for Java, Ruby, PHP, Perl, and Python applications. It provides the fastest and easiest on-ramp to the cloud, adapting to the varying needs of your applications with built-in automatic scaling. OpenShift allows you to choose your languages, framework, middleware, and clouds.

With an OpenShift account you can create and deploy applications to the cloud quickly and easily. You can then use the intuitive web interface or the OpenShift client tools to manage your cloud environment.

This document will get you started with OpenShift, and help you install the client tools on your computer. In just a few easy steps you will be on your way to building your cloud environment:

• Step 1: Register and set up your OpenShift account.

• Step 2: Install OpenShift client tools on your computer.

• Step 3: Start building your cloud environment.

1.1. Registering for an Account The first step to getting started with OpenShift is to register and set up your account. This section describes how to register and set up your account on the OpenShift website.

Note

If you already have a redhat.com or RHN account, you can use your existing credentials to log on to OpenShift.

Ensure you have the following information available before you begin the registration process: • A valid e-mail address

• A password

Procedure 1.1. To register for an OpenShift account: 1. Navigate to the OpenShift1 website.

2. Click Sign up and try it to register for an account.

3. Enter your email address, password, and any promotional code that you may have.

4. Enter the two security words in the space provided. If you cannot read the security words, click Refresh to generate a new challenge.

5. Click Sign up for OpenShift. You will receive an email at your registered email address to confirm and complete the registration process.

That's it! You now have an OpenShift account. The next chapter describes how to install the OpenShift client tools on your computer.

1 2 Chapter 2.

OpenShift Client Tools

2.1. Overview After you have created an OpenShift account, you can immediately begin developing your cloud environment using the web interface. For more advanced users, however, OpenShift offers a comprehensive set of client tools to manage your cloud environment using a command line interface. The client tools are also required for some features that are not currently available from the web interface.

2.2. Installing Client Tools The OpenShift client tools make it easy to create and deploy applications, manage domains, control access to your OpenShift applications, and give you complete control of your cloud environment. The subsequent sections provide instructions on how to install the client tools on supported operating systems.

2.2.1. Installing on Windows This section describes how to install the OpenShift client tools on Windows operating systems. Instructions are also provided to help you install the necessary software that is required to install the client tools.

Supported Windows Operating Systems

• Windows 7

• Windows Vista

• Windows XP

• Windows 2000

2.2.1.1. Prerequisites • You must have sufficient privileges to install software on your computer. Depending on specific user permissions, you may need to disable User Account Control (UAC) on Windows Vista or Windows 7 operating systems.

2.2.1.2. Installing Required Software Before you can install OpenShift client tools on Windows operating systems, you must download and install the following software:

1. RubyInstaller

2. Git — software version control system.

Instructions to install the required software are provided in the subsequent sections.

2.2.1.2.1. Installing RubyInstaller Follow the instructions below to install RubyInstaller for Windows.

3 Chapter 2. OpenShift Client Tools

Procedure 2.1. To install RubyInstaller on Windows: 1. From rubyinstaller.org1, download and save the latest RubyInstaller package for Windows to your desired directory.

Figure 2.1. Select RubyInstaller Package

2. Double-click the executable RubyInstaller file you downloaded to launch the RubyInstaller installation wizard. Accept the Agreement and click Next.

Figure 2.2. Accept License Agreement

4 Installing on Windows

3. Select the Add Ruby executables to your PATH check box, and click Install to begin the installation.

Figure 2.3. Select PATH

4. Click Finish when the install completes.

2.2.1.2.2. Installing Git Version Control After you have installed RubyInstaller, follow the instructions below to install Git version control for Windows.

Procedure 2.2. To install Git on Windows: 1. From http://msysgit.github.com/, download and save the latest version of Git for Windows to your desired directory.

Figure 2.4. Select Git Package

5 Chapter 2. OpenShift Client Tools

2. Double-click the executable Git file you downloaded to launch the Git installation wizard. Click Next until you are asked to adjust your PATH environment.

Figure 2.5. Git Setup Wizard

3. Select the Run Git from the Windows Command Prompt check box and click Next. This will allow you to use the default Windows command prompt for Git operations.

Figure 2.6. Select Git PATH

6 Installing on Mac OS X

4. Select the Checkout Windows-style, commit Unix-style line endings check box, and click Next.

Figure 2.7. Select Line Ending

5. Click Finish when the install completes.

2.2.1.3. Installing Client Tools After you have installed RubyInstaller and Git, follow the instructions below to install OpenShift client tools.

Procedure 2.3. To install OpenShift client tools on Windows: 1. Open Windows Command Prompt.

• Click Start, type cmd in the Start Search text box, and then click cmd.

2. Run the following command to install the client tools:

$ gem install rhc

When you have finished installing the OpenShift client tools, you can proceed to Section 2.3, “Configuring Client Tools” to configure the client tools using the interactive setup wizard.

2.2.2. Installing on Mac OS X This section describes how to install the OpenShift client tools on Mac OS X operating systems.

2.2.2.1. Prerequisites • Mac OS X 10.5 or later

7 Chapter 2. OpenShift Client Tools

• Sudo access

2.2.2.2. Installing Required Software The following software must be installed before installing the OpenShift client tools on Mac OS X:

• Ruby — interpreted object-oriented scripting language.

• Git — software version control system.

Installing Ruby Mac OS X Lion ships with Ruby 1.8.7 preinstalled. Previous versions of OS X included Ruby as part of the Xcode2 integrated development environment. If you are installing the OpenShift client tools on a version of OS X that did not ship with Ruby preinstalled, you can install it one of two ways:

• Use your OS X installation CD

• Download and install the Xcode3 integrated development environment from the Apple website

Alternatively, if you are experienced with Mac OS software development, you can also:

• Download and install Ruby from the MacRuby4 website, or

• Visit http://www.ruby-lang.org/en/downloads/ for help installing Ruby with homebrew

After you have installed Ruby using one of the methods described above, run the command as shown below to verify that it has installed correctly.

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

Installing Git Although there are a number of options available to install Git version control on Mac OS X, the OpenShift development team recommends that you download and install the latest version from here: http://code.google.com/p/git-osx-installer/.

After installation is complete, run the following command to verify that Git has installed correctly:

$ git --version git version 1.7.11.1 where the version number returned will be the version you installed.

2.2.2.3. Installing Client Tools After you have installed Ruby and Git, run the following command to install the client tools on Mac OS X:

2 https://developer.apple.com/xcode/

8 Installing on Ubuntu and Debian

$ sudo gem install rhc

When you have finished installing the OpenShift client tools, you can proceed to Section 2.3, “Configuring Client Tools” to configure the client tools using the interactive setup wizard.

2.2.3. Installing on Ubuntu and Debian This section describes how to install the OpenShift client tools on Ubuntu or other Debian distributions. Instructions are also provided to help you install the necessary software that is required prior to installing the client tools.

2.2.3.1. Prerequisites • Sudoer or root access

Note

The sudo command will only work if the particular user is listed in the sudoers file. As an alternative to sudo access, you can activate a root terminal with the su command and the root password. If you activate a root terminal, you can omit sudo from the commands shown in the examples. Be sure to close your root terminal when you have completed installing the OpenShift client tools on your computer.

2.2.3.2. Installing Required Software The following software must be installed before installing the OpenShift client tools on Ubuntu or other Debian distributions:

• Ruby — interpreted object-oriented scripting language.

• RubyGems — Ruby standard for publishing and managing third party libraries.

• Git — software version control system.

Installing Ruby From terminal, run the command as shown below to install Ruby.

$ sudo apt-get install ruby-full

Run the following command to verify that Ruby has installed correctly:

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

Installing RubyGems Run the following command to install RubyGems:

9 Chapter 2. OpenShift Client Tools

$ sudo apt-get install

Installing Git Run the command as shown below to install Git version control.

$ sudo apt-get install git-core

After installation is complete, run the following command to verify that Git has installed correctly:

$ git --version git version 1.7.11.1 where the version number returned will be the version you installed.

2.2.3.3. Installing Client Tools After you have installed the required software, run the following command to install the client tools:

$ sudo gem install rhc

2.2.3.4. Installation Issues and Tips

Executing Client Tool Commands from Any Directory As noted in the previous section, on Ubuntu and other Debian-based distributions, the OpenShift client tools by default are stored in the /var/lib/gems/1.8/bin directory. Therefore, all client tool commands must be executed from this directory, and you must append ./ to each command.

You can, however, add the client tools to the PATH environment variable, allowing you to run client tool commands from any directory. Run the following command to add the client tools to the PATH environment variable and make the change persistent for an entire terminal session:

$ sudo export PATH=/var/lib/gems/1.8/bin:$PATH

Now you can run client tool commands from any directory in the current Terminal session. Keep in mind that you must do this each time you close your current Terminal session and start a new one.

For a more permanent solution, add the export PATH=/var/lib/gems/1.8/bin:$PATH command to your .bashrc file. Therefore, each time you start a new Terminal session the client tools get added to the PATH environment variable automatically. You can then run all client tool commands from any directory in Terminal.

Making Client Tools Available to All Users Initially the OpenShift client tools are only available to the user who performed the installation. To make the client tools available to all users on an Ubuntu system, run the following command:

$ sudo ln -s /var/lib/gems/1.8/bin/rhc* /usr/bin/

10 Installing on openSUSE

This will create a symbolic link to the OpenShift client tools binaries in the default search path, and make the client tools available to all users on that system.

When you have finished installing the OpenShift client tools, you can proceed to Section 2.3, “Configuring Client Tools” to configure the client tools using the interactive setup wizard.

2.2.4. Installing on openSUSE This section describes how to install the OpenShift client tools on openSUSE. Instructions are also provided to help you install the necessary software that is required prior to installing the client tools.

2.2.4.1. Prerequisites • Sudoer or root access

Note

The sudo command will only work if the particular user is listed in the sudoers file. As an alternative to sudo access, you can activate a root terminal with the su command and the root password. If you activate a root terminal, you can omit sudo from the commands shown in the examples. Be sure to close your root terminal when you have completed installing the OpenShift client tools on your computer.

2.2.4.2. Installing Required Software The following software must be installed before installing the OpenShift client tools on openSUSE:

• Ruby — interpreted object-oriented scripting language.

• RubyGems — Ruby standard for publishing and managing third party libraries.

• Git — software version control system.

Note

The commands in the examples below have been executed with root access.

Installing Ruby From terminal, run the command as shown below to install Ruby.

$ sudo zypper install ruby

Run the following command to verify that Ruby has installed correctly:

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

11 Chapter 2. OpenShift Client Tools

Installing RubyGems Run the following command to install RubyGems:

$ sudo zypper install rubygems

Installing Git Run the command as shown below to install Git version control.

$ sudo zypper install git-core

After installation is complete, run the following command to verify that Git has installed correctly.

$ git --version git version 1.7.11.1 where the version number returned will be the version you installed.

2.2.4.3. Installing Client Tools After you have installed the required software, run the following command to install the client tools:

$ sudo gem install rhc

When you have finished installing the OpenShift client tools, you can proceed to Section 2.3, “Configuring Client Tools” to configure the client tools using the interactive setup wizard.

2.2.5. Installing on Fedora This section describes how to install OpenShift client tools on Fedora operating systems.

2.2.5.1. Prerequisites • Fedora 16 or later

• Sudoer or root access

Note

The sudo command will only work if the particular user is listed in the sudoers file. As an alternative to sudo access, you can activate a root terminal with the su command and the root password. If you activate a root terminal, you can omit sudo from the commands shown in the examples. Be sure to close your root terminal when you have completed installing the OpenShift client tools on your computer.

2.2.5.2. Installing the Client Tools There are two ways to install the client tools on Fedora operating systems:

12 Installing on Fedora

• Install the RPM using YUM package manager

• Install the gem using gem install

Note

The RPM version of the client tools is not updated as frequently as the gem maintained by the OpenShift development team.

Installing With YUM Package Manager Use the yum install command as shown below to install the client tools and all other required dependencies.

$ sudo yum install rubygem-rhc

Installing With Gem As root user, run the gem install command as shown below to install the client tools and all other required dependencies.

$ sudo gem install rhc

Note

If you do not run the gem install command as root user, you must have write permissions to the /usr/lib/ruby/gems/1.8 directory.

Updating Client Tools Regardless of which installation method you choose, use the gem update command as shown below to update the client tools.

$ sudo gem update rhc

2.2.5.3. Installation Issues and Tips for Fedora

Automatic Completion Using the Tab Key OpenShift client tools for Fedora support the automatic completion feature of the bash shell. If after installation automatic completion using the tab key does not work with the OpenShift client tools, you can resolve this by sourcing the bash completion script in one of two ways:

• Close your current terminal session, and open a new session to automatically source the bash completion script. 13 Chapter 2. OpenShift Client Tools

• Alternatively, run the following command to manually source the bash completion script:

$ . /etc/bash_completion.d/rhc

If the automatic completion feature is not persistent when you open a new terminal session, the automatic completion script for OpenShift client tools must be sourced in the .bashrc file in your home directory. You can do this by adding the following line to your .bashrc file: source /etc/bash_completion.d/rhc

When you have finished installing the OpenShift client tools, you can proceed to Section 2.3, “Configuring Client Tools” to configure the client tools using the interactive setup wizard.

2.2.6. Installing on Red Hat Enterprise Linux This section describes how to install the OpenShift client tools on Red Hat Enterprise Linux operating systems.

2.2.6.1. Prerequisites • Red Hat Enterprise Linux 6 or later

• Sudoer or root access

• RubyGems installed (including rubygem-json and rubygem-parseconfig)

Note

The sudo command will only work if the particular user is listed in the sudoers file. As an alternative to sudo access, you can activate a root terminal with the su command and the root password. If you activate a root terminal, you can omit sudo from the commands shown in the examples. Be sure to close your root terminal when you have completed installing the OpenShift client tools on your computer.

If you do not have the RubyGems package already installed, you must enable the Red Hat Enterprise Linux optional repository channel. By enabling the optional channel, the RubyGems package dependencies will be resolved automatically during installation of the client tools.

If you are using the Certificate-Based Red Hat Network (RHN) tooling, use the following command to enable the optional channel:

$ sudo yum-config-manager --enable [architecture]-[operating_system]-optional-6

If you are using the classic RHN subscription, use the following command to enable the optional channel:

$ sudo rhn-channel --add --channel=[architecture]-[operating_system]-optional-6

• architecture — your system architecture. Enter either i386 or x86_64.

14 Installing on Red Hat Enterprise Linux

— type of operating system installed. Enter either workstation or server.

For example, if you have Red Hat Enterprise Linux Workstation 6 or later installed on a 64-bit x86 computer, and you are using the classic Red Hat Network subscription, run the command as shown below to enable the optional repository:

$ sudo rhn-channel --add --channel=rhel-x86_64-workstation-optional-6

2.2.6.2. Installing Client Tools Ensure that you have the RubyGems software package installed on your computer. If you do not, and your system is registered on RHN, you must enable the optional repository channel, as described in Section 2.2.6.1, “Prerequisites”.

Procedure 2.4. To install the OpenShift client tools on Red Hat Enterprise Linux: 1. Download the OpenShift repository file — openshift.repo5 — to your preferred directory by right- clicking on it and selecting Save Linked Content As....

2. Move the downloaded openshift.repo file to the /etc/yum.repos.d directory using the mv command, as shown below. Be sure to replace ~/Downloads/openshift.repo with the path to the directory where you downloaded the file.

$ sudo mv ~/Downloads/openshift.repo /etc/yum.repos.d/

3. Run the following command to install the OpenShift client tools:

$ sudo yum install rhc

The example below shows a typical installation on a Red Hat Enterprise Linux operating system. Some information has been removed for clarification purposes.

Example 2.1. Installation Process on Red Hat Operating System

$ sudo yum install rhc Freeing read locks for locker 0x1: 2360/140216412567296 ..... Resolving Dependencies --> Running transaction check ---> Package rhc.noarch 0:0.94.8-1.el6_3 will be installed --> Processing Dependency: ruby >= 1.8.5 for package: rhc-0.94.8-1.el6_3.noarch --> Processing Dependency: rubygem-test-unit for package: rhc-0.94.8-1.el6_3.noarch ..... Installing: rhc noarch 0.94.8-1.el6_3 openshift 406 k Installing for dependencies: compat-readline5 x86_64 5.2-17.1.el6 rhel-x86_64-server-6 129 k ..... Total download size: 9.3 M Installed size: 3.8 M Is this ok [y/N]: y Downloading Packages: (1/18): compat-readline5-5.2-17.1.el6.x86_64.rpm | 129 kB 00:00

15 Chapter 2. OpenShift Client Tools

(2/18): git-1.7.1-2.el6_0.1.x86_64.rpm | 4.6 MB 00:28 ..... Installing : rubygem-parseconfig-0.5.2-4.el6_0.noarch 17/18 Installing : rhc-0.94.8-1.el6_3.noarch 18/18 duration: 1272(ms) ..... Installed products updated.

Installed: rhc.noarch 0:0.94.8-1.el6_3

Dependency Installed: compat-readline5.x86_64 0:5.2-17.1.el6 git.x86_64 0:1.7.1-2.el6_0.1 perl-Error.noarch 1:0.17015-4.el6 perl-Git.noarch 0:1.7.1-2.el6_0.1 ruby.x86_64 0:1.8.7.352-7.el6_2 ruby-irb.x86_64 0:1.8.7.352-7.el6_2 ruby-libs.x86_64 0:1.8.7.352-7.el6_2 ruby-.x86_64 0:1.8.7.352-7.el6_2 rubygem-archive-tar-minitar.noarch 0:0.5.2-3.1.el6_2 rubygem-commander.noarch 0:4.0.3-4.el6_2 rubygem-highline.noarch 0:1.5.1-3.el6 rubygem-mime-types.noarch 0:1.16-4.el6_0 rubygem-net-ssh.noarch 0:2.5.2-1.el6_2 rubygem-parseconfig.noarch 0:0.5.2-4.el6_0 rubygem-rest-client.noarch 0:1.6.1-2.el6_2 rubygem-test-unit.noarch 0:2.2.0-1.el6_0 rubygems.noarch 0:1.3.7-1.el6

Complete!

2.2.6.3. Installation Issues and Tips for Red Hat Enterprise Linux

Automatic Completion with Tab Key The OpenShift client tools for Red Hat Enterprise Linux support the automatic completion feature of the bash shell. If after installation automatic completion using the tab key does not work with OpenShift client tools, you can resolve this by sourcing the bash completion script in one of two ways:

• Close your current terminal session, and open a new session to automatically source the bash completion script.

• Alternatively, run the following command to manually source the bash completion script:

$ . /etc/bash_completion.d/rhc

If the automatic completion feature is not persistent when you open a new terminal session, the automatic completion script for the OpenShift client tools must be sourced in the .bashrc file in your home directory. You can do this by adding the following line to your .bashrc file: source /etc/bash_completion.d/rhc

When you have finished installing the OpenShift client tools, you can proceed to Section 2.3, “Configuring Client Tools” to configure the client tools using the interactive setup wizard.

2.3. Configuring Client Tools After you have installed OpenShift client tools on your computer, you must configure the client tools before you can create and deploy applications on OpenShift. The interactive setup wizard walks you

16 Configuring Client Tools through the steps by asking several questions to help you prepare your computer to interact with the remote OpenShift server.

Important

It is necessary to run the interactive setup wizard before you can create OpenShift applications and manage your cloud environment. You may experience problems if you fail to run the setup wizard after installing the client tools.

This section provides a sample walk through of the setup wizard and some general information that will assist you with the initial configuration.

Note

The example of the setup wizard shown below was run on Windows XP. Your screen output may vary depending on your operating system.

The setup wizard is invoked at the first attempt to execute an rhc command. In the example below, the setup wizard is invoked with the rhc --help command.

Note

On Mac OS X, the interactive setup wizard must be launched with the rhc setup command.

$ rhc --help Starting Interactive Setup for OpenShift's command line interface

It looks like you have not configured or used OpenShift client tools on this computer. We'll help you configure the client tools with a few quick questions. You can skip this in the future by copying your configuration files to other machines you use to manage your OpenShift account:

C:/Documents and Settings/user/.openshift/express.conf :/Documents and Settings/user/.ssh/

Login Information You will be asked to provide your login credentials you used to sign up for an OpenShift account, as shown below. Alternatively, you can also use your Red Hat login credentials.

To connect to openshift.redhat.com enter your OpenShift login (email or Red Hat login id): [email protected] Password: password 17 Chapter 2. OpenShift Client Tools

Configuration File After you have entered your login credentials, the setup wizard will create the OpenShift express.conf configuration file in your home directory. In the example below, the express.conf file has been created in the C:/Documents and Settings/blank/.openshift/express.conf directory.

Created local config file: C:/Documents and Settings/blank/.openshift/express.conf The express.conf file contains user configuration, and can be transferred to different computers.

SSH Keys Next, the setup wizard will configure the SSH keys that will be used to authenticate your computer with the OpenShift remote server. Because this is the initial configuration, it is assumed no existing SSH keys are found on your computer. Therefore, the setup wizard will generate a new pair of SSH keys, named id_rsa and id_rsa.pub, and save them in your home directory. In the example below the SSH keys have been generated and saved in the C:/Documents and Settings/blank/.ssh directory.

No SSH keys were found. We will generate a pair of keys for you. Created: C:/Documents and Settings/blank/.ssh/id_rsa.pub

After the new SSH keys have been generated, the public key, id_rsa.pub, must be uploaded to the OpenShift server to authenticate your computer to the remote server. You can enter a name to use for your key, or leave it blank to use the default name. In the example below the default name is used.

Your public ssh key must be uploaded to the OpenShift server. Would you like us to upload it for you? (yes/no) yes You can enter a name for your key, or leave it blank to use the default name. Using the same name as an existing key will overwrite the old key. Current Keys: None Since you do not have any keys associated with your OpenShift account, your new key will be uploaded as the default key Sending new key default .. Success

Installed Software The setup wizard will check to determine whether you have Git version control software installed on your computer. Git is required to create and deploy applications to the OpenShift cloud environment. It is assumed you have installed all necessary software for your operating system as described in the earlier sections of this document. In the example below, the setup wizard verifies that Git for Windows has been installed correctly.

In order to fully interact with OpenShift you will need to install and configure a git client if you have not already done so. Documentation for installing other tools you will need for OpenShift can be found at https://openshift.redhat.com/app/ getting_started#install_client_tools We recommend these free applications: * Git for Windows - a basic git command line and GUI client https://github.com /msysgit/msysgit/wiki/InstallMSysGit * TortoiseGit - git client that integrates into the file explorer http://code. google.com/p/tortoisegit/

18 Configuring Client Tools

Namespace The setup wizard will next check whether you have created a namespace for your OpenShift cloud environment. The example below assumes that a namespace has not been created. If you created your namespace when you signed up for an OpenShift account, it will be displayed here. If you wish to create a namespace at this time, type the desired name when prompted. Alternatively, you can create a namespace using the OpenShift web console, or using the rhc domain create command. The namespace MyNamespace has been created in the example below.

Checking for your namespace ... not found Your namespace is unique to your account and is the suffix of the public URLs we assign to your applications. You may configure your namespace here or leave it blank and use 'rhc domain create' to create a namespace later. You will not be able to create applications without first creating a namespace.

Please enter a namespace or leave this blank if you wish to skip this step: MyNamespace

Your domain name 'MyNamespace' has been successfully created

Important

You must create a namespace before you can create OpenShift applications.

Applications Finally, the setup wizard will check whether any OpenShift applications have been created. Any applications created with the OpenShift web console will be displayed here. In the example below, no applications have been found, in which case the setup wizard shows the types of applications that can be created with the associated commands.

Checking for applications ... none found

Below is a list of the types of applications you can create: Obtaining list of cartridges (please excuse the delay)... * nodejs-0.6 - rhc app create -t nodejs-0.6 -a * jbossas-7 - rhc app create -t jbossas-7 -a * python-2.6 - rhc app create -t python-2.6 -a * jenkins-1.4 - rhc app create -t jenkins-1.4 -a * ruby-1.8 - rhc app create -t ruby-1.8 -a * diy-0.1 - rhc app create -t diy-0.1 -a * php-5.3 - rhc app create -t php-5.3 -a * perl-5.10 - rhc app create -t perl-5.10 -a

The OpenShift client tools have been configured on your computer. You can run this setup wizard at any time by using the command 'rhc setup' We will now execute your original command (rhc --help)

After the configuration is complete, the setup wizard will execute the command you initially attempted to run.

6 https://openshift.redhat.com/community/developers/get-started

19 Chapter 2. OpenShift Client Tools

2.4. Where To Go From Here Now that you have installed and configured all required software, you are ready to create and deploy applications to the OpenShift cloud. Visit the Get Started on OpenShift6 web page to get more information and access the OpenShift quick start guides. The quick start guides will help you create and deploy your applications, and provide information on managing your OpenShift cloud environment.

20 Appendix A. Revision History Revision Mon Jul 23 2012 Bilhar Aulakh 2.0.15-0 [email protected] BZ 840488: Update installation instructions for Fedora. BZ 841463: Update installation instructions for Mac OS X. Update installation instructions for Ubuntu and openSUSE.

Revision Mon Jul 09 2012 Brian Moss [email protected] 2.0.14-0 Update installation TOC. BZ 835377: Wrong Bugzilla component listed in preface.

Revision Fri Jun 01 2012 Bilhar Aulakh 2.0.12-2 [email protected] Add section for client tools setup wizard. Add section with link to Get Started on OpenShift web page.

Revision Mon May 28 2012 Bilhar Aulakh 2.0.12-1 [email protected] Update installation instructions for Windows. Remove application tutorials.

Revision Thu May 17 2012 Bilhar Aulakh 2.0.12-0 [email protected] Add installation instructions for WordPress.

Revision Wed May 09 2012 Bilhar Aulakh 2.0.11-0 [email protected] Add reference information for Drupal repository.

Revision Mon Apr 30 2012 Bilhar Aulakh 2.0.10-1 [email protected] BZ 817422: Minor QE fix.

Revision Fri Apr 27 2012 Bilhar Aulakh 2.0.10-0 [email protected] Add installation instructions for Drupal.

Revision Tue Apr 10 2012 Bilhar Aulakh 2.0.9-0 [email protected]

21 Appendix A. Revision History

BZ 807379: Document making client tools available to all users.

Revision Tue Mar 27 2012 Bilhar Aulakh 2.0.8-0 [email protected] Rename OpenShift Express to OpenShift. Add workaround for Ruby error messages in Cygwin.

Revision Fri Mar 16 2012 Bilhar Aulakh 2.0.7-1 [email protected] Minor QE edits.

Revision Mon Mar 12 2012 Bilhar Aulakh 2.0.7-0 [email protected] Add installation instructions for other Linux distributions. Minor modifications to design and content.

Revision Tue Feb 28 2012 Bilhar Aulakh 2.0.6-2 [email protected] Minor document design modifications.

Revision Mon Feb 27 2012 Bilhar Aulakh 2.0.6-1 [email protected] Minor edits for Windows 2000 support.

Revision Fri Feb 24 2012 Bilhar Aulakh 2.0.6-0 [email protected] Added Windows installation instructions for client tools. BZ 796974 - Fixed broken link to download EPEL package.

Revision Mon Feb 20 2012 Bilhar Aulakh 2.0.5-3 [email protected] Removed Draft status.

Revision Wed Feb 15 2012 Bilhar Aulakh 2.0.5-2 [email protected] QE edits.

Revision Wed Feb 15 2012 Bilhar Aulakh 2.0.5-1 [email protected] Added information on automatic completion with tab key.

22 Revision Fri Feb 10 2012 Bilhar Aulakh 2.0.5-0 [email protected] Added Mac OS X installation instructions for client tools.

Revision Fri Feb 03 2012 Bilhar Aulakh 2.0.4-0 [email protected] First draft of book

Revision 0-0 Mon Nov 28 2011 Bilhar Aulakh [email protected] Initial creation of book by publican

23 24