Friday, 20 November 2015

IBM Bluemix Secure Gateway Service with Oracle

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

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

Wednesday, 18 November 2015

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

Tuesday, 10 November 2015

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 own Dedicated/Local install via a link as follows with "cli" appended to the Admin Console URL

pro:~$ cf add-plugin-repo BluemixAdmin

OK added as 'BluemixAdmin'

pasapicella@pas-macbook-pro:~$ cf install-plugin bluemix-admin-cli -r BluemixAdmin
Looking up 'bluemix-admin-cli' from repository 'BluemixAdmin'
8889440 bytes downloaded...
Installing plugin /var/folders/rj/5r89y5nd6pd4c9hwkbvdp_1w0000gn/T/bluemix-admin...
Plugin BluemixAdminCLI v0.0.1 successfully installed.
pasapicella@pas-macbook-pro:~$ cf plugins
Listing Installed Plugins...


Finally target admin API endpoint:

pasapicella@pas-macbook-pro:~$ cf baa
The API endpoint has been updated to ''

At this point you can now run Admin Console commands as follows. To get help issue "cf {command} --help"
The current supported commands are as follows:
bluemix-admin-api, baa                              
bluemix-admin-add-user, baau                        
bluemix-admin-remove-user, baru                     
bluemix-admin-set-organization, baso                
bluemix-admin-unset-organization, bauo              
bluemix-admin-set-quota, basq                       
bluemix-admin-add-report, baar                      
bluemix-admin-delete-report, badr                   
bluemix-admin-retrieve-report, barr                 
bluemix-admin-enable-service-plan, baesp            
bluemix-admin-disable-service-plan, badsp           
bluemix-admin-add-service-plan-visibility, baaspv   
bluemix-admin-remove-service-plan-visibility, barspv
bluemix-admin-edit-service-plan-visibilites, baespv 
bluemix-admin-set-region-access, basra              
bluemix-admin-create-organization, baco             
bluemix-admin-delete-organization, bado 

Monday, 9 November 2015

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

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 into IBM devOps prior to deploying it directly into your Bluemix Environment.

Saturday, 10 October 2015

IBM Bluemix - Spring Boot Elasticsearch Repositories demo

I decided to take the Elasticsearch repositories as part of the Spring Data project for a test drive. The Spring boot Elasticsearch repositories are described in the link below.

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 to your own instance of this application into your own Bluemix accout.

Like all Spring Data Repositories you can create an interface and be given basic CRUD operations to the Elastisearch DOCUMENT as shown below.


import java.util.List;

public interface EmployeeRepository extends ElasticsearchRepository<Employee, String>
    public List<Employee> findByFirstNameContaining(String firstName);


@Document(indexName = "employee", type = "employee", shards = 1, replicas = 0, refreshInterval = "-1")
public class Employee
    private String id;
    private String firstName;
    private String lastName;
    private String job;
    private int deptNo;

    public Employee()


If you don't have a IBM DevOps Jazzhub account the manifest.yml can be used if you clone the project, and compile it using maven with "mvn package". Be sure to alter the application name / host to be a unique name within Bluemix.

 - name: pas-sb-elastic
   memory: 450M
   path: ./target/SpringBootElasticSearch-0.0.1-SNAPSHOT.jar
   instances: 1
   host: pas-sb-elastic
   buildpack: java_buildpack

Example Deployment

pasapicella@pas-macbook-pro:~/ibm/DemoProjects/spring-starter/jazzhub/SpringBootElasticSearch$ cf push
Using manifest file /Users/pasapicella/ibm/DemoProjects/spring-starter/jazzhub/SpringBootElasticSearch/manifest.yml

Creating app pas-sb-elastic in org / space dev as

Using route
Binding to pas-sb-elastic...

Uploading pas-sb-elastic...
Uploading app files from: /Users/pasapicella/ibm/DemoProjects/spring-starter/jazzhub/SpringBootElasticSearch/target/SpringBootElasticSearch-0.0.1-SNAPSHOT.jar
Uploading 1M, 133 files
Done uploading

Starting app pas-sb-elastic in org / space dev as
-----> Downloaded app package (35M)
-----> Java Buildpack Version: v3.0 |
-----> Downloading Open Jdk JRE 1.8.0_60 from (2.7s)
       Expanding Open Jdk JRE to .java-buildpack/open_jdk_jre (1.7s)
-----> Downloading Spring Auto Reconfiguration 1.10.0_RELEASE from (0.9s)

-----> Uploading droplet (79M)

0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running

App started


App pas-sb-elastic was started using this command `SERVER_PORT=$PORT $PWD/.java-buildpack/open_jdk_jre/bin/java -cp $PWD/.:$PWD/.java-buildpack/spring_auto_reconfiguration/spring_auto_reconfiguration-1.10.0_RELEASE.jar$TMPDIR -XX:OnOutOfMemoryError=$PWD/.java-buildpack/open_jdk_jre/bin/ -Xmx329386K -Xms329386K -XX:MaxMetaspaceSize=64M -XX:MetaspaceSize=64M -Xss975K org.springframework.boot.loader.JarLauncher`

Showing health and status for app pas-sb-elastic in org / space dev as

requested state: started
instances: 1/1
usage: 450M x 1 instances
last uploaded: Sat Oct 10 10:20:52 UTC 2015
stack: cflinuxfs2
buildpack: java_buildpack

     state     since                    cpu    memory           disk           details
#0   running   2015-10-10 09:22:42 PM   0.3%   425.1M of 450M   158.1M of 1G

The application is currently deployed and is accessible at the URL below.

More Information

Tuesday, 6 October 2015

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 following Liberty features:

  • beanValidation-1.1
  • cdi-1.2
  • ejbLite-3.2
  • el-3.0
  • jaxrs-2.0
  • jdbc-4.1
  • jndi-1.0
  • jpa-2.1
  • jsf-2.2
  • jsonp-1.0
  • jsp-2.3
  • managedBeans-1.0
  • servlet-3.1
  • websocket-1.1
  • icap:managementConnector-1.0
  • appstate-1.0
Here is how I strip out some of what isn't required in my Liberty runtime container to a bare minimal of what I need.


 - name: pas-speedtest
   memory: 512M
   instances: 1
   path: ./demo-0.0.1-SNAPSHOT.jar
   host: pas-speedtest
     JBP_CONFIG_LIBERTY: "app_archive: {features: [jsp-2.3, websocket-1.1, servlet-3.1]}"

 More Information

Thursday, 1 October 2015

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.

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 as a data cache service. You can find a list of the eligible Bluemix services, labels, and plans by using the CF Command Line Interface and running cf marketplace


    label: rediscloud
    plan: 30mb
 - name: pas-sbsessions
   memory: 512M
   instances: 2
   path: ./target/SpringBootHTTPSession-0.0.1-SNAPSHOT.jar
   host: pas-sbsessions
   buildpack: java_buildpack
    - redis-session

Note: Declared services is an IBM extension of the standard Cloud Foundry manifest format. This extension might be revised in a future release as the feature evolves and improves.

Tuesday, 15 September 2015

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 it adds the prohect code via FORK to your own DevOps projects , adds a pipeline to compile/deploy the code and finally deploys it as you Expect it to do.

More Information

Thursday, 10 September 2015

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.

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

Sample Project on GitHub ->

More Information

The Portable, Cloud-Ready HTTP Session

Wednesday, 2 September 2015

Integrating Telstra Public WIFI API into Bluemix

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

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 to get the credentials to use thier API which I have previously done which then enables me to integrate it onto Bluemix

Once again here is the Api Within the Bluemix Catalog, these screen shots show the Api has been added to the Bluemix Catalog which can then be consumed as a service.

Finally here is a Web based application using Bootstrap so it renders quite well on mobile devices as well which allows you to enter your Latitidue, Longitude and Radius to find Telstra WIFI Hotspots using the Telstra WIFI Api on IBM Bluemix

More Information

Visit to get started