Usability - Productivity - Business - The web - Singapore & Twins

There's a plug-in for that! Getting started with Cloud Foundry plug-ins

Since IBM Bluemix is build on top of Cloud Foundry, all the knowhow and tooling available for the later can be used in Bluemix too.
One of the tools I'm fond of is the Cloud Foundry command line cf. The tool is a thin veneer over the Cloud Foundry REST API and is written in GO. "Thin veneer" is a slight understatement, since the cf command line is powerful, convenient and - icing on the cake - extensible.
A list of current plug-ins can be found in the CF Plug-in directory. Now the installation instructions haven't kept up with the cf releases, so here are the steps you need:
  1. Head to the CF Command Line release page and make sure you have the latest release installed.
    At time of this writing that would be 6.12.2
  2. Add the community repository to your installation using this command:
    cf add-plugin-repo CF-Community http://plugins.cloudfoundry.org/
    This command is only available in cf versions > 6.10. A lot of blog entries or even the github documentation suggest downloads or even golang installs. With the availability of the repository these steps are no longer necessary (but you are free to use them)
  3. Now listing all available plug-ins is as simple as cf repo-plugins
  4. To install a specific plug-in you issue the command:
    cf install-plugin '[name of plugin as listed]' -r CF-Community
    If the name doesn't contain white space, the quotes can be omitted
  5. After installation cf help provides the short instructions on how to use the modules
The interesting question now is, what are the plug-ins worthwhile looking at.There are a number of them I found quite useful, in no specific order:
  • cf stack-list
    shows all applications on the older lucid64 stack, so you know which one to upgrade
  • cf stack-change
    allows you to upgrade the running stack to the latest version. Bluemix is build on Ubuntu and was upgraded from 10.4 LTS to 14.4 LTS. Since we don't touch configured and running instances, older components might still use a 10.4 stack. The command sorts that out. You can limit that to an organisation or space
  • cf buildpack-usage
    shows the use of all buildpacks across organisations. Helps to understand how many versions of a buildpack are actually in use, so you can plan your upgrade
  • cf download [appname]
    downloads all files deployed in an application. Good to recover an application that 'got lost' - of course only if you have an interpreted language or your jars included the source files
  • cf stats [appname]
    displays live statistics about an application. Using the --debug --full parameters prints them out as JSON for further processing
  • cf autopilot
    zero downtime deploy plugin for cf applications
Even without plug-ins the cf command line is very useful, but that's another story for another time. As ususal YMMV

Posted by on 24 August 2015 | Comments (0) | categories: Bluemix


  1. No comments yet, be the first to comment