Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect the version of CloudFoundry/Bluemix

I am trying to detect the version of Bluemix/Cloud Foundry. Is there a command I can use to do this?

cf -version tells you the version of the commandline interface, but not the version of the server you are "push"ing to.

thanks

anthony

like image 424
Anthony Kesterton Avatar asked Apr 15 '15 07:04

Anthony Kesterton


People also ask

What is the command to check the version in Cloud Foundry?

Use the cf curl command to determine version information. All Cloud Foundry targets expose an info endpoint, which prints the release name, build number, description, and various endpoints. Run cf curl /v2/info to see this information, and look for the "min_cli_version" .

Which cloud extension is hosted by Bluemix?

Services. A service is a cloud extension that is hosted by Bluemix. The service provides functionality that is ready-for-use by the app's running code.

How do I access IBM Cloud from command line?

Log in. Use the ibmcloud login command to log in. If you log in with a federated ID, use the --sso option to authenticate with a one time passcode. Or use the --apikey option to authenticate with an API key.

What does the IBM Cloud CF push command do?

Deploying apps by using the ibmcloud cf command When you deploy your apps to IBM Cloud from the command line interface, a buildpack provides the runtime environment that is appropriate for your app language and framework. You can also use the Delivery Pipeline service to deploy apps to IBM Cloud.


2 Answers

You can get the version of CloudFoundry that Bluemix is running on via the CloudFoundry info endpoint.

US South Datacenter - https://api.ng.bluemix.net/info (currently 226 as of this posting)

EU UK Datacenter - https://api.eu-gb.bluemix.net/info (currently 226 as of this posting)

AP Datacenter - https://api.au-syd.bluemix.net/info (currently 226 as of this posting)

AP Datacenter - https://api.eu-de.bluemix.net/info (currently 226 as of this posting)

The build is the bit of JSON you want.

{
"name": "Bluemix",
"build": "226004",
"support": "http://ibm.com",
"version": 2,
"description": "IBM Bluemix",
"authorization_endpoint": "https://login.ng.bluemix.net/UAALoginServerWAR",
"token_endpoint": "https://uaa.ng.bluemix.net",
"allow_debug": true
}
like image 164
Jeff Sloyer Avatar answered Oct 04 '22 07:10

Jeff Sloyer


You can use the command cf curl /v2/info to access Bluemix's Cloud Controller endpoint to get info about versions, etc. Here's the output I see at the moment:

$ cf curl /v2/info
{
   "name": "Bluemix",
   "build": "195008",
   "support": "http://ibm.com",
   "version": 2,
   "description": "IBM Bluemix",
   "authorization_endpoint": "https://login.ng.bluemix.net/UAALoginServerWAR",
   "token_endpoint": "https://uaa.ng.bluemix.net",
   "api_version": "2.19.0",
   "logging_endpoint": "wss://loggregator.ng.bluemix.net:443",
   "user": "<uuid>"
}

The build property's first three characters map to the version of Cloud Foundry in use. In this case, version 195, which corresponds to the versioned API doc here: http://apidocs.cloudfoundry.org/195/

like image 37
Patrick Mueller Avatar answered Oct 04 '22 08:10

Patrick Mueller