OpenShift flex a peek behind the scenes

On my first look at  OpenShift I described what the initial getting started experience was like . Now I’d like to go over what it’s like when you deploy a JBoss Application using the deploy your own application route. I had to endure being talked at by my Significant Other about the intricacies of JBoss for this mind and  I now know a little bit more about JBoss than I ever wanted or needed  to know ( I didn’t know much about it before though ). As a result though this post has sneaked a look behind the scenes and focus’s on what is happening at the AWS end as well as some JBoss specifics which I guess most users may not want to do. In this this post we do also  list  some of our gripes and also some questions we have. Anyway enough of that here comes the good stuff  Smile

The first thing you need to get your head around is that the JBoss server is part of your application .

We created a load balanced Cluster which  if you’re interested in what is going on with your AWS estate  consisted  of a  minimum of two  ec2 instances with a  loadbalancer in front of them. The  ec2 instances are launched with a generated ec2  security group which has your cluster name embedded in it.

secGroup

My first question was why are both instances in the same availability zone?

This unfortunately ended up with myself and my significant other both educating each other . Me explaining about AZ’s and him explaining about how JBoss clusters work . We decided to park  that conversation as I think we were both making each others heads hurt at some point (Our works lives do not normally collide).

The reason we started a cluster is because we wanted to show that when you create a clustered JBoss application you do actually get a JBoss cluster and not just two standalone JBoss instances behind a load balancer. I’ll show this later on in this post.

The application we are using is  the one that is used in the getting started with JBoss guide to go with it the JBoss Seam booking application. This application doesn’t actually work when deployed ( I know why as I was told why  but that explanation would distract from this post) but as we were interested in poking around it served its purpose (and I had already downloaded it )

To  deploy an application you also need to deploy the components that go with  it

random number

Basically you need to go through all the tabs but you can say just deploy  the components and deploy the files ( in our case an ear file ) later, OpenShift doesn’t seem to mind that.

Gripe : The annoying yellow circle that appears is a counter telling you how many files has been modified. In the screen shot above you scan see that the ‘20’ matches the Configuration files modified. It rapidly became as annoying as the paper clip in word it needs to go.

We deployed the components first that consisted of  JBoss 6 and MySQL. At the moment there is only a community version of JBoss supported. What I want to know is there going to be a supported version of JBoss so  that we could see a Pay as you go support service like the RedHat instances on ec2?

Anyway after we deployed the components we logged on to the JMX console on one of the nodes  so we could show you that it really is a JBoss cluster and what happens after you deploy the files that make up your application.

The terminology is slightly confusing  as JBoss usually has applications deployed to it and now its a component but that component is actually part of an application. Hopefully by the end of this post you’ll understand it all though.

So pre application file  deployment but post component deploy .When logging onto the JMX console as you can see from the screen shots below that a JBoss Cluster/group exists with both our ec2 instances in it.

I have included  a screen shot of the ec2 instances so you can match up the IP addresses with the walkthrough

jbossclusterview

sameaz

beforedeploy

Those of you familiar with JBoss will see there is no application deployed as yet so we went back to the Flex console and then deployed our application ear file.

The JMX console then looked like this:

postdeploy

and from the JMX console on our second instance looked like this

2ndinstance

To get the password to log onto the JBoss console we actually had to log onto the instance via ssh  to get the randomly generated admin password from the jmx-console-users.properties file.

It would be good if there was a way to change this password from the Flex console . There is the ability change ports via the console. We feel this is a must have enhancement.

admin password

After we’d had  a poke around I then wanted to delete the application . So I stopped the application and then clicked  delete but got this error :

tryingtodeleteapplication

The application ( deployed files and components i.e JBoss is no more) was deleted from both nodes so it did work.

This still leaves the instances and loadbalancer on AWS running though so next it was delete the cluster and another error although it did successfully delete the cluster and the underlying AWS infrastructure

deletinginstance

So there you have it a quick peek behind the deployment of a JBoss application sing OpenShift.

Some other comments we have for RedHat  :

As we can log onto the instances it needs to be made absolutely clear as to what an end user is actually allowed to do in terms of tweaking. If you ‘over tweak’ what support will be provided?

The Getting Started documentation needs to reflect he actuality. For example in the ‘Getting Started with JBoss on OpenShift flex guide’ there is no indication that you cannot have spaces in your application name as shown by the screenshots in the guide . 

You do not find out till you have tried to create a cluster ( a Flex cluster) that there is a  10 characters maximum constraint on the cluster name.  Some on screen help is needed before you hit submit .

The UI still needs a lot of work as the scrolling around is annoying and buttons not being obvious because your browser/laptop resolution isn’t small enough although I have been told even on a dev size screen it’s still rubbish ( I know that they are working on this but worth listing)

 

A quick introductory tour of OpenShift

I’d had  a play with the pre-beta of what is now know as OpenShift  when it was called Makara cloud but it was very much a  pre-beta .  With my Significant other needing to look at  OpenShift & the need to use ec2 for the flavour of OpenShift  he wanted to look at  another visit was in order. So the first of my visits was just to see how the getting started experience has evolved from those early pre-beta days

OpenShift comes in a number of flavours Express,Flex and power. In this post we are  looking  at Flex .

Express  The free shared model  for PHP, Ruby and python apps

Flex For Java EE and PHP apps that make use of middle ware components like Jboss & tomcat

Power – Basically you write  custom apps for the underlying instance in say C

The faq provides info on the differences . The only one you need an AWS account for is flex.

After signing up you get a confirmation email and off you go. Using Flex requires that you provide the portal with your cloud details

cloudsignup

This is tied into using  Amazon ec2 instances. I’m assuming that more cloud providers will be available at some point. ec2 suits me fine though so onwards with the tour.

After entering your credentials  you get informative messages telling you what’s happening  as it connects your cloud account with flex.

linkingtocloud

.

You then need to define your server cluster

createcluster

But at last a cloud solution that on release is available  in the eu-west region now . Nice not to be a second class citizen for a change just because I’m based in Europe

While it creates the cluster RedHat have taken he opportunity to sneak in a survey

stopmegetting bored

Well why not I guess stops me getting bored anyway.

For this post I was trying to get handle on the initial sign up experience my Significant other will be using JBoss on it so hopefully I can entice some feedback about what it’s like to use it  in anger in another post.

Anyway the next step is to either deploy your own application or try one of the  demo applications. I opted to try the demo  spring & hibernate autoInsurance application autotrack. I clicked the submit button and off it went.

Behind the scenes  it created a large  EBS backed  instance and loadbalancer against my   our AWS account. It wasn’t obvious where I could change the instance size .

Once the app is deployed you get access to the application dashboard . Now this is neat and I cannot do it justice in this brief intro but her are a few screenshots so you can see the sort of info you can get from the dashboard

appconsole

I’m very interested in Deployment processes so the Deploy changes tab is pretty cool to me anyway.

deploychanges

The performance tab provides transactional as well as instance metrics in an easily personalised dashboard.

performance

The logs tab provides a view of the application server logs.

The initial verdict:

If you use OpenShift flex you do  still need to understand the underlying IaaS platform it will be deployed to. This isn’t an Azure type PaaS  mode but a bring your own PaaS container and you need somewhere to deploy the PaaS container to . I would like to see more flexibility around the cluster( underlying IaaS ) set up . How easy is it to move from IaaS to IaaS ? I don’t know difficult to assess with only AWS ec2  being an option. if it isn’t that easy then why not make use of some of the services that made you select a particular cloud vendor in the first place? RDS as an option would be nice.

The console is nice and friendly though and it was a painless experience to sign up and get my first OpenShift demo application up and running.  Express is the free shared model where RedHat have abstracted the IaaS but its target market Ruby, python, php   have a lot of choice already what with Heroku, CloudFoundry and numerous other players who offer to run apps like Drupal . I think that if you are developing Java EE applications and really do not want to worry about the underlying IaaS then this and CloudFoundry may well be your first port of call.

I’ll revisit for a deeper dive soon though as I have number of unanswered questions I need to explore and My Significant Other has yet to start exploring this which should provide a good test .