tmp
Tuesday, September 22, 2015
OpenShift Client Tools (RHC)
###install rhc ```bash $ sudo gem install rhc ``` ###setup ```bash rhc setup ``` ###アプリの情報を参照 ```bash $ rhc app show
appname @ http://appname-fiahfy.rhcloud.com/ (uuid: xxxxx) ----------------------------------------------------------------------------- Domain: fiahfy Created: Sep 21 9:49 PM Gears: 1 (defaults to small) Git URL: ssh://xxxxx@appname-fiahfy.rhcloud.com/~/git/lovaapi.git/ SSH: xxxxx@appname-fiahfy.rhcloud.com Deployment: auto (on git push) nodejs-0.10 (Node.js 0.10) -------------------------- Gears: Located with mongodb-2.4, rockmongo-1.1 mongodb-2.4 (MongoDB 2.4) ------------------------- Gears: Located with nodejs-0.10, rockmongo-1.1 Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/ Database Name: appname Password: yyyyy Username: zzzzz rockmongo-1.1 (RockMongo 1.1) ----------------------------- Gears: Located with nodejs-0.10, mongodb-2.4 Connection URL: https://appname-fiahfy.rhcloud.com/rockmongo/ ``` ###ストレージ占有率確認 ```bash $ rhc app show
--gears quota Gear Cartridges Used Limit ------------------------ ------------------------------------- ------ ----- xxxxxxxxxxxxxxxxxxxxxxxxxxxx nodejs-0.10 mongodb-2.4 rockmongo-1.1 0.8 GB 1 GB ``` ###アプリのあるサーバにログイン ```bash $ ssh xxxxx@appname-fiahfy.rhcloud.com # rhc app show の SSH の項目 ``` ###アプリのポートフォワード ```bash $ rhc port-forward
Checking available ports ... done Forwarding ports ... Address already in use - bind(2) for "127.0.0.1" port 8080 while forwarding port 8080. Trying local port 8081 To connect to a service running on OpenShift, use the Local address Service Local OpenShift ------- --------------- ---- ----------------- httpd 127.0.0.1:8080 => 127.7.248.3:8080 mongodb 127.0.0.1:27017 => 127.7.248.2:27017 node 127.0.0.1:8081 => 127.7.248.1:8080 Press CTRL-C to terminate port forwarding ``` ##参考 *
*
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment