Total Pageviews

Tuesday, 26 January 2016

成功上傳java版和nodejs版的snova程序到openshift空间

gem install rhc

rhc --version

::把目前的帳號登出:
rhc account logout
::登入新帳號:
rhc setup -l <your openshift account>


<your openshift password>
yes
yes

在網頁界面先創建domain。
然後:
========================================snova-c4-java-server-0.22.0.war/snova-0.22.0========================================
在網頁界面創建應用那裡選擇:
Tomcat 7 (JBoss EWS 2.0)
http://<app_name>-<domain>.rhcloud.com
Region:  aws-us-east-1  (默認地區不作更變)

創建成功後會顯示其ssh信息如:
ssh://************************@<app_name>-<domain>.rhcloud.com/~/git/<app_name>.git/

回到命令行:
git clone ssh://************************@<app_name>-<domain>.rhcloud.com/~/git/<app_name>.git/
yes (不一定需要)

cd <app_name>
然後複製文件【snova-c4-java-server-0.22.0.war】到【<app_name>\webapps】目錄下改名為【ROOT.war】。

========================================git config說明(不用複製進入命令行)========================================
如果不執行下面兩行:
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

則執行【git commit -m "deploy apjp"】命令時會顯示錯誤信息:

C:\Soft\_UL\APJP_REMOTE_JAVA-1.0.0\<app_name>>git commit -m "deploy apjp"

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got '*********************.(none)')
========================================git config說明(不用複製進入命令行)========================================

git rm -r src pom.xml
git add webapps/ROOT.war
git commit -m "deploy snova-c4-java-server-0.22.0"
git push

然後打開:
https://<app_name>-<domain>.rhcloud.com/index.html
成功!
========================================snova-c4-java-server-0.22.0.war/snova-0.22.0========================================
========================================snova-c4-nodejs-server-0.22.0.zip/gsnova_0.22.1_windows_386========================================
在網頁界面創建應用那裡選擇:
Node.js 0.10
http://<app_name>-<domain>.rhcloud.com
Region:  aws-us-east-1  (默認地區不作更變)

::創建成功後會顯示其ssh信息如:
ssh://************************@<app_name>-<domain>.rhcloud.com/~/git/<app_name>.git/

::回到命令行:
git clone ssh://************************@<app_name>-<domain>.rhcloud.com/~/git/<app_name>.git/
yes (不一定需要)

cd <app_name>
::然後複製文件夾【snova-c4-nodejs-server-0.22.0】內的所有文件到【<app_name>】目錄下。

git add .
git commit -m "deploy snova-c4-nodejs-server-0.22.0"
git push
========================================snova-c4-nodejs-server-0.22.0.zip/gsnova_0.22.1_windows_386========================================
========================================snova-c4(nodejs) v0.23.0 release\snova-c4-0.23.0.zip/gsnova_0.22.1_windows_386========================================
在網頁界面創建應用那裡選擇:
Node.js 0.10
http://<app_name>-<domain>.rhcloud.com
Region:  aws-us-east-1  (默認地區不作更變)

::創建成功後會顯示其ssh信息如:
ssh://************************@<app_name>-<domain>.rhcloud.com/~/git/<app_name>.git/

::回到命令行:
git clone ssh://************************@<app_name>-<domain>.rhcloud.com/~/git/<app_name>.git/
yes (不一定需要)

cd <app_name>
::然後複製文件夾【snova-c4-0.23.0\nodejs】內的所有文件到【<app_name>】目錄下。

git add .
git commit -m "deploy snova-c4(nodejs) v0.23.0 release"
git push
========================================snova-c4(nodejs) v0.23.0 release\snova-c4-0.23.0.zip/gsnova_0.22.1_windows_386========================================


客戶端的配置,自己添加,沒什麼其他額外的差錯需要折騰。

snova程序:
https://github.com/yinqiwen/snova-c4
https://github.com/yinqiwen/snova-c4/releases/tag/v0.23.0