Pivotal Cloud Foundry (PCF) provides a REST API to provide billing/metering data for application and service usage. Although this usage can we viewed in the applications manager dashboard UI in this post below we will show how to use the REST based API using PCF 1.7.
Below we will show how to use the cf CLI to retrieve information about your app and service instances via the Cloud Controller and Usage service APIs.Obtain (more...)
In this example I am going to show how to use IntelliJ IDEA 15 to create a service application from the IDE to be consumed by the Service Registry service in Pivotal Cloud Foundry (PCF). For more information on this service view the docs page below.http://docs.pivotal.io/spring-cloud-services/service-registry/index.html
Service Registry for Pivotal Cloud Foundry® (PCF) provides your applications with an implementation of the Service Discovery pattern, one of the key tenets of a (more...)
I created the following demo for PCF using spring boot / PCF. After showing a colleague he decided he would write a Kotlin version of the same application. It's interesting to see how the Kotlin classes differ to those of Java.https://github.com/papicella/PivotalSpringBootJPA
The Kotlin version of the same application is here.https://github.com/papicella/Kotlin-PivotalSpringBootJPA
Kotlin is a functional language developed by the JetBrains guys. Its main benefits are:
- Conciseness of code
- Code safety - Null (more...)
Apigee and Pivotal partnered to provide comprehensive API management capabilities that expedite the scalable delivery of apps on the powerful Pivotal Cloud Foundry platform. Apigee Edge is available for rapid deployment as a partner service in the Pivotal Network
The following link talks about this service in detailhttp://apigee.com/about/solutions/pivotal-cloud-foundry-apigee
In this blog post we walk through how we would use this Service on Pivotal Cloud Foundry 1.7 to expose Telstra SMS Api.
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 " (more...)
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 (more...)
The following demo below can be used to expose the Telstra SMS Public API https://dev.telstra.com/content/sms-api-0https://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 BluemixSwagger UI More Informationhttps://dev.telstra.com/content/sms-api-0http://bluemix.net
OpenWhisk is a new event-driven platform that lets developers quickly and easily build feature-rich apps that automatically trigger responses to events. To read more about it view the link below. In this simple example we will explore it it's use from IBM Bluemix by returning Todays date.https://developer.ibm.com/open/openwhisk/Steps
1. Login to Bluemix using http://bluemix.net
2. Click on "Try OpenWhisk
" as shown below
3. Once logged in to the new (more...)
I almost always use the tomcat buildpack within IBM Bluemix for my Java based applications. By default IBM bluemix will use the IBM Liberty buildpack for java apps unless you specify otherwise. The buildpacks on Bluemix can be viewed using "cf buildpacks
" and the tomcat buildpack is referred to as "java_buildpack
So to use the tomcat buildpack in a manifest.yml you would target it as follows
- name: pas-javaapp (more...)
In this example I integrate Twitter Feed with Telstra SMS API to send an SMS based. It is based on the wrapper application which exposes the Telstra SMS API on Bluemix as per a previous Post.http://theblasfrompas.blogspot.com.au/2015/08/integrating-telstra-public-sms-api-into.html
It is assumed you have NodeRed NodeJS application running on Bluemix and are at the Editor as shown below.Steps
1. Drag a "Social -> Twitter
" node onto the editor
2. Double (more...)
We recently announced a seperate CLI for Bluemix known as "Bluemix CLI". You can find out more about it at the following link
The Bluemix command line interface (CLI) provides a set of commands that are grouped by namespace for users to interact with Bluemix. Some Bluemix CLI commands, which are called bx commands, are wrappers of existing cf commands, and others are unique for Bluemix. The information that follows (more...)
The ability to view usage data from a billing perspective on IBM Bluemix Public is available as a REST based API. To use it follow the steps below.
In order to use the API you have to have the Billing Manager Role or be the Account Owner of the organization as shown below.Steps
1. Log into the PUBLIC Bluemix region as shown belowpasapicella@Pas-MacBook-Pro:~$ cf login -u email@example.com -p ***** -o pasapi@au1. (more...)
I needed a community based plugin recently and this is how you would add it to your CF CLI interface.
1. Add Community based REPO as shown below$ cf add-plugin-repo community http://plugins.cfapps.io/
2. Check available plugins from REPO added abovepasapicella@Pas-MacBook-Pro:~/ibm$ cf repo-plugins community
Getting plugins from all repositories ...
name version description
Download Droplet 1.0.0 Download droplets to your local machine
Firehose Plugin 0.8.0 This plugin (more...)
I rarely need to save state within the Servlet Context via an application scope, but recently I did and here is what your controller class would look like to get access to the ServletConext with Spring. I was using Spring Boot 1.3.2.RELEASE.
In short you implement the "org.springframework.web.context.ServletContextAware
" interface as shown below. In this example we retrieve an application scope attribute.
There is now a new command line plugin for IBM containers on Bluemix so you can push and run docker images using CF CLI itself. The steps below show you how to set this up and I use a basic spring boot application as a docker image to test this out.Steps
Take a note of the docker local host IP. In this example it was as follows, as I test my docker image on (more...)
I previously blogged about using the IBM Bluemix Secure Gateway Service as followshttp://theblasfrompas.blogspot.com.au/2015/11/ibm-bluemix-secure-gateway-service-step.html
I decided I would extend on this and Connect a Spring Boot Application to Oracle and consume Oracle data using the Secure Gateway Service.
The full demo is as followshttps://dl.dropboxusercontent.com/u/15829935/bluemix-docs/secure-gateway-oracle/index.html
I created this simple step by step guide on how to use the IBM Secure Gateway Service. Very simple demo which shows how easy it is to set this up and open a world of possibilities from on premise resources directly exposed via Bluemix whether it's PUBLIC or Dedicated/LOcal Instanceshttps://dl.dropboxusercontent.com/u/15829935/bluemix-docs/secure-gateway/index.html
The IBM Bluemix Dedicated/Local Administration Console also includes support for CLI to enable common management tasks to be performed using the Cloud Foundry Command Line by adding a plugin to enable support for it's commands.Note: The Bluemix Admin CLI plugin requires version 6.11.2 or later.Admin Console UIAdmin Console - Installing Command Line
The CLI to the admin console is installed as follows. The reference to this is found in your (more...)
I decided to take the Spring Security demo at the following link , and add Bootstrap to it. In the end it's basically the same code and the Form Based Login will accept one user "pas/welcome1
Here is the updated demo with Bootstrap added to the UI pages. You can deploy this to Bluemix using the "Deploy to Bluemix
" directly from GitHub and it will as you to Sing (more...)
I decided to take the Elasticsearch repositories as part of the Spring Data project a test drive. The Spring boot Elasticsearch repositories are described in the link below.http://docs.spring.io/spring-data/elasticsearch/docs/current/reference/html/#elasticsearch.repositories
In this example I create a basic Spring Boot application using Elasticsearch, Web, Rest Repositories along with Thymeleaf / Bootstrap as the view pages. The code for this is on GitHub which also provides the "Deploy to Bluemix
" button to deploy (more...)