Integrate OpenShift and Eclipse Che for faster development


Recent: Red Hat was invited to be part of Eclipse Che keynote at EclipseCon 2016 and Pete Muir gave a quick look at working with OpenShift and Eclipse Che.


 

When we create software todayDualityOfDevAndProd, we often hit a brick wall and waste many hours because creating copies of another system is far too hard. We create copies for many reasons – a few common examples are: replicating production issues; asking another developer for help; running test suites; copying the runtime (e.g. app server, web server, LAMP stack…); copying the development workspace; and sometimes both.

Linux containers provide the necessary encapsulation for both our application and its environment, giving us the ability to easily copy the runtime – something we have never had before. The concept of universal workspaces, championed by Eclipse Che, gives us the ability to easily replicate and distribute the entire development workspace. Red Hat and Codenvy have integrated Eclipse Che with OpenShift, providing an easy way to copy both our runtime, and our development workspace.

OpenShift 3 provides developers with a self-service platform for provisioning, building, and deploying containerized applications, while Eclipse Che provides universal workspaces which are on-demand, collaborative, and standardized; this includes both a workspace server and an integrated browser based IDE.

Walkthrough

When you open Eclipse Che, you can start coding from scratch or import your code from a git repo. The OpenShift menu within Che provides all the necessary tools needed to interact with the PaaS environment from within the IDE. Once you have authenticated with OpenShift, you are presented with the New Application dialog. Here you simply specify the OpenShift project name and the image to deploy.

 

Che-OS-deploy
Deploy your application to OpenShift via Eclipse Che

 

Che-OS-startbuild
Build logs are available within Che so you don’t even need to go to the OpenShift console to view them.

 

Che-OS-route
Once OpenShift finishes deploying your project, the URL is ready to connect you to your running application. This can be found in the Manager Configs dialog, under Route. It’s that simple to deploy your code to production.

 

There are many reasons to make re-deploy a running application. Most of us will deploy our app, go look at it, realize something missing, and need to make a change. This happens all the time when you create software and if you don’t catch the mistake in when coding or in test then you have a real problem.

Normally it would take a lot of time, process, and headaches to get a change pushed to prod. But no longer. Fix your mistake and commit and push the change. Then just tell OpenShift to start the build. OpenShift will pull in the latest commit and rebuild the image with your fix in place.

 

Che-OS_webhook
Starting a build

 

While that may feel like a breath of fresh air to devs (and ops!), we can automate deployment further. What if we could get OpenShift to deploy as soon we push our changes – this is where the real magic happens. Eclipse Che provides the web hooks needed that can be added to your Github repo, and with your repo configured, OpenShift automatically deploys whenever you push.

 

Che-OS-ArquillianCube
Openshift web console

What would a Cloud deployment be without scaling? Not only can you deploy from Che but you can also add new pods to scale up or remove pods to scale down.

Learn more

In summary, OpenShift and Eclipse Che offer you the ability create reproducible, consistent, and powerful environments and workspaces. Together, they make a potent combination that has the opportunity to revolutionize the way we create and run software.

To find more about Openshift 3, visit https://www.openshift.com/. To find out more about Eclipse Che visit http://www.eclipse.org/che/.

We always welcome contributions! Find OpenShift and Eclipse Che on github – https://github.com/openshift and https://github.com/eclipse/che.


This blog was also posted on blog.codenvy.com.


Join the Red Hat Developer Program (it’s free) and get access to related cheat sheets, books, and product downloads.


For more information about Red Hat OpenShift and other related topics, visit: OpenShift, OpenShift Online.

Share