Openshift version 3, what’s coming?

By far the biggest change coming in Openshift is the integration of Docker. Basically the cartridge will be replaced by a Docker container. This is great for application developers, who will have far more control over how they build and package their application for the cloud.

Docker was designed for Openshift. Openshift was already utilising Linux containers to run applications side by side in a multi-tenant way. Docker as introduced a well thought out API, and incremental storage strategy for Linux containers, which make them much easer for developers to use.

So it’s a happy marriage between Openshift and Docker. But how will it work under the covers. A recent presentation by Michal at the Openshift meet up in Brisbane shed some light on that. Keep in mind it’s still early days for Openshift version 3, it’s exciting times ahead. Here’s a preview of what it might look like.


– Securely isolate containers
– quota restrictions
– user namespaces
– SELinux

– Makes containers isolated, and resilient to failure
– use SystemD to track, recover and limit processes
– failure of other containers should not effect other containers

– Make containers portable between hosts
– links, port mappings and environment vars
– easy to share amongst gears, and between hosts

– Make containers audible, constrained, and reliably logged
– leverage SystemD patterns for each of these


– Similar to the current, binary deployment model
– Build source code, and deploy it, followed by a Docker commit

Support Cartridges using Centos

– To avoid licensing issues with using RHEL
eg: Ruby cart:

Stateless cartridges first, not sure about stateful cartridge implementation at this stage.

What this space!

Using Syntastic plugin for Vim

You can use Syntastic to check the syntax of various files including XML. I used it recently by following the installation guide here:

After installing it, copy the XML, and DTD into the same directory and use “:SyntasticCheck” to do a check.

Docker Getting Started Notes

Install docker

I tried sudo docker run -i -t fedora /bin/bash I work for Red Hat :)

  • failed with:
  • Pulling repository fedora
    0d20aec6529d: Error pulling image (rawhide) from fedora, unexpected EOF

  • apparently not a fault tolerant connection
  • was successful with:
  • sudo docker pull fedora

Committing Changes

  • Install a program into the container after running the shell:

    sudo docker run -i -t fedora /bin/bash
    yum -y install nc

  • Once you quit ‘nc’ is no longer installed
  • Persist your container to the local repository using:

    Get container id:

    sudo docker ps

    sudo docker commit fedora-nc

  • list images using

    sudo docker images

Bind a service on a TCP Port

When running a job in docker the following network setup happens:

  • Allocated a network interface
  • Setup an IP for it, with network address translation

If you want to be able to call into the job via the network, you’ll have to publish a port to the host

JOB=$(sudo docker run -d -p 4444 fedora-nc /bin/nc -l 4444)

After that, you’ll need to use the ‘port’ command to see which public port is NATed to the container

PORT=$(sudo docker port $JOB 4444 | awk -F: '{ print $2 }')

Finally if you want to send a message to the container you can do so using the public port

hello world | nc $PORT

Verify the network connection worked

echo "Daemon received: $(sudo docker logs $JOB)"

JBoss AS 7 Admin Config Video Course

Last year a published a series of video for Packt Publishing. Here’s an overview.

We’ll take you on a tour of the most popular Java Enterprise features, starting with Databases, and JMS, and rounding off at logging. Along the way, we’ll dive to into troubleshooting common problems such as Out Of Memory Errors, and Performance.
Where does the reader start – where do they end. How will they get from one place to the other?

We’ll highlight the difference between standalone and domain mode, showing why you would use domain mode, and how it differs from the traditional standalone approach.

We’ll dive into configuring Databases and Message queues, and also show you how to use integrate them into your application when running on JBoss.

We look at common problems that occur in any Java application, and how to troubleshoot them to find the root cause.
We continue our journey with setting up HTTP Request load balancing, and setting up a cluster of highly available JBoss nodes.

We dive into classloading in Jboss AS 7, showing how easy it is to finely manage classloading dependencies for your applications.
We talk about some extra performance features with JBoss AS 7, and cover the newest security features such as the Vault, which you can use to encrypt plain text passwords in configuration files.

We talk about some development features new with JBoss AS 7, such as Arquillian, a test harness for testing CDI, and EJB beans without a full blown startup/shutdown container cycle.
Lastly, we’ll talk in depth about JBoss logging, how to use the logging framework provided by the container, or roll your own logging, in your application.

JBoss AS 7 Configuration, Deployment, and Administration will turn you into a well-rounded JBoss Adminstrator quickly. We focus on the key features of the Application Server that will make a power user quickly and easily. We do this practical hands on examples, and simple explainations of JBoss and Java internals.

ActiveMQ Presentation at Java Meetup in Brisbane

I recently went to Boston to learn about Fusesource projects including Apache ServiceMix, and ActiveMQ. ActiveMQ is a JMS implementation for enterprise messaging. However it’s very lightweight, so can be used for less enterprise environments as well.

Here is a video of my presentation in Brisbane, which is an introduction to ActiveMQ.

ActiveMQ Presentation at for Queensland Java Meetup

Cloud as a Business Enabler

Cloud is the buzz work of the decade. Lots of people are talking about it, but most people aren’t sure how to best utilize it for their business. I would like to tell you some of the ways I think we can use it. From the start-up that can create a online business with no up-front cost, to an enterprise who is looking for a way to reduce their infrastructure cost.

Probably the most exciting trend of 2010′s is the resurgence of technologies start-ups attracting venture capital. Many of the Business Review Weekly Young Rich List for 2012 were young Australians who have attracted large investments for their technology. Atlassian top the list, with their software company operating out of Silicon Valley.

With cloud technologies like Platform as a Service (PaaS), it’s very easy for technology companies to host their website online. Openshift for example provides free hosting for sites handling only a small amount of load. If your site becomes popular, you can scale out on PaaS with only minimal cost compared to traditional data warehouses. This is allowing technology start-ups to go to market quickly with new ideas. Also it’s a great way for established companies to test new products and markets.

For enterprises that are looking to cut costs in their difficult economic times, cloud technologies can be a great way to outsource the cost of maintaining infrastructure to other organisations. Of course, if you are trusting your software hosting to another company you need to trust that they will not let you down, and you need to be sure that your data is going to be available and secure. These are the challenges we are tackling today, and who better to trust with these problems than Red Hat, whom you alreadly trust to support your valuable infrastructure.

Of course you probably want to maintain control of your own infrastructure and data to some extent, so keeping some of your own servers is a good idea. Products like CloudForms are talking this problem, but allowing you to scale your existing applications onto cloud services, such as Amazon EC2 at the click of a button. You use it by creating a template of the software RPM packages your servers require, then at the click of a button, you are able to deploy a new server using that template. Currently you can deploy to Red Hat Enterprise Virtualization (RHEV), vSphere, and EC2. Assuming you are already using RHEV or vSphere, it’s easy to see how you could expand your applications onto the cloud with minimal effort.

How about having less types of technologies and frameworks to maintain? Standardising a set of technology is a great way for enterprises to manage their costs. For example, many organisations would have multiple types of databases, and tens of different languages their support. Moving towards a homogeneous set of technologies will reduce maintenance cost in the long term, even if you may disgruntle a few developers a long the way. As long as they have a easy way to get started developing, they should comply.

PaaS running inside your corporate infrastructure can help you standardize your technology. Openshift offers developers self-help services, were they can create new applications without asking the infrastructure team to do it for them. These applications can be created from a selection of technology which is tailored to the organisation. If the development team want to start working a new technology, they should formally request that it be added to the Openshift selection (as a cartridge). That way you have more control over what is being using in your organization.

I have presented what I think are the best ways business can utilize cloud technologies, including PaaS. These include going to market quickly with new sites, that can quickly scale out. As well as reducing cost by scaling existing applications into the cloud. Also standardising technologies to reduce costs. All these use cases can be addressed with Red Hat technologies, a brand you already know and trust.