OpenShift では rhc setup
というコマンドが使えます。 このコマンド、実際にはなにをやってくれるのでしょうか。 やってみました。
環境
ruby 2.0.0p647
rhc 1.38.4
rhc setup
を実行すると、 順次 次のような出力が出ます。
ログイン
まずはログインするよう促されます。
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 : * * * * * * * *
認証トークン作成
パスワードの入力なしにサーバにアクセスするためのトークンを作成するか尋ねられます。 このトークンは rhc logout
で削除できます。
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
SSH キー 作成
OpenShift に SSH 接続 をするときのための SSH キー が作成されます。
No SSH keys were found . We will generate a pair of keys for you .
Created : / home / you / .ssh / id_rsa .pub
公開鍵アップロード
そして OpenShift サーバ に公開鍵をアップロードするかを聞かれます。 (no を選択した場合は、 OpenShift の Web Console から登録することになります。)
アップロード時にはキーの名前の入力が求められます。 デフォルト値はログイン時のメールアドレスから生成されます。
ここでは既にひとつ鍵がアップロードされていたため、 登録済みのキー (Fingerprint ) が 表示されています。
最後に登録されているアプリケーションが表示されます。
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 .
投稿ナビゲーション
A Life Summary of an Gypsy