Search This Blog

Monday, 16 May 2016

IBM Bluemix Liberty Buildpack and Spring Boot Applications for "Auto-Scale" and "Monitoring" Services

Working with a customer last week we determined that Spring Boot applications using Liberty Buildpack failed to allow the "Auto-Scale" service to show up "Throughput" metrics and essentially mean we couldn't scale out or down application instances using Throughput metrics.

https://console.ng.bluemix.net/docs/runtimes/liberty/index.html

It turns out the Agent within the IBM Liberty buildpack isn't quite picking up application WAR files created using Spring Boot and hence "Monitoring and Analytics" and "Auto-Scale" service have limited functionality.

IBM Bluemix Services



To solve this we simply need to select the correct generated WAR file. Spring Boot along with Maven produces two WAR files as shown below when the application packaged as a WAR is packaged using "mvn package"

Eg:

-rw-r--r--   1 pasapicella  staff  12341953 13 May 14:17 demo-sb-war-0.0.1-SNAPSHOT.war.original
-rw-r--r--   1 pasapicella  staff  17229369 13 May 14:17 demo-sb-war-0.0.1-SNAPSHOT.war

The WAR file "demo-sb-war-0.0.1-SNAPSHOT.war.original" is the one that is originally generated using maven and it's this file which we should push to IBM Bluemix using the IBM Liberty buildpack
 
If there’s a Main-Class defined in the manifest it attempts to start it up using the war file, thats the WAR file "demo-sb-war-0.0.1-SNAPSHOT.war". Once you push the version of our war without the Main-Class Manifest entry defined "demo-sb-war-0.0.1-SNAPSHOT.war.original" everything starts up correctly and is now happily recording both throughput and monitoring. If the WAR has a Main-Class app, the buildpack will only install the JDK for the app, and the app embeds Tomcat (by default for Spring Boot), so essentially the app is running on Tomcat; if it's a WAR app without Main-Class manifest entry, the buildpack installs Liberty as well and the app will run on Liberty.

Simply push the correct WAR file and your Spring Boot WAR files using Liberty Buildpack can take advantage of the Liberty Buildpack agent for extra "Monitoring" and "Auto-Scale" service support.

Screen Shots for Monitoring and Analytics service with Spring Boot WAR file




To verify this you can use the Basic Spring Boot Application at the following URL. It simply exposes one REST end point service displaying "helloworld".

https://github.com/papicella/SpringBootWARDemo

Thursday, 12 May 2016

IBM Bluemix Dedicated/Local Status Page

With Bluemix Public you can view the status page which details all the runtimes and services and thier current status on all 3 PUBLIC regions. Those customers with Bluemix Dedicated or Local get a status page which includes a column on the status of thier Dedicated or Local instance.

To navigate to it perform the following steps:

1. Log into your Bluemix dedicated or local instance web console

2. Click on the Status link which is accessed through the profile icon on the top right hand corner


3. You will see a table as follows as well as status messages to indicate the current status of your own Bluemix Local or Dedicated Environment.



More Information

https://console.ng.bluemix.net/docs/admin/index.html#oc_status

Tuesday, 10 May 2016

Telstra SMS API Swagger Enabled and deployable on Bluemix Sydney Public Instance

The following demo below can be used to expose the Telstra SMS Public API https://dev.telstra.com/content/sms-api-0

https://github.com/papicella/TelstraSMSAPIPublic

You can deploy this to Bluemix by simply using the "Deploy to Bluemix" button as shown below.


Once deployed you have a Swagger UI enabled REST endpoints to consume as shown below.

Application once deployed on Bluemix


Swagger UI 



More Information

https://dev.telstra.com/content/sms-api-0
http://bluemix.net