Deploy an application on AppFog using Cloudfoundry vmc tool or Maven plugin

AppFog is a simple Cloud Platform for web applications. It’s built on Cloud Foundry, the Open Platform as a Service Project. Like the Cloud Foundry command-line interface (known as ‘vmc’), AppFog offers a CLI tool, ‘af’ based on CloudFoundry’s ‘vmc’ but includes features specific to AppFog and has the default target set to AppFog’s service.

But if you want to use ‘vmc’ with the AppFog Service or the Cloudfoundry Maven plugin, you will be rejected when creating your application with something like: Error 701: The URIs: “your app name” have already been taken or reserved.

This is because AppFog need to know your choosen underlying infrastructure in this list:

  • AWS US East – Virginia
  • AWS EU West – Ireland
  • AWS Asia SE – Singapore
  • Rackspace AZ 1 – Dallas
  • HP AZ 2 – Las Vegas
  • MS Azure AZ 1 – San Antonio

This can be done with the –infra parameters, but this is only available for the ‘af’ CLI tool, not for ‘vmc’.

Then, instead of specify your application deployed url with as target base, you have to choose the right target base for your infrastructure:

  • AWS US East – Virginia ->
  • AWS EU West – Ireland ->
  • AWS Asia SE – Singapore ->
  • Rackspace AZ 1 – Dallas ->
  • HP AZ 2 – Las Vegas ->

You will get for instance for AWS US East in the command line style:

vincentdevillers@alienware: vmc push

Would you like to deploy from the current directory?

Application Name: my-little-blog
Detected a Standalone Application, is this correct? [Yn]:
1: java
2: node04
3: node06
4: node08
5: php
6: python2
7: ruby18
8: ruby192
9: ruby193
Select Runtime [java]:
Selected java
Start Command: bin/
Application Deployed URL [None]:
Memory reservation (128M, 256M, 512M, 1G, 2G) [512M]: 2G
How many instances? [1]:
Create services to bind to 'my-little-blog'? [yN]:
Would you like to save this configuration? [yN]:
Creating Application: OK
Uploading Application:
  Checking for available resources: OK
  Processing resources: OK
  Packing application: OK
  Uploading (11M): OK
Push Status: OKStaging Application 'my-little-blog': OK
Starting Application 'my-little-blog': OK

And for your Maven plugin, you will have for instance, for AWS US East again:


That’s all!

More infos here:

Related Posts

Leave a comment

About privacy:

This site uses Akismet to reduce spam. Learn how your comment data is processed.