Developing Cloud Foundry applications with Orion

Support for Cloud Foundry was originally introduced into Orion a couple of releases ago. In the latest Orion version (release 8.0) you might have noticed a few major changes to the feature.

Cloud Foundry integration was already fairly comprehensive. Orion provides ways to deploy applications as Cloud Foundry instances, to control their lifecycle, and to see logs. The focus in Orion release 8.0 was with the user experience related to Cloud Foundry - offering a fresher and hopefully simpler approach to working with the same rich features.

To begin working with Cloud Foundry, it is important to add the cloud URLs to the Settings page to configure a connection relationship. There are several options, Pivotal CF, HP Helion or IBM Bluemix (for a longer list see the Cloud Foundry wiki). For this article, I will use Bluemix for illustrative purposes. You will need to register first to use it.



Note: To quickly test Cloud Foundry support, you can create a project in OrionHub using a sample NodeJS app from GitHub https://github.com/szbra/NodeHelloWorld.git

A speedy way to try it out is by pushing the 'Deploy to Bluemix' button on the GitHub project page. It will conveniently deploy the app in the cloud, and setup a development environment for you. After which, you can click 'Edit Code' and you will be taken to the Orion-based WebIDE in Bluemix with the code already imported into your workspace. This is the power of the cloud!


The Run Bar is the most noticeable visible change, when you’re working with a project. It replaces the Deployment Info box from previous releases.



The Run Bar shows the state of apps deployed from the selected project. It offers lifecycle commands, links to logs and the running app using recognizable icons.

Launch configurations can be created from the Run Bar, and the name, url, and target for the application can all be set from there as well.





Each launch configuration can be now edited and deleted anytime.



Another useful new addition is the manifest editor, with syntax highlighting and content assist. An application manifest can be easily edited from it, or a new one can be created from scratch by clicking Ctrl + Space.



More advanced users can try Cloud Foundry commands directly from the Orion shell.



Cloud Foundry app development is even quicker and easier when you use Bluemix as your target platform. Try the tutorial at https://hub.jazz.net/tutorials/jazzeditor/ to see how to create a NodeJS app and configure a whole development environment including an Orion-based WebIDE in seconds.

An especially useful feature is Auto-Deploy. You can configure builds for all projects created in Bluemix. When any change is pushed to the repository linked with the project, a build is triggered and the updated application is automatically deployed to Cloud Foundry.

Bluemix also offers a fast, cutting edge approach for developing on the cloud with its Orion-based WebIDE, called Live Edit.


When live edit is enabled, all edits saved in the WebIDE workspace are immediately pushed to the running application instance. Your app is updated in seconds.

Please explore and try the great new Cloud Foundry support on OrionHub, or the enhanced version that’s part of Bluemix! We would love to hear your feedback: criticism, ideas, observations or praise! (Especially praise ;)

Contact us on the orion-dev mailing list, by entering bugs and enhancements in bugzilla, or on Twitter @orionhub.

Enjoy!

About the Authors

szymon brandys

Szymon Brandys
IBM