ActiveBlog

Using Eclipse STS with Stackato
by Graham Stuart

Graham Stuart, November 8, 2011

Last week, we decided to take SpringSource Tool Suite (STS) for a spin with Stackato. The point was to try a tool engineered for a standard version of Cloud Foundry with our variant, and make sure our version hadn't lost the ability to work with STS.

As an added wrinkle, our tester (yours truly) is not a regular Eclipse user. Presumably, if I could make STS Integration work, then the process wasn't excessively complex.

So how compatible is VMWare's STS tool with Stackato, and how was the experience?

Getting it installed

I started with Ubuntu 10.04 LTS. The first order of business was to install and configure the latest Stackato client to test basic operations with the Stackato server.

http://docs.stackato.com/quick-start.html#command-line-client

I ran “stackato target” to point the client to a running v5.2 Server on our network and logged in. Then I pulled down the code for some of our demos from the git repository:

http://community.activestate.com/stackato/demos#java
https://github.com/ActiveState/stackato-samples/tree/master/java/hello-spring-mysql

To test I had everything configured, I pushed the node.js ENV app from the Stackato client. Once I had Stackato working, I installed STS 2.8.0. This went very smoothly.

Getting the integration working

I followed a springsource blog post on the setup here:

http://blog.springsource.com/2011/04/13/using-cloud-foundry-from-sts/

As that post describes, there's a choice of ways to get the Cloud Foundry plugin. I went to the Eclipse Dashboard Extensions tab. It took a few moments to complete the listing on my system. When that completed, I scrolled down to the Server and Clouds section, and selected “Cloud Foundry Integration”, then clicked the Install button.

(Click image below for larger version).

Then I found the Servers view, and added New|Server|VMware|Cloud Foundry. When STS gave me the URL drop-down box, I gave it the same URL which I gave to the “stackato target” command earlier, and when STS prompted for Account Information, I gave it the same email and password I used when I logged into Stackato.

STS added the Server, and in the view, I could right away see the node.js ENV app I had pushed live earlier.

Some quick experimentation lead me to the application panel, and I found I could activate and deactivate the app from there, just as I could stop and start it from the Stackato command line.

Push a new application

I already had a known good spring demo for Stackato, so I set out to convert the Stackato demo to an Eclipse project. This turned out to be the most challenging part of the whole process, mostly due to rookie mistakes. I converted the demo into the wrong kind of project several times, before I found this video clip:

http://www.youtube.com/watch?v=XcI-2V-mmmw&noredirect=1

which tipped me that the demo had to be converted into a Spring MVC project. I had to open the STS Template project menu, and selected the Spring MVC template. Since I didn't have that template by default, STS installed it for me.

I was then able to create a new project with the Spring MVC template, and imported the files from the existing demo to supply the code. After that, I was able to drag the project onto the icon for the Cloud Foundry Server, and STS took care of the push.

(Click image below for larger version).


 

Summary

STS works with Stackato as easily as it works with Cloud Foundry.

Try it for yourself in the Stackato Open Beta!

Subscribe to ActiveState Blogs by Email

Share this post:

Category: stackato
About the Author: RSS

Graham Stuart is a technical support rep for our enterprise dynamic language distributions for ActivePerl, ActivePython, and ActiveTcl. Before joining ActiveState, Graham worked in telecommunications with Tekmark Global Solutions, Nortel Networks, and Prism Systems. Graham holds a B.Sc. in Physics from the University of Alberta.