Search code examples
continuous-integrationbamboocontinuous-deploymentibm-integration-bus

IBM Integration bus with bamboo (for CI/CD)


Our ESB team is interested in improving the CI/CD abillities of our project. We would like to integrate somehow between the IIB 10 to Bamboo (jenkins is not well supported in our company). *We use git as source control and GreenHat/ SoapUI for testing.

Are there any best-practices for doing so? Tutorials maybe?


Solution

  • This is not a full tutorial, but it does cover some of the more obscure parts. The commands listed are well documented at IBM's site (for the mqsi* commands) or Ant's site (for the exec command), so I'll let experiment with those on your own. Depending on your experience with those though, I do think a detailed tutorial that described those too would be useful, but I'm not going to cover that here.

    I went searching around a year ago for guides or information as well. I only found one article from an IBM blog with a tutorial on getting it set up with Jenkins, though I think that tutorial made things more complicated than I needed them to be. (For reference: https://developer.ibm.com/integration/blog/2015/10/02/continuous-build-and-deploy-automation-with-ibm-integration-bus-v10-using-ant-git-and-jenkins/) That page did confirm what I suspected: I would have to set up the build using Ant to wrap the command line tools. From there it wasn't all that tricky, just some time experimenting.

    MQSICREATEBAR

    Become familiar with the mqsicreatebar command from the toolkit. This other question helps with that a bit: IBM Integration bus mqsicreatebar with references. When you can build a bar with that command line tool, simply wrap the execution of it in an Ant "exec" task and then configure Bamboo to call that Ant task.

    I will say that the mqsicreatebar command requires some environmental properties to be set first. Through trial and error I found out that just the PATH environment variable is actually required and hard coded the setting of its value in the Ant task configuration in Bamboo. In the Ant task configuration (in Bamboo) I have this in the "Environment" line (for IIB 9.x): PATH=<path to root of IIB install>\jre17\bin;<path to root of IIB Toolkit install>\IntegrationToolkit90;<path to root of IIB install>\bin;<path to root of IIB install>\isadc;%PATH%

    Of note, this command can only build one bar at a time. Another note: I can no longer remember the reason why, but I learned that the "-deployAsSource" parameter is effectively required. I remember thinking it wasn't ideal, but that most every use case was going to require it.

    MQSIDEPLOY

    Deploying is the same thing. Become familiar with the mqsideploy command from the broker install. When you can deploy a bar with the command, wrap it in an Ant exec task and configure Bamboo to call that Ant task.

    This command also requires a few of environmental variables to be set. In the Ant task configuration (in Bamboo) I have this in the "Environment" line (for IIB 9.x) (note the spaces, those differentiate different environment variables, not additions to the PATH): PATH=<path to root of IIB install>\jre17\bin;<path to root of IIB Toolkit install>\IntegrationToolkit90;<path to root of IIB install>\bin;<path to root of IIB install>\isadc;%PATH% MQSI_REGISTRY=<path to root of IBM MSQI folder (**not** the IIB install path)>\IBM\MQSI MQSI_JREPATH=<path to root of IIB install>\IIB\jre17 MQSI_JARPATH=<path to root of IIB install>\classes;<path to root of IIB install>\messages

    This can also only deploy one bar at a time.

    MQSIAPPLYBAROVERRIDE

    If you need to run the mqsiapplybaroverride, the following is needed in the Ant task configuration (in Bamboo) in the "Environment" line (for IIB 9.x) (note the spaces, those differentiate different environment variables, not additions to the PATH): MQSI_REGISTRY=<path to root of IBM MSQI folder (**not** the IIB install path)>\IBM\MQSI MQSI_JREPATH=<path to root of IIB install>\jre17\bin