New Cloud Foundry Client Tool -> CF

cf 1.0.0

Friendly command-line interface for Cloud Foundry Version 2 – a client-side tool that is identical to the existing vmc tool for Cloud Foundry Version 1. This is version two of the cloud foundry command line tool. We use it to tap into the second version of cloud foundry, known as V2. This tool requires cloud_controller_ng.

Picture 6

Go here: for install details – note that you will need a functioning ruby environment including the ‘gems’ feature of ruby. You can see if you have it by typing :


on your terminal command line. See this : Picture 5

from your terminal command line after successfully confirming gems is present, install the CF client tool, next:

gem install cf

I’ve also installed another piece of the puzzle to play with called ‘cfoundry’. You won’t need this, so just look in middle of this screenshot. Note that i had to use the super user prefix ‘sudo’ to get enough authority to proceed. sudo gem install cf

If you know anything about ruby Gems, this documentation may mean something to you :

See more details of mailing list and conversations here about Cloud Foundry NG (Next Generation) – V2 :

Am not quite clear on this yet but will post more later once i do some research on it. The NG version of Cloud Foundry will require name spaces and/or organizations as a component to uniquely identify an application. So to use the ‘CF‘ tool, we need additional parameters to log on to the remote server. More soon –

Properly installed, you might see your session look like this : Picture 2

Update :

Have found some new cloud foundry documentation reflecting the changes in work practices from version one. We have further details on the actual commands to be found in the new ‘CF’ tool – so look here.

An overview of the organization and spaces features can be found here. See this example :Diagram of Spaces and Organizations

We can use our new ‘CF’ tool to manage both these attributes. There also appear to be some programmable API interfaces we can use to create automated solutions to manage them. One of these is the Java client library (vcap-java-client). It’s to interact with a Cloud Foundry instance. This library is used by the Cloud Foundry Maven plugin, the Cloud Foundry Gradle plugin, the Cloud Foundry STS integration, and other Java-based tools. Cool. Ruby versions are also there. It all appears to hinge on the use of RESTful API connections.


Since i use gradle as a build tool, i like this plugin to give my gradle build a connection to a remote Cloud Foundry server. See more on the plugin for gradle here: with nice examples. Hope to blog on this a bit more once i get a spell of time for some research.  MORE:-> spent several hours trying to get this gradle plugin to work, or at least load/resolve the proper location for it – to no avail. So either it has moved, or  more likely, i do not understand how to properly declare maven repository addresses. There are other plugins for gradle to reach Cloud Foundry, so will look again once i have more time.

buildscript {
  repositories {
    maven { url "" }
  dependencies {
    classpath group: 'org.gradle.api.plugins', name: 'gradle-cf-plugin', version: '0.2.0'

apply plugin: 'cloudfoundry'

cloudfoundry {
  username = ''
  password = 'mypassword'
  application = 'test_grails_app'
  framework = 'grails'
  file = new File('/path/to/app.war')
  uris = ['']

when i ran a further test as: gradlew check –info

i could see more debug messages, one of which reported that my local java install had a logical link pointing to a no-longer-existing cacerts security file. Fortunately, i have a good working java JDK on my apple macBook and was able to copy this cacerts file back to my iMac in place of the logical link. Now everything is cool and i can again change my build.gradle version forward to the later 1.6 version. Then, the ivy module can quite happily harvest dependencies from maven and ivy repositories ! Bon Chance !

Leave a Reply

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

You are commenting using your 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