Developing and Hosting Web application with OpenShift online - Cloud service from redhat is very easy. In this post I am going to demonstrate how to setup/configure eclipse IDE to Develop and Host Web application with OpenShift.

We are going to do this in 4 parts(Click on the Images below to view it)

Sign up and Creating first Web application in OpenShift

Goto https://www.openshift.com/ and Sign up for an account.

Click on "MY APPS" and Login into your account or Click Here to Login.

and Login into your account or Click Here to Login. You will see page like this: "Create your first application now" .

. In next page you will see list of various application with which you can develop your application.

Click on the icon highlighted below to add it into your cart(Cart should contain the platform that you are goint to need in your Web application).

Next it will ask for public URL using which user can access your Website/WebApplication. then click on "Create application".

Click on "Not now, continue". Now you can add more Platform to application as shown below in image. you can also delete this application.

Mean while you can Click on "Appliation" tab above to see the list of your all application.

Setting up OR Configuring Eclipse IDE with OpenShift

Eclipse is an open source IDE(Integrated Development Environment). You can download it here:https://www.eclipse.org/downloads/

Now open Eclipse IDE and click Help > Install New Software..

Paste the following URL and Click Add.

http://download.jboss.org/jbosstools/updates/development/indigo/ ( for eclipse indigo version)

( for eclipse indigo version)

http://download.jboss.org/jbosstools/updates/development/juno/ ( for eclipse juno version)

( for eclipse juno version) This URL may change acording to your eclipse IDE version. Select Checkbox of "JBoss cloud development tools" and click next. Accept the terms and conditions and Click finish.

After installing plug -in it will restart your IDE.

Downloading/Pulling OpenShift web application into eclipse IDE

Now Click New > Other > OpenShift > Openshift appplication .

. It will ask for your username and password. enter your OpenShift account credential and Click Next.

Now you can Create a new Application here or you can Pull/Download your already created Application into Eclipse IDE.

Check "use exixting application" Checkbox and Click Browse button.

Checkbox and Click button. It will display list of all your Web application currently in your OpenShift account. Select any One and click Ok.

Click Next. Here you can create new project or use existing project. Again Click Next.

If this is first time, It might show that "C:\users\EXAMPLE\git does not exist" . Create git directory at given location(then click Back and then click Next again).

. Create git directory at given location(then click Back and then click Next again). It might show that "No public key found in your account......" to solve this click "SSH Key wizard".

Configuring SSH key for OpenShift in Eclipse

Now open comand prompt on your machine and enter "mkdir .ssh" command(just to create directory named ".ssh")

Click New . Then enter File the name for your key and click Ok . It will add SSH key to your application.

. Then enter File the name for your key and click . It will add SSH key to your application. Click Finish.

Now you will see you project in eclipse project explorer.After you change code, you have to commit and push it back to cloud.

Pusing/Uploading OpenShift Web application into cloud with Eclipse IDE.

Right click on your project > team > commit .

. Add commit message and click "commit and push".

Now web application has been uploaded to cloud and you can see the changes you have done.