Working Offline with Micro Cloud Foundry

September 8, 2011 Cloud Foundry

featured-cf-genericWhile the Micro Cloud Foundry documentation states that you can use its built-in dynamic DNS capabilities to connect to their Cloud Foundry instances from any online environment, it’s possible to use Micro Cloud Foundry in offline mode if you need to work without an internet connection in just a few steps.

First you need to configure the Micro Cloud Foundry VM to use NAT instead of the default bridged mode.

In the Micro Cloud Foundry console, select option 4 and enter ‘’ when it asks you for the token, which will configure it to use the domain that resolves to

It will take a a couple of minutes for the controller to reconfigure the Micro Cloud Foundry VM to use the domain.

Once it is done, the console will display the new domain and admin info on the screen.

After the update is complete, you will need to make some changes on your local system. What you will need to do is to set up an SSH tunnel to access your Micro Cloud Foundry VM (note that you will need to supply the IP address in the command below with the actual IP of your VM, which is displayed in the console).

sudo ssh -L 80: vcap@
vcap@'s password:Â

The first password being prompted is the sudo password for your machine, as it is needed to open port 80 which requires root privileges. The second password is the vcap user password which you entered during the initial configuration of your Micro Cloud Foundry.

When you are working offline, your laptop cannot do a remote DNS lookup for the * domain to return, so you will need to edit your local hosts file and add some entries:  localhost

You will also need one entry per application you deploy into the micro cloud.  For example, if your application is called “foo”, you need to add the following line:

Once you have finished adding the domain name entries, you are ready to use vmc to interact with your instance..

martin@vaccine$ vmc target
Succesfully targeted to []

martin@vaccine$ vmc register --email
Password: *****
Verify Password: *****
Creating New User: OK
Successfully logged into []

martin@vaccine$ vmc push foo -n
Creating Application: OK
Uploading Application:
  Checking for available resources: OK
  Packing application: OK
  Uploading (0K): OK
Push Status: OK
Staging Application: OK
Starting Application: OK

martin@vaccine$ curl
<h1>Hello from the Micro Cloud! via:</h1> 

We are working to streamline these steps even more to make working with Micro Cloud Foundry simple in both online and offline scenarios. So stay tuned!

  • The Cloud Foundry Team

About the Author


More Content by Cloud Foundry
New Tech Talk: MongoDB Redux
New Tech Talk: MongoDB Redux

Chris Westin, a mongoDB developer from 10gen, discusses more in-depth uses of mongoDB, reveals some of the ...

The Last Lean Startup Bundle by Eric Ries – with Pivotal Tracker!
The Last Lean Startup Bundle by Eric Ries – with Pivotal Tracker!

If you're involved in a startup, you've probably already discovered the transformative Lean Startup movemen...

Enter curious. Exit smarter.

Register Now