↓ Skip to main content

Docker

WebSphere Liberty on IBM Containers: Part 2

WebSphere Liberty on IBM Containers: Part 2

Deploying an Application # In the first part of this series we looked at how to get started running a WebSphere Liberty image in IBM Containers using the Bluemix console. The container was just running an empty Liberty server. In this post we’ll look at building and deploying an image that adds an application. I was originally intending to stick to using the browser for this post but I think it’s actually easier to do this from the command line. I’m going to assume that you already have Docker installed locally, either natively on Linux, via Docker Machine, or via the Docker for Mac/Windows beta.
WebSphere Liberty on IBM Containers: Part 1

WebSphere Liberty on IBM Containers: Part 1

Getting Started # I wanted write a few blog posts as I explored deploying our WebSphere Liberty Docker image on to third-party cloud platforms but this didn’t really feel fair given that I haven’t written anything here about the options using IBM’s cloud platform! So, to kick things off, here’s a series of posts on using Liberty with the IBM Containers service in Bluemix. In this post I’m going to focus on using the web UI to get a simple Liberty container up and running. In subsequent posts I’ll cover topics such as deploying an application, scaling applications and using the command line.

docker logs and stderr

·2 mins
As part of a script that I was writing today I was attempting to count the number of times that a containerised Liberty server had started. I started with the following command: docker logs test | grep "CWWKF0011I" | wc -l (where CWWKF0011I is the code for Liberty’s “ready to run a smarter planet” message) but it was giving me an answer one greater than I anticipated. Stripping off the line count at the end quickly showed why: in addition to the messages that I was expecting, grep also appeared to be returning an error message from the logs. It took me a little while longer to get my head around what was going on. grep wasn’t passing the error at all. Indeed, the error wasn’t even getting as far as grep. Instead, docker logs was trying to be helpful and recreating the stdout and stderr streams from the container; stdout was getting piped to grep, and stderr, where Liberty was outputting its error message, was just going straight to the console. This was also going to cause me a headache elsewhere when I was actually trying to grep for errors.

Book Review: Docker Containers: Build and Deploy with Kubernetes, Flannel, Cockpit, and Atomic

·3 mins
I’m slowly working my way through the list of Docker publications that I stacked my tablet with when IBM restarted its subscription to Safari Books Online. One of these was Docker Containers: Build and Deploy with Kubernetes, Flannel, Cockpit, and Atomic by Christopher Negus. The last two projects in the title are a clue to the underlying theme of the book. Cockpit and Atomic being Red Hat projects, this is really a guide to doing containers the Red Hat way. This I was expecting - they do employ the author after all. What really disappointed me was that the four technologies cited in the title occupied so little of the book’s content. Of the 18 chapters, there was one on Super Privileged Containers (an Atomic concept), one on Cockpit, two on Kubernetes, and one paragraph on Flannel. Hardly comprehensive coverage!
Docker for Mac Beta

Docker for Mac Beta

·3 mins
I was excited to see Docker announce a beta for ‘native’ support for Docker on Windows and Mac where ’native’ means that Docker appears as a native application utilising built-in virtualisation technology (Hyper-V on Windows and a project called xhyve on Mac) rather than requiring Virtual Box. Sadly this isn’t much use to me at work where I run the corporate standard Windows 7 on my laptop and Linux on my desktop. (The Register had an article indicating that, although Windows 7 is declining in the enterprise, its market share is still 45%+ so I hope Docker don’t do anything rash like ceasing to develop Docker Toolbox.) I do have a Mac at home though so I signed up for an invite.

Docker London December

·2 mins
Last night I headed up to London for the December meetup of Docker London. The evening didn’t get off to a great start as I managed to cycle over a screw on the way to the station. Despite this, and the subsequent efforts of the Jubilee Line, I did just make the start in time.
DockerCon Europe 2015: Day 2

DockerCon Europe 2015: Day 2

·2 mins
It was another early start on Day 2 of the conference. It’s not often I leave the hotel before breakfast starts, but fortunately breakfast was being served in the expo hall so I could refuel whilst on duty.
DockerCon Europe 2015: Day 1

DockerCon Europe 2015: Day 1

·2 mins
I was lucky enough to be a part of the IBM contingent attending last week’s DockerCon Europe in Barcelona. I had to earn my keep by manning the Code Rally game on the IBM booth (not to mention lugging a suitcase full of laptops to the event and porting the server-side of the game to run on IBM Containers). I did get to attend the sessions though and soak up the atmosphere.

Book Review: Docker in Production

·3 mins
I picked up a copy of Docker in Production - Lessons from the Trenches during a recent O’Reilly sale, hoping to pick up some tips to pass on to customers that I work with. I have to say that I was disappointed! It’s not that the book isn’t full of useful information. It is. After a good start, it just failed to deliver on the title for me.

Container Camp LDN 2015

·4 mins
On Friday I made my way up to the Barbican Centre for this year’s edition of Container Camp London. After a slow start (no-one seemed to know that we were supposed to descend five floors to the cinema in the bowls of the building) things finally got under way. Here’s a quick summary of the day’s sessions:

Docker is not Enough

·2 mins
I headed up to the London PaaS User Group Meetup yesterday evening. There were two speakers on the agenda. First up was Jeff Hobbs, CTO & VP Engineering at ActiveState with a pitch entitled Docker is not Enough (pretty much this deck). The main tenet being that Docker is not enough in itself as it just addresses packaging and execution. You need a PaaS to provide all of those other niceties like load balancing, auto-scaling, monitoring, centralised logging, audit, … My main issue with this pitch was simply that I don’t think anyone has ever claimed that Docker is enough. That’s why there’s a wealth of ecosystem projects surrounding Docker. And why does stackato (ActiveState’s Cloud Foundry based PaaS) use Docker for containerisation? Jeff stated that this was because the ops team would feel more comfortable dealing with this technology on the back end.

Docker London

·2 mins
Anyone following the WASdev site may have noticed that I’ve been doing some work with WebSphere Liberty and Docker recently. I was therefore pleased to have successfully made it off the wait list in time to travel up to Docker London for my first meetup of the year on Tuesday evening.