First Steps with Micro Cloud Foundry

Micro Cloud Foundry is a complete Cloud Foundry installation shipped in a ready to use Virtual Machine.

With Micro Cloud Foundry you can work locally in your applications and test how they work integratedly with Cloud Foundry services.

Using Micro Cloud Foundry during development is highly recommended for any serious work. It is not practical to have multiple people working on the same application and constantly deploying to the same public or private Cloud Foundry instance (e.g. hosted in Amazon EC2 or hosted in a VMware vSphere environment). Instead, developers would use local Micro Cloud Foundry instances for build and test and then a dedicated Micro Cloud Foundry or Cloud Foundry instance for integration testing.

In this post I will show how to get, configure and start to work with Micro Cloud Foundry.

How to Obtain a Micro Cloud Foundry

Micro Cloud Foundry instances are free but their distribution is controlled. The process starts by applying for a Micro Cloud Foundry instance at:

http://cloudfoundry.com/micro

You  will need to provide a unique domain name in the form:

<my-domain>.cloudfoundry.me

If the name for the domain is available, you will get it assigned to your account along with a configuration token that will be needed to configure the Micro Cloud Foundry instance.

Configuring Micro Cloud Foundry

Next step is to download Micro Cloud Foundry and start it.

Micro Cloud Foundry comes ready to be used with VMware products but can be used as well with other virtualization tools. In my case I prefer to work with Oracle VirtualBox, so I just created a new empty VM with these settings:

  • OS Ubuntu 64-bits
  • 1 GB RAM
  • 2 CPU
  • Bridged Adapter (Intel/PRO 1000 MT Desktop)

Then, attach the Micro Cloud Foundry hard disk from the downloaded file (it has the VMDK extension) to the VM and start it. After a few seconds, Micro Cloud Foundry will show its configuration screen.

Configuration steps are:

  • Select 1 to start configuration
  • Enter the administrator password twice (it will be assigned to the “root” and “vcap” users in the underlying Ubuntu)
  • Select 1 to configure DHCP
  • Enter the proxy configuration (if needed)
  • Enter the configuration token that you received a moment ago to confirm the domain name

After finishing configuration, DNS settings are propagated. DNS settings are needed for the clients to connect to this Micro Cloud Foundry instance.

Pay attention if using NAT and also to firewall software because the clients may not be able to connect to Micro Cloud Foundry. Also pay attention to DHCP’s with short lease time. If the instance IP is changing too quickly, DNS settings may not get properly updated.

After DNS finishes, Micro Cloud Foundry individual services are installed and started. Ready to go!

If you feel curious, issuing a ’12’ command into Micro Cloud Foundry console will allow you access to the underlying Ubuntu server. Lots of possibilities in there, right?

Deployment to Micro Cloud Foundry

Deployment process to Micro Cloud Foundry mirrors the process for the public Cloud Foundry instance. The only real difference is in the target API:

>vmc target http://api.sdcassets.cloudfoundry.me
>vmc register
>vmc login
>vmc create-service mysql vmcfirst-db
>vmc push vmcfirst

The ‘register’ command is needed because we are not a registered user in this Micro Cloud Foundry instance. We may register as many users as needed in our instance.

The process can be done using the Eclipse plug-in as shown in my previous post for the public Cloud Foundry instance here.

If using the command line, remember to issue the push command from the directory where you have your exploded WAR, for example as generated by Maven package goal.

In a few seconds, the application should be up and running in your Micro Cloud Foundry. Enjoy!

Conclusion

As easy as it gets. All the power of the Cloud Foundry platform at your hands to play with.

With Micro Cloud Foundry, you can successfully build a development team targeting Cloud Foundry. Privacy and security concerns relax as you may have it running concealed in your own premises or just live in your PC.

It’s so easy that is hard to say ‘no’ and don’t give it a try. What are you waiting for? Chuck Norris’ “I-approve-this-cloud” ad?

Author: deors

senior technology architect in accenture, with a passion for technology related stuff, celtic music and the best sci-fi, among other thousand things!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s