Created: Oct, 2015
Last modified: Oct, 2015
The basic idea is quite simple: there will be a private git repository on Openshift that the local client to push to. A “git push” from the local to Openshift will trigger the deployment of the new code.
sudo gem install rhc
if setting up Openshift client for the first time.
rhc create-app vidzy nodejs-0.10
where “vidzy” is the app name on Openshift. It will create a remote git repository called “vidzy” on Openshift which is subsequently cloned to local computer with the same name. For future reference, do
rhc show-app vidzy
to show the app information.
rhc cartridge add mongodb-2.4 -a vidzy
which means adding a MongoDB (version 2.4) database service to the app named “vidzy” on Openshift. There will be credential information in the output. Write it down.
It is also helpful to administrate the database via web interface. Openshift provides RockMongo cartridge to do this after the MongoDB cartridge is installed:
rhc cartridge add rockmongo -a vidzy
After that the database can be adminstrated via link http://appname-domainname.rhcloud.com/rockmongo.
git remote add github email@example.com:username/repo_name.git
But before doing any work, fetch and merge the code on Github with the local branch first so they have the same starting point. Also see this post for related discussion.
rhc tail -a vidzy