Forums/Knowledge Bases/Micro Cloud Foundry Knowledge Base

Introduction to Using Micro Cloud Foundry with Spring STS

Dave McCrory
posted this on August 04, 2011 08:04

Prerequisites

Spring STS has been downloaded and installed.

The Micro Cloud Foundry VM has been configured and is powered on.

VMC command line instructions can be found here

Default Micro Cloud Foundry resource limitations can be found here

Installing the Cloud Foundry Plugin for Spring STS

Start Spring STS and click on the Extensions Tab

STS-ExtensionsTab.png

Scroll down and select Cloud Foundry Integration, then click Install

STS-CloudFoundryIntegration.png

An Install window will open, click Next and click Next again

STS-CFI-Installer-1.png

You must then accept the License Agreement to continue, then click Finish

STS-CFI-Installer-2.png

The Install will finish and you will be asked to restart Spring STS, choose Yes

STS-Restart.png

After Spring STS restarts, go to the Servers tab, right click and select New, Server

STS-New-Server.png

The New Server Dialog will be displayed, select VMware, Cloud Foundry

Click Next

STS-VMW-CF.png

The Cloud Foundry Account information will be displayed.  Select Microcloud

from the URL drop down.

STS-Micro.png

The Create Microcloud Target Dialog will be displayed, the value entered

should match the DNS name that the Micro Cloud Foundry instances is pointed to.

In the example below it is demo

After entering demo, click Ok

STS-CreateNameMicro.png

If you have not logged into Micro Cloud Foundry and  registered an account 

during the Micro Cloud Foundry installation, you will need to do this first.

Next enter the credentials created into the Account Information dialog and

click Validate. This ensures that you can authenticate to the Micro Cloud Foundry

Instance.

STS-MC-Credentials.png

After your credentials successfully validate, click Finish

STS-CredentialsValid.png

If you would like to change your Password follow these directions, otherwise

you can skip to the next section.

To Change your password, first go to the Servers Tab and double click

VMware Cloud Foundry

STS-ServerTab.png

The VMware Cloud Foundry Overview screen will be show, choose the

Change Password button.

STS-ChangePWButton.png

The Change Password dialog will be displayed, Enter the New Password, 

Verify the New Password and click OK

STS-ChangePW.png

The password has now been changed

Deploying an Application to Micro Cloud Foundry from Spring STS

In the Spring STS Dashboard tab, choose Spring Template Project

STS-SprintTemplate.png

Under Template Selection choose Spring MVC Project, click Next

STS-MVCTemplate.png

Under Project Settings, Create a project name (MicroCloudFoundry in the example)

and specify a top-level package (me.cloudfoundry.demo.mcf in the example)

then click Finish

STS-ProjectSettings.png

Under Package Explorer, there is now Package matching the project name entered

(MicroCloudFoundry in this example)

Drag the package down to the VMware Cloud Foundry Server

STS-Drag1.png

STS-Drag2.png

The Application dialog will now be displayed, click Next

STS-AppDetails.png

Make note of the Deployed URL and Click Finish

LaunchDeployment.png

The VMware Cloud Foundry tab will be displayed and the Application started

CloudFoundryTab.png

Start the STS Browser or a Web Browser and go to the deployed URL

( http://microcloudfoundry.demo.cloudfoundry.me in this example)

STS-HelloWorld.png

To create a more complex example using all of  the current services inside of Micro Cloud Foundry

follow these directions.


 
Topic is closed for comments