Automating WebSphere Message Broker deployment

During the past few years I’ve come across a number of instances where customers have wanted to script the build and deployment of WebSphere Message Broker solutions. I’ve actually spoken about this a few times at conferences. The most common approach that customers have adopted has been to use Ant to tie in with the rest of their application build processes.

In an earlier developerWorks article, I included an example plugin node that could invoke an Ant task. There should be a build.xml file included with the sample code for this article that could help you to get started. I’ve also helped customers to write their own automated build and deployment processes using Ant.

Now, a new developerWorks article from Zhongming Chen, Ida Leung and Dave Spriet covers the use of Ant to drive the mqsicreatebar command for scripting the creation of broker archives. It’s a great article and well worth a look.

This isn’t the end of the story. Often, the overall process will also include checking out of source control, apply version tags, and deploying the BAR file. However, this article introduces the topic and should be a good starting point. You could also use the Configuration Manager Proxy API to control other broker tasks, as Matt Lucas describes in another developerWorks article.

Incidentally, if you want to know more about Ant, I personally really like the book Java Development with Ant by Erik Hatcher and Steve Loughran.


About Andy Piper
Work at: Twitter; Interests: Clouds | IoT | Open Source | Community | LEGO; Views: my own

10 Responses to Automating WebSphere Message Broker deployment

  1. Sri says:

    I need WebSphere Message Broker deployment scripts

    • Vanrobstone says:

      Good luck with that!

      Scripting broker deployments should be done with caution, it is very easy to get into a situation whereby your project will require major development expertise to maintain deployment scripts. Bearing in mind that deployment can and usually is done on a variety of platforms (aix, windows) these scripts need to be fairly robust.

      We currently have scripted broker build and deployments, but part of me slightly laments the ignorance of the Keep It Simple Stupid approach. Yes our broker (and MQ) source can be compiled into a single distribution which is then deployed via scripts contained in the same distribution, but will it continue to be maintained when I have left…?

  2. Adi says:

    I need info on WebSphere Message Broker deployment scripting using Ant and clearcase. I need to fetch latest code from clearcase & build the BAR file.

    • Andy Piper says:

      Well, the article on using the mqsicreatebar command in Ant that’s linked here should still be valid. Have you tried that? Combine with some Ant commands to call the correct ClearCase commands to grab your source code, and you should be good to go.

  3. I need a script for get the latest code from CVS and deploy the Message Broker bar file into execution group.How can do this.Thanks in advance..

    Marimuthu Udayakumar

    • Andy Piper says:

      As I said in the previous reply, please look at the IBM developerWorks article that is linked in the blog post which contains such a script – you will need to add the CVS commands yourself.

  4. Appreciate the fact that you have published this information in the internet. More than the content itself, your thought of sharing with the rest of the world is very well appreciated.

  5. Ginish says:

    I have a requirement that, the mqsicreatebar command will be getting the arguments from a text/xml file. The reason for this is that, number of projects and number of flows/sets will be changing each time. Build file should be unchangable. I am bad at ant scripts.
    Please help!

    • zb says:

      hi, guys
      only auto deployment is not important, i want to know how to auto run the test cases of wmb project, i find that i could not create a test project by the wmb toolkits. but the wid can do that for the mediation module project, in the info center, i can find a sample ant script to run the test, so i can setup a auto deploy and test framework to implement the auto regression test. i wonder how to implement the similar function for wmb? who knows? thanks very much…..

      • Andy Piper says:

        It’s going to depend on the way in which your flow takes input and provides output. MQ, HTTP, JMS, file? You can unit test flows within the WMB toolkit but it doesn’t work in the same was as mediations in WID.

        In terms of how to automate flow tests, the most common approach I have seen is to create e.g. jUnit tests that put/get/compare messages on queues, call HTTP endpoints, etc – and then use an Ant script to automate the running.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: