Saturday, May 12, 2012

Getting Started with OpenShift Paas Cloud

Getting Started

Couldn't be easier, in a nutshell:
  1. Create an OpenShift account.
  2. Add your public key to the OpenShift website.
  3. Setup the OpenShift Eclipse plugin.
That is about it! Deploying couldn't be easier as well. When you sign up OpenShift (very nicely) creates you a free git repo. All you need to do to deploy to your server is to push your changes to your repo, it does the rest! All very easy and very nice.

Changing Your GIT Upstream

I don't really want to deploy with every push, so I push to an 'inbetween' repo. I then push to 'upstream' (my OpenShift repo) only when I want to deploy.

To add an extra repo in between, run from your GIT folder:
  1. git remote rename origin upstream
  2. git remote add origin git@github.com/{your-account/{your-repo-name}.git
  3. git push -u origin master
After that your OpenShift project will be in GitHub, and any future pushes to GitHub you can just use 'git push'.

Now, to deploy just use:
git push upstream

I hope this has helped someone out there...

No comments: