Skip to main content

Getting Rolling with Cloud Foundry PAAS

Getting familiar with a PAAS environment for even an experience Java developer can be pretty daunting.  First you need to select a PAAS and then you need to navigate through all of the documentation and try to figure out how to get rolling.  The next couple of posts will detail the steps I took to get rolling with Pivotal's http://pivotal.io Cloud Foundry (Community Edition) http://www.cloudfoundry.org/index.html PAAS.  You are familiar with what a PAAS actually is, you may want to spend a little bit of time reading up on PAAS before proceeding.

Part 1: Connecting To Your Cloud Foundry Instance

The first thing I did was install the Spring Tool Suite (STS) v3.6.3-SR1 https://spring.io/tools/sts/all on my MAC running Yosemite OS X 10.10.  Make sure you download and install the right version for your development system.

Note: Also a system requirement for STS 3.6.x was to have at least JDK7 running on your system.  I am currently running Java 8 update 40 on my MAC.  If you do not have at least Java 7 installed, install an appropriate version before proceeding. http://www.oracle.com/technetwork/java/javase/downloads/index.html

After installing the STS I ran into the known problem where the GateKeeper prevents you from running the non App Store downloaded application.  You need to go into System Preferences --> Security & Privacy and change to "Allow apps from anywhere".

The next step was to install the Cloud Foundry Plugin for Eclipse.  I figured the easy way to do this wast from the marketplace.  You navigate to Help -> Eclipse Marketplace from within STS.  You then enter Cloud Foundry into the search field and click search.  In the results panel find the "Cloud Foundry Integration for Eclipse" plugin.  At the current time the version for the plugin was 1.8.  Click the Install button, review the components of the plugin, accept licensing terms, and then wait for the plugin to install.  After the plugin install you will be required to restart STS.

Configure Connection

From within the "Server" View of STS, right mouse click and select New --> Server. From the dialog select Cloud Foundry.  Provide a name in the "Server Name" field and then click "Next".


On the next screen you will be asked for your Cloud Foundry account information.  If you do not have an account you will need to register for an account first at https://console.run.pivotal.io/register .
On the next dialog you will enter your account (email address) and password 


Once you enter your account and password, click the "Validate Account" to make sure everything is specified appropriately,  If it isn't, you will receive a corresponding validation error.  If it passes without error, you can then click "Next".  Your corresponding organization and spaces will be displayed to you.  Select the space you want to target (note: you may only have one space available) and can click "Finish" to wrap up the new server setup.  You may be prompted and informed that a new master password has been setup and asked if you want to provide more information in case you need to recover the master password.  I would suggest you indicate yes and then proceed to set up your security question / answer pairs.

Now at this point you should have successful configured a connection from STS to your cloud foundry instance.  The server should now appear in your server view within STS.  You are now ready to begin exploring the deployment of applications both locally to your Cloud Foundry instance.  I will cover deployment of a sample application in my next post.




Comments

Post a Comment

Popular posts from this blog

HTML5 Canvas nightmares with JSF

The last couple of days have been one of those 'why is this so difficult' moments. I essentially lost more than a day trying to figure out how to get HTML5 canvases to show up in one of our JSF applications. Here is the background on the stack: JBoss AS 7.2.0 JDK 1.7.x Seam (JSF Framework) v2.2.0 Richfaces v3.3.3 Essentially we wanted to introduce a canvas to our page in order to graphical represent a numeric value and where it falls upon its normal range and possible range of values.   The page was leveraging a <ui:include> in order to display the results section.  It was a common component used among multiple pages and therefore the reason being pulled in via an include.  A richfaces commandLink was being used to initiate an AJAX request that would pull back none, one or many results and re-render the display within a JSF panelGroup.   Canvas Background:  If you look at any of the examples of using HTML5 canvases, you generally will see the definitio

WSO2: Simple Pass through proxy (REST to REST with HTML Reply)

Today I set out on trying to set up a simple passthrough proxy that would allow for a GET request to be made to REST style backend services that replies with HTML content. The proxy services was being set up on WS02 ESB v4.8.0.  I thought this was really going to be as simple as walking though their wizard and setting up a new proxy endpoint that just handed off to the behinds the scene service. It was straight forward to set up the proxy, but then unfortunately when called it just didn't respond. It took quite awhile to figure out what the issues was.  At first I was using the ESB admin console and review the System and Application Logs.  The Application Logs were certainly more useful, but they still truncated stack traces which made it hard to clue in on the real issue. It wasn't until I went and review the logs on the server that I was able to detect the cause.   <wso2_esb_root>/repository/logs/wso2-esb-errors.log 2015-03-19 16:09:43,001 [-] [Pass

Where to start on AngularJS for Java Developer

Background: If you are a Java developer who is comfortable using Eclipse (JEE Developer version) you may be asking yourself where to start with AngularJS. There is all kinds of documentation out there in regards to AngularJS and https://angularjs.org/ provides, to the point, tutorials on how to get started. You can certainly go that route and use node.js embedded server and possibly a Javascript focused IDE like WebStorm. However I wanted to try and stay in a comfort zone, my comfort zone, of Eclipse and be in a position to deploy an Angular application to a container like Tomcat. This blog entry will present the trail I took to try and accomplish it. Note: This is an adventure into Angular 1.x, not 2.x.  I would imagine this could all work with 2.x as well as it is focused on the dev environment setup. Start: Well the one consistent thing you will find to get started is to install the AngularJS Plugin, provided by Angelo ZERR.  You can use the Eclipse 4.5 (Mars) plugin inst