Taking IBM Bluemix OpenWhisk for a Test Drive


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...)

Tomcat Runtime added to Web Console of IBM Bluemix

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

applications:
- name: pas-javaapp
(more...)

IBM Bluemix NodeRed Demo using Twitter and Telstra SMS API

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...)

Bluemix CLI Installation and Use on Bluemix PUBLIC

We recently announced a seperate CLI for Bluemix known as "Bluemix CLI". You can find out more about it at the following link

https://www.ng.bluemix.net/docs/cli/reference/bluemix_cli/index.html

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...)

Invoking the Billing API for Bluemix Public Organizations

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 below

pasapicella@Pas-MacBook-Pro:~$ cf login -u pasapi@au1.ibm.com -p ***** -o pasapi@au1. (more...)

Adding community based Plugins to the CF CLI Tool

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 above


pasapicella@Pas-MacBook-Pro:~/ibm$ cf repo-plugins community
Getting plugins from all repositories ...

Repository: CF-Community
name                      version   description
Download Droplet          1.0.0     Download droplets to your local machine
Firehose Plugin           0.8.0     This plugin (more...)

ServletContextAware Controller class with Spring

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.
  
import org.slf4j.Logger;
import (more...)

IBM Containers running Spring Boot Applications with IBM Bluemix

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...)

IBM Bluemix Secure Gateway Service with Oracle

I previously blogged about using the IBM Bluemix Secure Gateway Service as follows

http://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 follows

https://dl.dropboxusercontent.com/u/15829935/bluemix-docs/secure-gateway-oracle/index.html


IBM Bluemix Secure Gateway Service Step by Step Demo

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 Instances

https://dl.dropboxusercontent.com/u/15829935/bluemix-docs/secure-gateway/index.html

IBM Bluemix Admin Console Command Line (CLI) Installation

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 UI


Admin Console - Installing Command Line

The CLI to the admin console is installed as follows. The reference to this is found in your (more...)

Spring Security Demo with a Bootstrap Look and Feel

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".

http://spring.io/guides/gs/securing-web/

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...)

IBM Bluemix – Spring Boot Elasticsearch Repositories demo

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...)

IBM Bluemix – Specify only Liberty buildpack features you require

I am more often then not using spring boot applications on IBM Bluemix and most of what I need is packaged with the application from JPA or JDBC, drivers, Rest etc. Of course with IBM Bluemix we can specify which build pack we wish to use but by default for java applications LIberty is used.

When a stand-alone application is deployed, a default Liberty configuration is provided for the application. The default configuration enables the (more...)

IBM Bluemix – Triggerring backing service creation from "Deploy to Bluemix" button

I recently posted about the "Deploy to Bluemix" button which will automatically deploy an application into IBM Bluemix from a single click.

http://theblasfrompas.blogspot.com.au/2015/09/adding-deploy-to-bluemix-button-to-my.html

If the application requires backing services they can automatically be created using the"declared-services" tag as shown below. Declared services are a manifest extension, which creates or looks for the required or optional services that are expected to be set up before the app is deployed, such (more...)

Adding the "Deploy to Bluemix" Button to my Bluemix Applications in GitHub

Not before time I finally added my first "Deploy to Bluemix" button on my GitHub projects for Bluemix applications. The screen shot below shows this for the Spring Session - Spring Boot Portable Cloud Ready HTTP Session demo.


Here is what it looks like when I do deploy this using the "Deploy to Bluemix" button and requires me to log in to IBM Bluemix. What happens when you use this button (more...)

Spring Session – Spring Boot application for IBM Bluemix

The following guide shows how to use Spring Session to transparently leverage Redis to back a web application’s HttpSession when using Spring Boot.

http://docs.spring.io/spring-session/docs/current/reference/html5/guides/boot.html

The demo below is a simple Spring Boot / Thymeleaf/ Bootstrap application to test Session replication using Spring Session - Spring Boot within IBM Bluemix. Same demo will run on Pivotal Cloud Foundry as well.

IBM DevOps URL ->

https://hub.jazz.net/project/pasapples/SpringBootHTTPSession/overview

Sample Project on GitHub ->

https://github.com/papicella/SpringBootHTTPSession



More Information

The Portable, Cloud-Ready HTTP Session
https://spring.io/blog/2015/03/01/the-portable-cloud-ready-http-session

Integrating Telstra Public WIFI API into Bluemix

I previously blogged about Integrating Telstra Public SMS Api as shown below.

http://theblasfrompas.blogspot.co.nz/2015/08/integrating-telstra-public-sms-api-into.html

Here I show how I integrated Telstra Public WIFI Api into IBM Bluemix. This Api from Telstra is documented as follows. You need to register on http://t.dev to get the credentials to use thier API which I have previously done which then enables me to integrate it onto Bluemix

https://dev.telstra.com/content/wifi-api

Once again here is the (more...)

Integrating Telstra Public SMS API into Bluemix

In the post below I will show how I integrated Telstra public SMS Api into my Bluemix catalog to be consumed as a service. This was all done from Public Bluemix using the Cloud Integration Service.

Step 1 - Create a T.DEV account

In order to get started you need to create an account on http://dev.telstra.com in order to be granted access to the SMS API. Once access is granted you need (more...)

IntelliJ IDEA 14.1.4 adds Spring Initializr

Just upgraded to to Intellij IDEA 14.1.4 and found that the Spring Initializr web page for quickly creating spring boot applications has been added to the New Project dialog. The web site I normally drive new spring boot applications from as follows, is now part of IntelliJ IDEA which is great.

http://start.spring.io/

Some screen shots of this.