此内容没有您所选择的语言版本。

2.3. Configuring Client Tools


When you have successfully installed the OpenShift Enterprise client tools, they must be configured. The interactive setup wizard walks you through the steps by asking several questions to help you configure the client tools.

Important

You must run the interactive setup wizard after installing the client tools so that your workstation is correctly configured to communicate with the remote OpenShift server.
The following is a sample walk through of the setup wizard, and some general information to assist you with the initial configuration. It assumes you have installed the latest version of the client tools. Use 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

The following setup wizard example was run on Windows 7. Screen outputs may vary depending on the operating system.
Starting the Setup Wizard

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
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.
Copy to Clipboard Toggle word wrap

If the server's certificate is self-signed, the following message is displayed. Choosing yes allows the setup wizard to continue, while no exits the setup wizard.
The server's certificate is self-signed, which means that a secure connection cannot be established to 'broker.example.com'.

You may bypass this check, but any data you send to the server could be intercepted by others.

Connect without checking the certificate? (yes|no):
Copy to Clipboard Toggle word wrap
Login Information

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
Copy to Clipboard Toggle word wrap

Authorization Tokens

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.

OpenShift
	
	 can create and store a token on disk which allows to you to access the server without using your password. The key is stored in your home directory and should be kept secret. You can delete the key at any time by running 'rhc logout'.
Generate a token now? (yes|no) yes
Generating an authorization token for this client ... lasts about 1 day
Copy to Clipboard Toggle word wrap
Configuration File

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
Copy to Clipboard Toggle word wrap

SSH Keys

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
Copy to Clipboard Toggle word wrap
After the new SSH keys are generated, the public key, 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.
Your public ssh key must be uploaded to the OpenShift server to access code.
Upload now? (yes|no) yes

Since you do not have any keys associated with your OpenShift account, your new key will be uploaded as the 'default' key

Uploading key 'default' from C:\Users\User1\.ssh\id_rsa.pub ... done
Copy to Clipboard Toggle word wrap

Installed Software

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.

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/community/developers/install-the-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/
Copy to Clipboard Toggle word wrap

Domain

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.

Checking for a domain ... none

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

Please enter a domain (letters and numbers only) |<none>|: MyDomain
Your domain name 'MyDomain' has been successfully created
Copy to Clipboard Toggle word wrap

Important

A domain must be created before you can create OpenShift Enterprise applications.
Applications

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.

Checking for applications ... none

Run 'rhc app create' to create your first application.

  Do-It-Yourself                            rhc app create <app name> diy-0.1
  JBoss Enterprise Application Platform 6.0 rhc app create <app name> jbosseap-6.0
  Jenkins Server 1.4                        rhc app create <app name> jenkins-1.4
  PHP 5.4                                   rhc app create <app name> php-5.4
  Perl 5.10                                 rhc app create <app name> perl-5.10
  Python 2.6                                rhc app create <app name> python-2.6
  Ruby 1.8                                  rhc app create <app name> ruby-1.8
  Ruby 1.9                                  rhc app create <app name> ruby-1.9
  Tomcat (JBoss Enterprise Web Server 1.0)  rhc app create <app name> jbossews-1.0

  You are using 0 of 100 total gears
  The following gear sizes are available to you: small

Your client tools are now configured.
Copy to Clipboard Toggle word wrap

The OpenShift Enterprise client tools are now configured on your system.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat