Contents


Support continuous configuration deployments for IBM MQ with UrbanCode

Comments

Associated IBM solutions

IBM® MQ is messaging middleware that simplifies and accelerates the integration of diverse applications and business data across multiple platforms. IBM MQ facilitates the assured, secure, and reliable exchange of information among applications, systems, services and file by sending and receiving message data via messaging queues, simplifying the creation and maintenance of business applications. It delivers universal messaging with a broad set of offerings to meet enterprisewide messaging needs, as well as connectivity for the Internet of Things and mobile devices.

IBM® UrbanCode™ Deploy orchestrates and automates the deployment of applications, middleware configurations, and database changes into development, test, and production environments. This software enables your team to deploy as often as needed — on demand or on a schedule — and with self-service. UrbanCode Deploy can help your team accelerate time to market, drive down costs, and reduce risk.

UrbanCode Deploy includes an IBM MQ plugin that supports more than 30 steps to create, define, delete, set, set up, stop, start, import, manage, and receive configuration actions for IBM MQ. These actions are intended to work in patterns of actions to meet usage patterns, such as "Create a queue manager on an MQ server" or "Create a connection between two applications through the creation of a set of queues and channels on one or more IBM MQ servers." The sidebar list shows the actions provided with the IBM MQ plugin sidebar list.

IBM MQ deployment objectives

IBM MQ developers often use manually driven processes to apply changes to the configuration. Some of these processes include creating queue managers, creating or changing queues and channels, and more (for a full list, see the sidebar). These processes might involve accessing the IBM MQ server directly or running locally managed scripts on the server. After the configuration is applied, a superset of scripts is updated to provide a means to replicate the set of configurations on a new server. In addition to the excess time and potential errors associated with manual deployment and configuration actions, it is difficult to monitor the configurations of all servers in all environments accurately or efficiently.

IBM MQ usage patterns

This tutorial might not capture all potential usage patterns. Those listed below are designed to provide enough context and explain the approach to the UrbanCode Deploy configuration model that supports IBM MQ deployment configurations. To model UrbanCode Deploy for IBM MQ deployments, we grouped deployment use cases into two categories:

  • IBM MQ server management— Use cases associated with applying specific configuration settings to an IBM MQ server, including creating queue managers, channels, etc.
  • IBM MQ environment management— Use cases associated with recreating a new IBM MQ server from the set of configurations currently applied to another server, including managing change across server types in different environments, impact analysis, etc.

Example IBM MQ server management use cases

IBM MQ deployments are designed to apply a set of configurations. From a deployment point of view, these should be used in patterns, rather than a server administration point of view. The server administration point of view would consider each step (add channel). The approach here is to use the deployment point of view.

Table 1 includes an example set of use cases that are representative of the repetitive routine activities performed by IBM MQ developers. These include the add, delete, or change configurations on specific servers. Your use case can vary and might require other steps you can leverage from the UrbanCode Deploy library.

Each time the use cases run, you'll have a unique set of values to use in the automated deployment process (queue manager name, description, command directory, for example). You can configure some of these properties in advance for all IBM MQ servers or for a particular type of IBM MQ server. You might need to set other properties for each deployment. It's a good idea to set each configuration setting to record for reuse when executing one or more of the environment use cases.

Table 1. Example set of IBM MQ management use cases
Use caseDescription
Create queue manager Run process that creates a queue manager on a server
Connect applications queue managers Run process that configures a specific set of queue manager to connect
Cluster queue managers Run process that configures a specific set of queue managers to be clustered according to IBM MQ definition
Create application connection Run process that creates a set of queues, channels, or other configurations on a server to connect applications
Setup queue manager for pub/sub-hierarchy Run process for a single queue manager to define the pub/sub-hierarchy
Setup queue manager for pub/sub-cluster Run process for a single queue manager to define the pub/sub-cluster
Setup queue sharing groups Run process to define the groups for queue sharing
Remove queue manager and contents Run process that removes the queue manager (alternate to first remove all of the configurations associated with the queue manager)
Delete configurations Delete one or more configurations previously applied to the queue manager

UrbanCode Deploy IBM MQ architecture

Figure 1 shows the UrbanCode Deploy basic server/agent architecture with IBM MQ. The UrbanCode Deploy server is the point an IBM MQ developer uses to configure processes and execute automated deployment configurations. The UrbanCode Deploy agent is installed locally on the IBM MQ server. At execution, the agent downloads the plugin processes and property values, then applies the configurations to the local IBM MQ server.

Figure 1. UrbanCode Deploy and IBM MQ architecture
Image shows UrbanCode Deploy and IBM MQ architecture
Figure 2. Basic UrbanCode Deploy server and agent architecture
Image shows basic UrbanCode Deploy server and agent                     architecture
Image shows basic UrbanCode Deploy server and agent architecture

UrbanCode Deploy application model

The UrbanCode Deploy configuration model supports the definition of and deployment controls for IBM MQ developers using a logical server type. The UrbanCode Deploy logical configuration model is shown in Figure 3 and described below:

  • The IBM MQ server type is based on its logical role in the architecture and configuration pattern. We plan for the IBM MQ server to be categorized by its role and configuration. Each server type will use a templated configuration model defined by an UrbanCode Deploy application and components. The application includes environments where that IBM MQ type is deployed.
  • Use the application and component templates to manage the configurations easily. Directions on how to configure templates are in the Knowledge Center. (The UrbanCode Deploy application's components implement IBM MQ deployment use cases using the process and associated property file. This model allows you to pattern your deployment use cases by server type and manage how you implement each use case, and audit the changes over time. The entire model is intended to provide the IBM MQ developer or administrator with the ability to use UrbanCode Deploy to:
    • Compare instances server types in the same or different environments
    • Access specific configurations applied to a server instance
    • Use a versioned properties file to define properties and apply new configurations to a server
    • Promote changes to the next environment
    • Automatically replicating a production server's configuration on another server instance
Figure 3. Logical UrbanCode Deploy configuration model

UrbanCode Deploy application

An UrbanCode Deploy application is required for each IBM MQ server type. You'll use the application to deploy and promote all configuration changes for that server type and to each environment where it is deployed. The application model includes a component, derived from a component template, for each IBM MQ management use case the application supports. The application model process includes a resource in each environment for each instance of that IBM MQ server type.

UrbanCode Deploy component templates

Each IBM MQ management use case should be modeled as a component (template) with the associated component processes. The component process includes an initial step to read the property file and create output properties that will be used in the remaining steps of the process. You can elect to use a component template to enable centralized management of each component and process definition IBM MQ administrators use. This provides a means to standardize the patterns applied and promoted to IBM MQ servers in each development environment.

UrbanCode Deploy components

The IBM MQ management application for each server type has one component, derived from the appropriate component template version used to perform a specific use case. The UrbanCode Deploy IBM MQ component process includes an initial step to read the property file (out-of-the-box step in the IBM UrbanCode plugin). By reading the file, this step produces a set of output properties that the follow-on process steps use to perform the configuration. The property file is the only artifact placed in the IBM MQ component version.

UrbanCode Deploy environments and resources

Each UrbanCode Deploy application represents an IBM MQ server type and has one UrbanCode Deploy environment defined for each environment with an IBM MQ server type deployed. An UrbanCode Deploy resource represents each IBM MQ server type instance deployed into an environment. The UrbanCode Deploy resource contains the necessary server information to perform the deployment process. If there are multiple servers in a single environment, use the limit tag to control the scope of each deployment.

Component processes

Important information for the IBM MQ manager plugin is in the UrbanCode Deploy Developer Center:

Each component process model includes an initial step to read the properties file contained in the component version. The properties file is developed by the IBM MQ administrator to provide those component process properties defined for each deployment instance. The read-property file step will output the read properties as output properties in memory used by the remaining steps. Figure 4 shows an example of the process.

Figure 4. Example UrbanCode Deploy component process
Image shows flow of the UrbanCode Deploy component process

Process and step description

This section describes two example component processes that model different use cases: create queue manager and create application connection. The name of the component process represents the name of the use case it implements:

  • Create queue manager— You can only use the create queue manager process to create a new queue manager. This is a basic use case defined to provide the framework to use the application model. Some of the steps shown in Figure 4 are:
    • Read property file is the step from the UrbanCode Deploy file utilities plugin labeled Read properties file. The step parses a property file named value pairs to search for properties defined by element names. The properties read from this file are output properties (in memory) for the remainder of the component process. They can then be used by the subsequent steps in the component process when creating, changing, or deleting IBM MQ resources. Use standard properties file templates for each use case/component. UrbanCode Deploy default plugins provide an alternative step (Read property from XML file) to use an XML file to perform the same function.
    • Create queue manager creates a new queue manager on the IBM MQ server(s) located in the selected environment and related to the component. The properties needed for the example steps include command directory (required), queue manager description (optional), queue manager name (required).
  • Create application connection— You can model this use case with two processes: the remote server or for the server local to the application requiring the communication. Model the component template with both processes. Make sure the application process includes a process step for each process (local server first).

Property file properties

You can manage properties three ways:

  • Environment
  • Resource
  • Within the property file (component version)

When defining component processes, consider where the properties should be maintained (environment, resource, component, application, property file, etc.). In most cases, you can limit the number of properties maintained by the property file and reduce the effort to update these values by each admin/developer.

Table 2 shows a sample set of properties for a few typical IBM MQ process steps. Each UrbanCode Deploy process step includes mandatory or optional values to run. The table lists all of the properties and then categorizes each as reuse or preconfigured:

  • Reuse— Properties used by one or more steps in the component process and are entered in the property file
  • Preconfigured— Properties are environment-, resource-, or use case-specific and do not change for each deployment. Maintain these properties as UrbanCode Deploy properties.

Table 2 shows that you can reduce the number of properties in the property file, maintained by the IBM MQ administrator, from 29 total unique properties to nine. The remaining properties are maintained in UrbanCode Deploy as an application, component, environment, resource or global properties.

Table 2. Example UrbanCode Deploy property alignment
StepNameTypeDescriptionRequiredReusePreconfigured
Create queue manager Command directory String Directory of IBM MQ commands Yes X X
Queue manager description String Descriptive text for queue manager being created, 64-character max No
Queue manager name String Name of queue manager to create Yes
Create local queue Command directory String Directory of IBM MQ commands Yes X X
Delete script file after execution
Boolean Delete script file after executing Yes X
Is batch Boolean Batch multiple commands in one script file and run using run MSQC script command Yes X
Queue manager name String Queue manager to make the queue on Yes X
Queue name String Queue to define Yes
Script file String Name of file to write the script to Yes X
Create remote queue Command directory String Directory of IBM MQ commands Yes X X
Delete script file after execution Boolean Delete script file after executing Yes X
Is batch Boolean Batch multiple commands in one script file and run using run MSQC script command Yes X
Queue manager name String Name of queue manager to make the queue on Yes > X
Queue name String Name of queue to define Yes
Script file String Name of file to write the script to Yes X X
Create receive channel Channel name String Name of receive channel to define Yes
Command directory String Directory of IBM MQ commands Yes X
Delete script file after execution Boolean Delete script file after executing Yes X
Is batch Boolean Batch multiple commands in one script file and run using run MSQC script command Yes X
Queue manager name String Name of queue manager to make the queue on Yes X
Script file String Name of file to write the script to Yes X
Define sender channel Channel name String Name of sender channel to define Yes
Command directory String Directory of IBM MQ commands Yes X X
Connection name String Connection name for this channel Yes
Delete script file after execution Boolean Delete script file after executing Yes X
Is batch Boolean Batch multiple commands in one script file and run using run MSQC Script command Yes X
Queue manager name String Name of queue manager to make the queue on Yes X
Queue name String Name of queue for channel to use Yes X
Script file String Name of file to write script to Yes X

IBM MQ server management deployment process

For this example, to perform an IBM MQ server management deployment, perform the following:

  1. Define change requirements in SCM— This step captures requirements for cross-application changes and assigns work to the IBM MQ administrator.
  2. Get template property file— Enables the IBM MQ developer to locate the correct version of the property template file associated with the use case to execute. One deployment process execution can execute multiple use cases.
  3. Change property file and deliver/review— The IBM MQ developer adds the appropriate property values or reuse.
  4. Create new UrbanCode Deploy component version— In this step, the IBM MQ developer manually or automatically creates a new component version with the newly created or changed property file as the artifact.
    Note: Use a naming convention that helps you to understand what was applied to each server.
  5. Tag the environment resources— The IBM MQ Developer assigns a unique tag for the component processes to use to limit the resources the deployment process is applied to.
  6. Request deployment— Follows standard processes.
  7. Govern deployment— Follows standards for governing deployments within UrbanCode Deploy.
  8. Review results— The user can review all UrbanCode Deploy views, audit what was applied to each resource, and compare across servers and environments.
  9. Manage environment— Performs the management use cases as required.
Figure 5. Server management deployment steps
Image shows server management deployment steps
Image shows server management deployment steps

Incremental deployments

The UrbanCode Deploy deployments need to be incremental. This allows it to consider the set of changes (because they are independent) when promoting, creating snapshots, and comparing environments/servers. When you deploy any changes to a new server, UrbanCode Deploy compares the set of changes (based on the versions of each component) and only applies the missing changes.

Environment management use cases

The environment management use cases, shown in Table 3, are representative of the activities required to configure new instances of IBM MQ server types, manage change across environments, and monitor activities.

Table 3. Environment management use cases
Use caseDescription
Replicate IBM MQ server Create a new instance of an existing IBM MQ server based on its configuration in a production environment.
Monitor configurations Monitor configurations applied to a standard (production environment) server.
Manage change To maintain consistency, when a change is applied to an IBM MQ server in one environment, the same change is applied to the appropriate server in other environments.
Compare environment configurations Compares configurations of servers across environments to understand differences in servers.

Replicate IBM MQ server

IBM MQ developers use UrbanCode Deploy snapshots to replicate a server or server type in another environment. A snapshot allows you to select all the incremental versions applied to the server to capture and apply to a resource in another environment.
Note: Only versions not applied to the new server run when you deploy by snapshot.

Monitor configurations and manage change

Use the UrbanCode Deploy auditing and compliance features to monitor configurations and manage changes to each server and all servers of the same type. For example, you can compare snapshots of IBM MQ server types or servers, and you can review the list of changes applied to a selected server.

Compare environment configurations

Use naming conventions for each version of a component to explain the changes made with the property file values. Use the UrbanCode Deploy reports and views to audit and review versions and artifacts and the status of all IBM MQ server changes. Comparing environments or snapshots can also provide a detailed difference report.

Conclusion

In this tutorial, we provide a model for automating IBM MQ configuration deployments for IBM MQ server and environment management. UrbanCode Deploy provides a relatively simple means to model, deploy, and audit IBM MQ deployments. Use of UrbanCode Deploy's standard automation and governance features can reduce the effort to manage IBM MQ servers, update configurations, or recreate new environments from existing servers. Using the model presented here will help you to realize these benefits of UrbanCode Deploy for IBM MQ configuration deployments.


Downloadable resources


Related topics


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=DevOps, Middleware, WebSphere
ArticleID=1037226
ArticleTitle=Support continuous configuration deployments for IBM MQ with UrbanCode
publish-date=10072016