Micro Cloud Foundry for Spring Developers |
|

Today VMware team released Micro Cloud Foundry, a complete, local version of the popular, open source Platform as a Service that lets developers run a full featured cloud on their Mac or PC. Using Micro Cloud Foundry developers can build end-to-end cloud applications locally, without the hassles of configuring middleware while preserving the choice of where to deploy and the ability to scale their applications without changing a line of code.
Micro Cloud Foundry supports Spring and Java, of course, but also provides runtime environments for Scala, Node.js, and Ruby so that you can release your inner polyglot programmer! Micro Cloud Foundry also provides many services like MongoDB, MySQL, and Redis with come ready to use immediately without having to do extensive installation and configuration. With built-in dynamic DNS support, developers can run their Micro Cloud Foundry wherever they happen to be working – whether at home, office or coffee shop – without any reconfiguration required. After creating and testing your application on Micro Cloud Foundry, you can easily deploy your application without changes to www.cloudfoundry.com or other instances of Cloud Foundry – it enables true application portability across a range of cloud environments.
Micro Cloud Foundry is available as a free downloadable virtual machine image and is compatible with VMware Fusion for Mac OS X and VMware Workstation and VMware Player (available as a free download) for Linux and Windows computers. It provides easy installation, setup, and virtual machine management and all you need is a Cloud Foundry account to get started.
Getting Started with Spring and Micro Cloud Foundry
I’ve put together a video of the steps to obtain, install, configure and then deploy Spring applications to Micro Cloud Foundry.
In short, here are the five steps to get started with Micro Cloud Foundry for Spring Developers
- Follow the download and install instructions for Micro Cloud Foundry.
- Start up your copy of SpringSource Tool Suite and install the Cloud Foundry eclipse support. You can do this from the STS dashboard by selecting the Extension tab at the bottom. Find and install the Cloud Foundry Integration. It’s under the Server and Cloud section, but you can also just search for it using the Find: field. When the installation prompts you to restart, do so. You need only one Eclipse plugin to work with any Cloud Foundry provider, be it the hosted CloudFoundry.com, a local Micro Cloud Foundry, or any other implementation.
- Once STS has restarted, open the Servers panel. Right click on the Servers panel and select New > Server. In the Define a New Server window, find the Cloud Foundry server, under the VMware folder. The Cloud Foundry integration lets you treat the cloud as just another WTP applicaton server.
- Fill out the Host Name – which you should have gotten when you completed the configuration of the Micro Cloud Foundry instance in Step 1 – and the Server Name, which is just a descriptive, meaningful string.
- Cloud Foundry will prompt you to authenticate on first use. Enter your cloudfoundry.com account credentials (email and password) which you used when you registered. When asked to choose the type of URL select Local cloud and then fill out the unique part of the subdomain which you registered with cloudfoundry.com. Click Next to complete the installation
Adding Services
You can double click on the server instance to provision new services (including instances of MongoDB, Redis, MySQL, etc) and associate them to your applications. For the majority of cases, this should be sufficient to deploy your regular Spring applications. Micro Cloud Foundry is very smart. It’ll inspect your application and find in your Spring application context any objects that it has provisioned for you for your application. So, for example, if you’ve created a database javax.sql.DataSource in your Spring configuration, CF will detect that and try to dynamically connect it with a correctly configured MySQL DataSource bound to your application as a service. The same applies for the relevant Spring Data connection factories for Redis and MongoDB, for example.
If you’re using the imminent Spring 3.1 release, then you can take advantage of the profiles feature to conditionally enable certain bean definitions depending on the environment in which the definition is running. This feature, in tandem with the Spring <cloud:*/> namespace, gives you precise control over which provisioned service is used in the cases where there is a possible ambiguity (perhaps you’ve got two MySQL datasources associated with the same application). See Mark Fisher's earlier post on Cloud Foundry for Spring Developers.
And you’re done! Now, simply develop your application as you would normally but with all the power of having a cloud locally on your machine.
Similar Posts
- Using Micro Cloud Foundry from Grails
- Roo + Cloud Foundry = Productivity in the Cloud
- One-step deployment with Grails and Cloud Foundry
- Using Cloud Foundry from STS
- Cloud Foundry for Spring Developers





Peter De Winter says:
Added on September 6th, 2011 at 7:58 amSeems os x users are required to buy VMWare Fusion or is there an other alternative?
north face jackets discount says:
Added on September 9th, 2011 at 12:12 amthank you for your advese.
jbbarquero says:
Added on September 13th, 2011 at 5:36 pmHello,
It worked on OS X (Snow Leopard) using a trial version of VMWare Fusion.
However, it didn't worked on Windows where I used VMware player (free)
I didn't pay attention to the installation and I think something went wrong with the firewall (ESET Smart Security, but I presume it doesn't matter)
It seems VMware player can't reach internet. I don't know how to configure this program. I tried to allow it in the firewal (with a rule) to exchange data, I tried to configure the micro cloud foundry to work offline (vcap.me as identity, but the IP Address 127.0.0.1 appears with network offline)
The configuration of the micro cloud foundry was successful, but I can't establish a connection not with vmc (I installed it using RubyInstaller) nor with a cloud foundry server within STS.
Any help regarding this issue? Should I tried VMware Workstation instead of VMware Player?
Thanks.
Ahmed Kamal says:
Added on September 14th, 2011 at 7:29 amCloud foundry is indeed very interesting, probably once an open PaaS environment wins the minds and hearts of developers, IaaS will become less important as the real developer focus will be on PaaS. I work as the Ubuntu cloud community manager, and at Ubuntu we've done some really interesting work for deploying and managing Cloud Foundry on the cloud (and even physical servers) through a tool that we call ensemble (http://ensemble.ubuntu.com)
Checkout how to deploy manage and scale-up a multimachine cloud foundry deployment in 10 mins on ec2! Here is a very detailed article no how to get this done
http://cloud.ubuntu.com/2011/09/from-zero-to-drawbridge-via-ubuntu-server-ensemble-and-cloudfoundry-in-less-than-10-minutes/
jbbarquero says:
Added on September 14th, 2011 at 12:54 pmThanks Ahmed.
Is it mandatory to use Ubuntu server or the instructions above could work in Ubuntu desktop?
Ahmed Kamal says:
Added on September 14th, 2011 at 1:00 pmWell you don't even need to worry about it! You only say
ensemble deploy –repository . cloudfoundry-server
ensemble deploys the needed ubuntu AMI and configures all the magic …etc. I am saying, you do not need to "choose" a certain ubuntu image, however you "can" if you want to. Currently ensemble is solid to deploy to the ec2 cloud, however very shortly it will be able to deploy to your local laptop via LXC containers (if that's what you really meant by your question)
Oh and btw, ensemble has just (today) been renamed to "juju" so visit https://juju.ubuntu.com/
north face coats says:
Added on November 26th, 2011 at 9:20 amI've learn a few just right stuff here. Certainly price bookmarking for revisiting. I surprise how so much attempt you place to create this sort of excellent informative website.
Buy Windows 7 says:
Added on December 5th, 2011 at 4:50 pmHeya i am for the primary time here. I found this board and I find It truly useful & it helped me out much. I hope to offer one thing back and aid others such as you aided me.
Dana R Laine says:
Added on April 23rd, 2012 at 1:13 pmYes it works smoothly on OS X Leopard under VMWare or Parallels machines. Ubuntu really rocks!