Bluemix at code.talks

By Niklas Heidloff, posted on Oct 1, 2015

This week my colleagues James Thomas, Jonathan Kaufman, Tristan Reckhaus and I attended code.talks in Hamburg, Germany. code.talks is a developer conference with 1500 attendees covering various topics around web application development. We presented IBM Bluemix at our booth and in a session. I enjoyed the conference and had a lot of great conversations with other developers. Below are some impressions.

The conference was held in a cinema.

My session Docker in the cloud was in a big room with a huge screen.

We did two lotteries with GoPro cameras which were as always very popular and fun.

The IBM team from right to left: Jonathan Kaufman, Tristan Reckhaus, James Thomas and I.

Maven Plugin to build Images and run Docker Containers

By Niklas Heidloff, posted on Sep 23, 2015

In order for Java developers to test their applications in containers they typically have to build their code, create an image and run a container. You can use the Docker command line interface to manage images and containers, but at least for me that's often error-prone and I have to go back to my cheatsheet to find the right commands. I tried a Docker Maven plugin instead and my initial experience is very positive.

There are actually several Maven plugins for Docker. Roland Huß wrote a nice high level comparison where he explains why he created another plugin. I tried the Spotify one briefly but that one doesn't allow running containers. The plugin from Roland rhuss/docker-maven-plugin seems very promising. Below I used it for my simple Java sample.

With the plugin you can build images and run containers and also easily remove these again which is especially important in the iterative development phase.

Build image:
> mvn docker:build

Run container:
> mvn docker:start

Stop and remove container:
> mvn docker:stop

Remove image:
> mvn -Ddocker.removeAll docker:remove

The plugin also supports to push images to other registries but I haven't tried it yet. To find out more read the Intro and the Manual.

IBM Bluemix for Administrators with Focus on XPages

By Niklas Heidloff, posted on Sep 22, 2015

Yesterday I attended AdminCamp which is a yearly conference for IBM Domino and IBM Connections administrators.

I gave the opening session about IBM Bluemix administration with a focus on XPages. Here are the slides.

Photo of the opening session:

At the end of my session I had planned to give the selfie drone demo but because of network problems it only worked outside the main hall. I also hope to be able to use the newer Bebop drone soon since it has a much better image quality.

10 Minutes Bluemix Pitch from Dev to Dev

By Niklas Heidloff, posted on Sep 21, 2015

As a developer advocate for Bluemix, I regularly talk with other developers about the capabilities and benefits of IBM Bluemix. In these conversations, I often use a pitch similar to the one in this video.

The slides and the script are on SlideShare.

I really want to learn more about the Java framework Spring. The simplicity to build enterprise applications together with Spring's momentum makes it really interesting. So I started with a simple tutorial and deployed that Spring application to Bluemix.

Spring provides a simple hello world Spring Boot with Docker tutorial with a Spring Boot application with one REST API. Maven and Gradle can be used, not only to build the Java application but also a Docker image which can be deployed to Bluemix.

The Spring tutorial states that you need 15 minutes for the tutorial. In my case that was true since I had the prerequisites JDK 1.8, Maven and Docker already installed. For the deployment of the application you don't need more than 5 additional minutes.

I won't repeat all the steps from the Spring tutorial here, but essentially this is what you need to do:
- Clone a Github project. Use the 'complete' version of the application
- Build the project via Maven or Gradle
- Optional: Run the application locally: Run the built jar file which comes with Tomcat and your application
- Build the Docker image via Maven or Gradle plugins

The tutorial describes how to push the image to Docker Hub (via "docker push springio/gs-spring-boot-docker"). To push the image to Bluemix follow the next steps instead.

> cf login
> cf ic login
> docker tag springio/gs-spring-boot-docker <- change the namespace
> docker push <- change the namespace

After this you'll see the image on Bluemix.

In order to run a container invoke these commands:

> cf ic run --name gs-spring-boot-docker -p 8080:8080 -d -t <- change the namespace
> cf ic ip request
> cf ic ip list -a
> cf ic ip bind gs-spring-boot-docker <- change the IP

Alternatively you can use the Bluemix UI to create a container. Choose the new image, define the port 8080 and bind an IP address.

Open the application in a web browser via yourIP:8080.

More Blog Entries ...

Hi, my name is Niklas Heidloff. I work for IBM as an IBM Bluemix Developer Advocate. The blog contains information about IBM Bluemix and articles about my previous work in IBM Collaboration Solutions, esp. IBM Connections and XPages.



The postings on this site are my own and don't necessarily represent my employer IBM's positions, strategies or opinions.