Ce contenu n'est pas disponible dans la langue sélectionnée.
Client Tools Installation Guide
Installing and Configuring the Openshift Enterprise Client Tools
Abstract
Chapter 1. Introduction to OpenShift Enterprise Copier lienLien copié sur presse-papiers!
Chapter 2. OpenShift Client Tools Copier lienLien copié sur presse-papiers!
2.1. About OpenShift Client Tools Copier lienLien copié sur presse-papiers!
- Setting up, administering and managing accounts
- Launching new applications
- Managing and monitoring applications
- Coding
- Debugging
- Advanced application management
2.2. Installing Client Tools Copier lienLien copié sur presse-papiers!
2.2.1. Installing on Windows Copier lienLien copié sur presse-papiers!
- Windows 7
- Windows Vista
- Windows XP
- Windows 2000
2.2.1.1. Prerequisites Copier lienLien copié sur presse-papiers!
2.2.1.2. Installing Required Software Copier lienLien copié sur presse-papiers!
- RubyInstaller
Git: software version control system.
2.2.1.2.1. Installing RubyInstaller Copier lienLien copié sur presse-papiers!
- From rubyinstaller.org, download and save the latest RubyInstaller package for Windows to your desired directory.
Figure 2.1. Select RubyInstaller Package
- Double-click the executable RubyInstaller file downloaded in the previos step to launch the RubyInstaller installation wizard. Accept the Ruby License Agreement and click Next.
Figure 2.2. Accept License Agreement
- Select the Add Ruby executables to your PATH check box, and click Install to begin the installation.
Figure 2.3. Select PATH
- Click Finish when the install completes.
2.2.1.2.2. Installing Git Version Control Copier lienLien copié sur presse-papiers!
- 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
- Double-click the executable Git file downloaded in the previous step to launch the Git installation wizard. Click Next until you are prompted to adjust the PATH environment.
Figure 2.5. Git Setup Wizard
- Select the Run Git and included UNIX tools from the Windows Command Prompt check box and click Next. This is so that you can use the default Windows command prompt for Git and SSH operations.
Figure 2.6. Select Git PATH
- Select the Checkout Windows-style, commit Unix-style line endings check box, and click Next.
Figure 2.7. Select Line Ending
- Click Finish when the install completes.
2.2.1.3. Installing Client Tools Copier lienLien copié sur presse-papiers!
RubyInstaller and Git have been successfully installed, use the following instructions to install the client tools.
- Open Windows Command Prompt.
- Click
Start, typecmdin the Start Search text box, and then clickcmd.
- Run the following command to install the client tools:
gem install rhc
$ gem install rhcCopy to Clipboard Copied! Toggle word wrap Toggle overflow When the installation completes, 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 Copier lienLien copié sur presse-papiers!
2.2.2.1. Prerequisites Copier lienLien copié sur presse-papiers!
- Mac OS X 10.5 or later
- Sudo access
2.2.2.2. Installing Required Software Copier lienLien copié sur presse-papiers!
Ruby: interpreted object-oriented scripting language.Git: software version control system.
Mac OS X Lion ships with Ruby 1.8.7 preinstalled. Previous versions of OS X included Ruby as part of the Xcode integrated development environment. If you are installing the client tools on a version of OS X that did not ship with Ruby preinstalled, you can install it one of two ways:
- Use the OS X installation CD
- Download and install the Xcode integrated development environment from the Apple website
- Download and install
Rubyfrom the MacRuby website, or - Visit http://www.ruby-lang.org/en/downloads/ for help installing
Rubywith homebrew
Ruby is installed, run the following command to verify that it has installed correctly:
ruby -e 'puts "Welcome to Ruby"'
$ ruby -e 'puts "Welcome to Ruby"'
Welcome to Ruby
Although there are a number of options available to install Git version control on Mac OS X, Red Hat
recommends to download and install the latest version from here: http://code.google.com/p/git-osx-installer/.
Git has installed correctly:
git --version
$ git --version
git version 1.7.11.1
2.2.2.3. Installing Client Tools Copier lienLien copié sur presse-papiers!
Ruby and Git have been successfully installed, run the following command to install the client tools:
sudo gem install rhc
$ sudo gem install rhc
2.2.3. Installing on Ubuntu and Debian Copier lienLien copié sur presse-papiers!
2.2.3.1. Prerequisites Copier lienLien copié sur presse-papiers!
- Sudoer or root access
Note
sudo command only works 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, omit sudo from the commands shown in the examples. Be sure to close the root terminal after the installation completes.
2.2.3.2. Installing Required Software Copier lienLien copié sur presse-papiers!
Ruby: interpreted object-oriented scripting language.RubyGems: Ruby standard for publishing and managing third party libraries.Git: software version control system.
From terminal, run the following command to install Ruby:
sudo apt-get install ruby-full
$ sudo apt-get install ruby-full
Ruby has installed correctly:
ruby -e 'puts "Welcome to Ruby"'
$ ruby -e 'puts "Welcome to Ruby"'
Welcome to Ruby
Run the following command to install RubyGems:
sudo apt-get install rubygems
$ sudo apt-get install rubygems
Run the following command to install Git version control:
sudo apt-get install git-core
$ sudo apt-get install git-core
Git has installed correctly:
git --version
$ git --version
git version 1.7.11.1
2.2.3.3. Installing Client Tools Copier lienLien copié sur presse-papiers!
sudo gem install rhc
$ sudo gem install rhc
2.2.3.4. Installation Issues and Tips Copier lienLien copié sur presse-papiers!
On Ubuntu and other Debian based distributions, the OpenShift Enterprise 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.
sudo export PATH=/var/lib/gems/1.8/bin:$PATH
$ sudo export PATH=/var/lib/gems/1.8/bin:$PATH
export PATH=/var/lib/gems/1.8/bin:$PATH command to your .bashrc file. Therefore, each time a new Terminal session is started, the client tools are automatically added to the PATH environment variable. You can then run all client tool commands from any directory in Terminal.
Initially the OpenShift Enterprise client tools are only available to the user installed them. Run the following command to make the client tools available for all users on an Ubuntu system:
sudo ln -s /var/lib/gems/1.8/bin/rhc* /usr/bin/
$ sudo ln -s /var/lib/gems/1.8/bin/rhc* /usr/bin/
2.2.4. Installing on openSUSE Copier lienLien copié sur presse-papiers!
2.2.4.1. Prerequisites Copier lienLien copié sur presse-papiers!
- Sudoer or root access
Note
sudo command only works 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, omit sudo from the commands shown in the examples. Be sure to close the root terminal after the installation completes.
2.2.4.2. Installing Required Software Copier lienLien copié sur presse-papiers!
Ruby: interpreted object-oriented scripting language.RubyGems: Ruby standard for publishing and managing third party libraries.Git: software version control system.
From terminal, run the following command to install Ruby:
sudo zypper install ruby
$ sudo zypper install ruby
Ruby has installed correctly:
ruby -e 'puts "Welcome to Ruby"'
$ ruby -e 'puts "Welcome to Ruby"'
Welcome to Ruby
Run the following command to install RubyGems:
sudo zypper install rubygems
$ sudo zypper install rubygems
Run the following command to install Git version control:
sudo zypper install git-core
$ sudo zypper install git-core
Git has installed correctly:
git --version
$ git --version
git version 1.7.11.1
2.2.4.3. Installing Client Tools Copier lienLien copié sur presse-papiers!
sudo gem install rhc
$ sudo gem install rhc
2.2.5. Installing on Fedora Copier lienLien copié sur presse-papiers!
2.2.5.1. Prerequisites Copier lienLien copié sur presse-papiers!
- Fedora 16 or later
- Sudoer or root access
Note
sudo command only works 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, omit sudo from the commands shown in the examples. Be sure to close the root terminal when the installation process is complete.
2.2.5.2. Installing the Client Tools Copier lienLien copié sur presse-papiers!
- Install the RPM using YUM package manager
- Install the gem using
gem install
Note
Run the following command to install the client tools and all other required dependencies:
sudo yum install rubygem-rhc
$ sudo yum install rubygem-rhc
Run the following command to install Ruby and RubyGems if they are not already installed:
sudo yum install rubygems
$ sudo yum install rubygems
sudo gem install rhc
$ sudo gem install rhc
2.2.5.3. Installation Issues and Tips for Fedora Copier lienLien copié sur presse-papiers!
The OpenShift Enterprise client tools for Fedora support the automatic completion feature of the bash shell. Run the rhc setup --autocomplete command and follow the instructions to enable automatic completion.
rhc setup --autocomplete
$ rhc setup --autocomplete
.bashrc file in your home directory. Do this by adding source /etc/bash_completion.d/rhc to your .bashrc file.
2.2.6. Installing on Red Hat Enterprise Linux Copier lienLien copié sur presse-papiers!
Note
rhc package found in the OpenShift Enterprise 2.0 Client Tools channel is updated less frequently than the Ruby gem version of the client tools. This may lead to some features temporarily only being available in the Ruby gem version. To ensure use of the latest version and all available features, see Section 2.2.6.3, “Installing Using the Red Hat Enterprise Linux Optional Channel” for the Ruby gem installation method.
2.2.6.1. Prerequisites Copier lienLien copié sur presse-papiers!
- Red Hat Enterprise Linux 6 or later
- Sudoer or root access
Note
sudo command only works 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, omit sudo from the commands shown in the examples. Be sure to close the root terminal after the installation completes.
2.2.6.2. Installing from the OpenShift Enterprise 2.0 Client Tools Channel Copier lienLien copié sur presse-papiers!
Important
If you are using Red Hat Subscription Management, use the following steps. For additional information on managing your subscription entitlements with RHSM, see the Red Hat Subscription Management Guide at https://access.redhat.com/site/documentation.
Procedure 2.1. To Configure OpenShift Enterprise Entitlements with RHSM on Red Hat Enterprise Linux
- If your Red Hat Enterprise Linux instance is not already registered, run the following command to do so:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the following command and locate the desired OpenShift Enterprise subscription pool ID in the list of the available subscriptions for that account:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Subscribe to the desired pool ID identified in the previous step with the following command:
sudo subscription-manager subscribe --pool Example_3cf49557013d418c52992690
$ sudo subscription-manager subscribe --pool Example_3cf49557013d418c52992690 Successfully attached a subscription for: OpenShift EnterpriseCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Confirm that the pertinent repository is now listed on your system:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you do not see the correct repos enabled, check and edit your/etc/yum.repos.d/redhat.repoto modify your enabled repos as needed.
If you are using RHN Classic, use the following steps. For more detailed information on using RHN Classic, see the appendix in the Red Hat Subscription Management Guide at https://access.redhat.com/site/documentation.
Note
Procedure 2.2. To Configure OpenShift Enterprise Entitlements with RHN Classic on Red Hat Enterprise Linux
- If your Red Hat Enterprise Linux instance is not already registered, run the following command and follow the on-screen instructions:
sudo rhn_register
$ sudo rhn_registerCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Log on to the Red Hat Customer Portal at http://access.redhat.com, choose under RHN CLASSIC from the tab, then locate and click on the hostname of the system.
- From the system profile's tab, click Alter Channel Subscriptions and check mark the Red Hat OpenShift Enterprise 2.0 Client Tools child channel. The channel will be located within the expandable Additional Services Channels for Red Hat Enterprise Linux 6 for x86_64 section. Apply your changes by clicking the button.
- Confirm that the pertinent repositories are now listed on your system:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
After using either of the above methods to subscribe to the OpenShift Enterprise channel, run the following command to install the client tools:
sudo yum install rhc
$ sudo yum install rhc
2.2.6.3. Installing Using the Red Hat Enterprise Linux Optional Channel Copier lienLien copié sur presse-papiers!
RubyGems already installed, you must enable the Red Hat Enterprise Linux Optional channel. The following assumes that the client system is already registered and subscribed to a Red Hat Enterprise Linux base channel.
Important
If you are using Red Hat Subscription Management, use the following command to enable the Optional channel:
sudo yum-config-manager --enable rhel-6-[operating_system]-optional-rpms
$ sudo yum-config-manager --enable rhel-6-[operating_system]-optional-rpms
sudo rhn-channel --add --channel rhel-[architecture]-[operating_system]-optional-6
$ sudo rhn-channel --add --channel rhel-[architecture]-[operating_system]-optional-6
- operating_system: type of operating system installed. Enter either
workstation,clientorserver. - architecture: your system architecture. Enter either
i386orx86_64.
sudo rhn-channel --add --channel=rhel-x86_64-workstation-optional-6
$ sudo rhn-channel --add --channel=rhel-x86_64-workstation-optional-6
After the Optional channel has been enabled, use the following procedure to install the rhc gem which provides the client tools:
Procedure 2.3. To Install the rhc gem on Red Hat Enterprise Linux
- Make sure
RubyGemsis installed:sudo yum install rubygems
$ sudo yum install rubygemsCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Then run the following command to install the
rhcgem:sudo gem install rhc
$ sudo gem install rhcCopy to Clipboard Copied! Toggle word wrap Toggle overflow
2.2.6.4. Installation Issues and Tips for Red Hat Enterprise Linux Copier lienLien copié sur presse-papiers!
The OpenShift Enterprise client tools for Red Hat Enterprise Linux support the automatic completion feature of the bash shell. Run the rhc setup --autocomplete command and follow the instructions to enable automatic completion.
rhc setup --autocomplete
$ rhc setup --autocomplete
.bashrc file in your home directory. Do this by adding source /etc/bash_completion.d/rhc to your .bashrc file.
2.3. Configuring Client Tools Copier lienLien copié sur presse-papiers!
Important
rhc --version to verify the installed version, or see Section 2.4, “Updating Client Tools” for instructions on how to update the client tools.
Note
Run the rhc setup command to launch the setup wizard, and specify the broker with the --server option. The following example assumes the OpenShift Enterprise broker is located at broker.example.com:
rhc setup --server=broker.example.com
$ rhc setup --server=broker.example.com
OpenShift Client Tools (RHC) Setup Wizard
This wizard will help you upload your SSH keys, set your application namespace, and check that other programs like Git are properly installed.
The setup wizard next prompts you for the login credentials. If you are unsure of the credentials to use, contact your system administrator.
Login to broker.example.com: user@myemail.com Password: password
Login to broker.example.com: user@myemail.com
Password: password
You are then prompted to generate an authorization token. Answering yes will store a token in your home directory to be used on subsequent requests. When it expires, you are prompted for your password again.
With your login credentials, the setup wizard creates the express.conf configuration file in your home directory. In the following example, the express.conf file is created in the C:\Users\User1\.openshift directory.
Saving configuration to C:\Users\User1\.openshift\express.conf ... done
Saving configuration to C:\Users\User1\.openshift\express.conf ... done
Next, the setup wizard configures the SSH keys so that your system can authenticate with the remote server. Because this is the initial configuration, it is assumed no existing SSH keys are found on your system. Therefore, the setup wizard generates a new pair of SSH keys, named id_rsa and id_rsa.pub, and saves them in your home directory. In the following example the SSH keys are generated and saved in the C:\Users\User1\.ssh directory.
No SSH keys were found. We will generate a pair of keys for you. Created: C:\Users\User1\.ssh\id_rsa.pub
No SSH keys were found. We will generate a pair of keys for you.
Created: C:\Users\User1\.ssh\id_rsa.pub
id_rsa.pub, must be uploaded to the OpenShift server to authenticate your system to the remote server. Enter a name to use for your key, or leave it blank to use the default name. In the following example the default name is used.
The setup wizard verifies if Git version control software is installed on your system. Git is required to create and deploy applications to the OpenShift Enterprise cloud environment. It is assumed that all the required software for your operating system is already installed as described in the earlier sections of this document. In the example below, the setup wizard verifies that Git for Windows is installed correctly.
The setup wizard next verifies whether a domain already exists for your cloud environment. The example below assumes that a domain does not exist, and one must be created. To create a domain at this time, enter the desired name when prompted. Alternatively, you can create a domain using the OpenShift Enterprise Management Console, or using the rhc domain create command later. The domain named MyDomain is created in the following example.
Important
Finally, the setup wizard verifies whether any applications exist under your domain. Any applications created with the Management Console are displayed here. In the example below, no applications have been created. In this case the setup wizard shows the types of applications that can be created with the associated commands. The setup wizard then completes by displaying the current gear consumption along with the gear sizes available to the given user.
2.4. Updating Client Tools Copier lienLien copié sur presse-papiers!
gem install method, run the gem update command to update the client tools:
gem update rhc
$ gem update rhc
yum install method, run the yum update command to update the client tools, and replace packagename with rubygem-rhc for Fedora or rhc for Red Hat Enterprise Linux:
yum update packagename
$ yum update packagename
2.5. Where To Go From Here Copier lienLien copié sur presse-papiers!
Appendix A. Revision History Copier lienLien copié sur presse-papiers!
| Revision History | ||||
|---|---|---|---|---|
| Revision 2.1-1 | Mon 15 Sep 2014 | |||
| ||||
| Revision 2.1-0 | Fri 07 Mar 2014 | |||
| ||||
| Revision 2.0-0 | Mon Dec 9 2013 | |||
| ||||
Legal Notice
Copyright © 2025 Red Hat
OpenShift documentation is licensed under the Apache License 2.0 (https://www.apache.org/licenses/LICENSE-2.0).
Modified versions must remove all Red Hat trademarks.
Portions adapted from https://github.com/kubernetes-incubator/service-catalog/ with modifications by Red Hat.
Red Hat, Red Hat Enterprise Linux, the Red Hat logo, the Shadowman logo, JBoss, OpenShift, 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.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation’s permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.