Table of Contents
We can use the command rhc setup
with OpenShift server. I tried it, and wrote what the command do.
Environment
- ruby 2.0.0p647
- rhc 1.38.4
After typing rhc setup
, the following output is exposed.
Login
First, indicated that I should log in to OpenShift.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
hostname% rhc setup 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. If you have your own OpenShift server, you can specify it now. Just hit enter to use the server for OpenShift Online: openshift.redhat.com. Enter the server hostname: |openshift.redhat.com| You can add more servers later using 'rhc server'. RSA 1024 bit CA certificates are loaded due to old openssl compatibility Login to openshift.redhat.com: your@email.com Password: ******** |
Create Authenticate Token
I was asked whether I create authenticate token to access to the server without password input. This token can be removed with the command rhc logout
.
1 2 3 4 5 6 |
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 ... RSA 1024 bit CA certificates are loaded due to old openssl compatibility lasts about 1 month Saving configuration to /home/kenji/.openshift/express.conf ... done |
Create SSH Key
Create SSH Key to be used on SSH accessing to OpenShift server.
1 2 3 |
No SSH keys were found. We will generate a pair of keys for you. Created: /home/you/.ssh/id_rsa.pub |
Upload Public Key
Then I asked whether I upload the public key to OpenShift server. (If you choose no, you can register your public key on OpenShift Web Console.)
On uploading, the key alias name input is required. The default name is composed from your login e-mail address.
In my case below, the key name, which I’d already registered, was output.
At last, registered application name is shown.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
Your public SSH key must be uploaded to the OpenShift server to access code. Upload now? (yes|no) yes key_name (type: ssh-rsa) ---------------------- Fingerprint: aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa:aa 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. Provide a name for this key: |youremailcom| newkey Uploading key 'newkey' ... done Checking for git ... found git version 2.1.4 Checking common problems .. done Checking for a domain ... your_domain Checking for applications ... found 2 app1 http://app1-your_domain.rhcloud.com/ app2 http://app2-your_domain.rhcloud.com/ You are using 2 of 3 total gears The following gear sizes are available to you: small Your client tools are now configured. |