Anda di halaman 1dari 65

Administration basics

© Copyright IBM Corporation 2013


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 8.0
Unit objectives
After completing this unit, you should be able to:
• Use IBM Integration Bus commands, IBM Integration Explorer, the IBM
Integration web console, and the IBM Integration API Exerciser to
administer the integration node
• Back up and restore critical resources

© Copyright IBM Corporation 2013


Topics
• IBM Integration Bus commands
• IBM Integration Explorer
• IBM Integration web console
• IBM Integration API overview
• Backing up and restoring resources

© Copyright IBM Corporation 2013


IBM Integration Bus
commands

© Copyright IBM Corporation 2013


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 8.0
Using administrative commands
Windows
• Run mqsiprofile command to set up command environment or
use preconfigured IBM Integration Console for command processing
• Component names and commands not case-sensitive

Linux and UNIX


• Run mqsiprofile command to set up command environment
• Commands must be lowercase
Example: mqsistart
• Component names case-sensitive

© Copyright IBM Corporation 2013


Starting, stopping, and deleting an integration node
• Set up command environment or use IBM Integration Console
(Windows)

• On Linux, UNIX, and Windows:


mqsistart inodeName

mqsistop inodeName [options]


–q option stops the associated queue manager
–i option forces an immediate stop without quiesce

mqsideletebroker inodeName [options]

• An integration node must be stopped before it can be deleted

© Copyright IBM Corporation 2013


Password prompt option
• Password parameter prompts the user for password if one is not
supplied
• Password is not revealed on screen

Example:
> mqsisetdbparms IB9NODE –n SAMPLEDB –u DBUserID
Enter password for userid
Retype password for userid
...
BIP8071I: Successful command completion.
>

© Copyright IBM Corporation 2013


Modifying an integration node
• Modify the value of many of the parameters that were set when the
integration node was created

• On Linux, UNIX, and Windows:


mqsichangebroker inodeName [options]
Example: mqsichangebroker IB9NODE –d defined
Set the integration node WebSphere MQ status to “defined” so that the
integration node starts and stops when its associated queue manager
starts and stops

• An integration node must be stopped before it can be modified

© Copyright IBM Corporation 2013


Integration server commands
• Create an integration server
mqsicreatexecutiongroup inodeSpec –e iservername
[-w timeoutSecs][-v traceFilename]

Example: Create an integration server that called IS2 on the integration node
that the connection parameters in file TESTNODE.inode defines
mqsicreateexecutiongroup –n TESTNODE.inode –e IS2

• Delete an integration server


mqsideleteexecutiongroup –b inodeName –e iserverName
[options]
• Reload an integration server
mqsireload inodeName [-e iserverName]

© Copyright IBM Corporation 2013


Message flow commands
• Start a single message flow, deploy all message flows deployed to an
integration node, or deploy all message flows to an integration server
mqsistartmsgflow inodeSpec [options]

Example: Start a message flow that is named “Flow1” on integration server “IS1”
on integration node “IB9NODE”
mqsistartmsgflow IB9NODE -e IS1 -m Flow1
• Stop a message flow
mqsistopmsgflow –b inodeName [options]

• Change or report message flow statistics


mqsichangeflowstats [options]
mqsireportflowstats [options]

• Change or report message flow user exit


mqsichangeflowuserexit [options]
mqsireportflowuserexit
© Copyright IBM Corporation 2013
Create a BAR file from a command
mqsicreatebar
• Creates deployable BAR files that contain message flows and resources
• Requires access to workspace
• Must run the command from the IBM Integration Toolkit installation directory
• Supported on Windows and Linux on X86 only
Example: mqsicreatebar -data C:\Workspace -b myflow.bar
-p MyFlowProject -o MyFlowProject\MyFlow\Test.msgflow

mqsipackagebar
• Creates deployable BAR file on computers that do not have the IBM Integration
Toolkit installed
• Resources are not compiled when they are added
• Supported on Windows, Linux, UNIX, and z/OS
Example: mqsipackagebar -w C:\Workspace -a myflow.bar
-o MyFlowProject\MyFlow\Test.msgflow

© Copyright IBM Corporation 2013


Modifying a BAR file from a command
mqsiapplybaroverride
• Replaces configurable values in the BAR deployment descriptor with new values
specified in a properties file
Example: Open the BAR file myflow.bar, and replace configurable values in its
deployment descriptor with the values that are specified in the properties file
my.properties
mqsiapplybaroverride -b myflow.bar -p my.properties

mqsireadbar
• Reads a deployable BAR file and identifies configurable values
• Add –r option to run the command recursively and show the contents of all
applications and libraries
Example: mqsireadbar –b myflow.bar -r

© Copyright IBM Corporation 2013


Deploy a BAR file from a command
mqsideploy
• Issue a deployment request to the integration node
• Default operation is a delta or incremental deployment
• Select -m to do a full deployment
• If integration node administration security is enabled, user must have “read”
authority on the security queue SYSTEM.BROKER.AUTH, and write authority on
the security queue SYSTEM.BROKER.AUTH.IS (where IS identifies the profile for
the integration server)
• On Linux and UNIX, the user must be a member of the group mqbrkrs

Example: mqsideploy -n b1.node -e IS1 -a mybar.bar -m


Deploy the BAR file mybar.bar to the IS1 integration server in the integration
node that the connection parameters in the file b1.node identifies.
Remove all deployed artifacts from the integration server as part of the
deployment.

© Copyright IBM Corporation 2013


Security commands
• Create the Windows groups that IBM Integration Bus requires for
secure access to its runtime libraries and data
mqsisetsecurity

• Force the immediate expiry of some or all the entries in the security
cache
mqsireloadsecurity inodeSpec [options]

Example: Reload the cache for a list of users on the specified integration node,
and wait for 5 seconds before returning
mqsireloadsecurity My_Inode user1:user2:user3 -w 5

© Copyright IBM Corporation 2013


Modify integration node properties command
mqsichangeproperties inodeName objectType –o ObjectName
–n PropertyName –v PropertyValue [options]

• Modify the properties of an integration node, integration server, or


configurable service
– Integration node must be running
– Must stop and restart the integration node for command to take effect

Example: Disable the integration node HTTP listener


mqsichangeproperties IB9NODE -b httplistener
-o HTTPListener -n startListener -v false

© Copyright IBM Corporation 2013


Report integration node properties command

mqsireportproperties inodeName [-b componentName |


–e iserverName | -c configurableService] –o ObjectName
[-n propertyName] [options]

• Show the properties of an integration node, integration server, or


configurable services
– Integration node must be running
– Change is applied only after you stop and restart the integration node or
integration server

Example: Check whether the deployed HTTP nodes are using the embedded
listener for the integration server
mqsireportproperties IB9NODE -e default -o ExecutionGroup
-n httpNodesUseEmbeddedListener

© Copyright IBM Corporation 2013


Problem determination commands
• Change or report component details
mqsiservice [-v] componentName

• List all the IBM Integration Bus:


– Components that are installed on a system
– Integration servers that are defined to an integration node
– Message flows that are contained in a named integration server on a specific
integration node
mqsilist <[–a] | inodeSpec [-e iserverName]> [-r]
[-d detailLevel]
[-v traceFileName]

© Copyright IBM Corporation 2013


Creating command scripts
• Automate common tasks
• Eliminate typing errors

• Use common scripting tools


– UNIX or Linux Shell
– Windows Batch
– Apache Ant: Open source tool that is based on Java that can run scripts that are
written in XML format

© Copyright IBM Corporation 2013


Example batch file
CALL "\IBM\MQSI\9.0.0.0\bin\mqsiprofile.cmd"
SET Inode=IB9NODE
@IF '%1' NEQ '' SET Inode=%1 Report integration
node statistics
@echo on
mqsiservice %Inode%
mqsireportflowstats %Inode% -a -s -g -j

mqsiservice reports component details

mqsireportflowstats shows the current options for accounting and statistics:


–a Include stored settings for the archive accounting and statistics collection
–s Include stored settings for the snapshot accounting and statistics collection
–g Command applies to all integration servers that belong to the integration node
-j Command applies to all message flows that belong to the integration server

© Copyright IBM Corporation 2013


Example Ant script
<?xml version="1.0"?>
<project name="project" default="run">
<target name="run" description="">
<property name="toolkit.home" value="C:\IntegrationBus\900" />
<property name="ant.bars.basedir" value="C:\Dev\intserver" /> <property
name="workspaces.dir" value="${ant.bars.basedir}\workspace" />
<property name="bar.name" value="${ant.bars.basedir}\postcard.bar" />
<antcall target="mqsicreatebar.buildbar" />
</target>
<target name="mqsicreatebar.buildbar">
<echo message="Building BAR file: ${bar.name} " />
<exec executable="${toolkit.home}\eclipse\mqsicreatebar.exe“
spawn="false">
<arg value="-data" />
<arg value="${workspaces.dir}" />
Build a BAR file from source files
<arg value="-b" />
<arg value="${bar.name}" /> with the mqsicreatebar
<arg value="-p" /> command
<arg value="Postcard" />
<arg value="PostcardFlow" />
<arg value="-o" />
<arg value="Postcard\Postcard\messageSet.mset" />
<arg value="PostcardFlow\PostcardFlow.msgflow" />
</exec>
<echo message="Completed building BAR file - ${bar.name} " />
</target>
</project>
© Copyright IBM Corporation 2013
IBM Integration Explorer

© Copyright IBM Corporation 2013


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 8.0
IBM Integration Explorer
• Administration and operator console
– WebSphere MQ Explorer plus integration node administration
– Uses existing WebSphere MQ Explorer installation
– Can be run as a stand-alone application
– Contains a full stand-alone information center
• Import, customize, and deploy BAR files
• Manage integration node environments
• Up-to-date status
– Information direct from the integration node
– Manage the integration node affected queues
– Create and manage configurable services
– Log for all users of the integration nodes
– Graphical statistics view and control

© Copyright IBM Corporation 2013


Graphical administration consistent with WebSphere MQ

• Integration nodes and queue managers


are shown in the same perspective
• All local integration nodes are shown
• Ability to manage remote integration
nodes
• Visual status indicators
• Link to queue managers and affected
queues
© Copyright IBM Corporation 2013
IBM Integration Explorer: Navigator

Full WebSphere MQ
administration

Integration nodes

Icons to indicate
integration nodes,
integration servers, and
message flow status

All BAR files in the


workspace

© Copyright IBM Corporation 2013


IBM Integration Bus status icons

Local integration node is running Local integration node is stopped


and connected and connected
Local integration node is running Local integration node is stopped
and disconnected and disconnected
Remote integration node connected Remote integration node disconnected

Integration server is started Integration server is stopped

Flow started Flow stopped

BAR file Deployed dictionary

Deployed XSLT Deployed JAR

© Copyright IBM Corporation 2013


Using integration sets to group integration nodes
• Use tags to create an integration set to
visually group integration nodes
– Manual integration set is empty until
integration nodes are added to the
integration set from the All integration set or
another integration set
– Automatic integration set uses integration
node tags to dynamically add and remove
integration nodes from a set that is based on
provided values or the current state of the
integration nodes
• Similar to grouping queue managers

© Copyright IBM Corporation 2013


Creating an integration set (1 of 3)

1
Right-click Integration Nodes
in the Navigator and then select
Integration Sets > New
Integration Set

© Copyright IBM Corporation 2013


Creating an integration set (2 of 3)

2
Enter a descriptive name.

3
Select Manual or Automatic.

4
Click Next.
© Copyright IBM Corporation 2013
Creating an integration set (3 of 3)

5
Set condition

6
Add filters from
Available filters
list

7
Click Finish

© Copyright IBM Corporation 2013


Deployment process
1. Prepare BAR file
– Build BAR files in IBM Integration Toolkit
– Import BAR files into IBM Integration Explorer or drag files from Integration
Toolkit
– Customize BAR file if necessary (BAR file properties and configurable
properties)
2. Create integration server, if not already created
3. Deploy

• Deployment takes place in background


• Flows and Administration Log update when deployment is complete

© Copyright IBM Corporation 2013


Multiple deployment methods
• Drag BAR file from file system
• Drag BAR file from Integration Toolkit navigator to integration server in
IBM Integration Explorer
• Drag BAR file from Bar Files folder in IBM Integration Explorer to
integration server
• Right-click integration server and click Deploy to deploy several BAR
files
– From file system
– From IBM Integration Explorer workspace
• Right-click BAR file and click Deploy File to deploy a BAR file to a
group of integration servers for simultaneous deployment of a single
BAR file
• Select BAR file and click Deploy Bar to Integration Server

© Copyright IBM Corporation 2013


BAR file content

Open BAR File


editor
© Copyright IBM Corporation 2013
Integration node views

Integration node
identification

Integration node
status

Integration node
version and operating
system

© Copyright IBM Corporation 2013


Integration node properties

Properties vary with


the selected property
group

Property
groups

Change properties, and


then click Apply or OK

© Copyright IBM Corporation 2013


Integration server management (1 of 2)

Control options to deploy,


restart, start, stop, and refresh
integration servers

Configuration options to rename,


delete, enable statistics, trace, and
modify integration server properties

© Copyright IBM Corporation 2013


Integration server management (2 of 2)

Integration server
properties for the selected
integration server

Integration server
contents and state

© Copyright IBM Corporation 2013


Message flow management options

Message flow control,


configuration, monitoring, and
troubleshooting options

© Copyright IBM Corporation 2013


Message flow and node properties
Selected message flow

Message flow properties

Node properties

© Copyright IBM Corporation 2013


Configurable services
• Runtime properties for integration node external services
– Use IBM Integration Explorer Configurable Services wizard to create configurable service from
an existing one
– Import and export configurable services files to the integration node from other integration nodes
– Drag Configurable Services directory between integration nodes

© Copyright IBM Corporation 2013


Configurable Service wizard

• Shows the equivalent command that is


available to copy and paste
• Can base a configurable service on one
already on the integration node

© Copyright IBM Corporation 2013


Administration Queue
• Shows pending and submitted tasks that
were sent to the integration node and are
waiting to be processed
• Use IBM Integration Explorer to view task
properties, and to cancel tasks in the queue
– Order
– Status
– User name
– Operation Type
– Object Name
– Object Type
– Creation Time
– Elapsed Time
– Identifier

© Copyright IBM Corporation 2013


IBM Integration Explorer preferences

Click Window >


Preferences

© Copyright IBM Corporation 2013


IBM Integration web
console

© Copyright IBM Corporation 2013


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 8.0
IBM Integration web console

• Access integration node resources through an


HTTP client
• Alternative to the IBM Integration Explorer for
some integration node administration
functions
• Support for most browsers
© Copyright IBM Corporation 2013
Setting up the IBM Integration web console
1. Configure a web console server
– Enabled by default for all new integration nodes when they are created
– Assigned to port 4414
– Can be disabled at any time by using mqsichangeproperties command

2. Use the mqsiwebuseradmin command to create web user accounts


for your web users
– Grant permissions to the roles that are associated with web users to control
who can start and stop integration servers, applications, and message flows
from the web console
– Restrict web users' access to data and integration node resources if integration
node administration security is enabled

3. Log on to the web console server through the IBM Integration web
console

© Copyright IBM Corporation 2013


Message flow management in the web console

• Start message flows


• Stop or force stop message flows
• Enable and view statistics
• Attach workload management policies
© Copyright IBM Corporation 2013
IBM Integration API
overview

© Copyright IBM Corporation 2013


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 8.0
IBM Integration Java API overview
• Java programming interface that applications can use to control
integration nodes and resources
• Also known as the Configuration Manager Proxy (CMP) API
• Uses service-oriented type architecture
• JAR file ConfigManagerProxy.jar supplies all the classes
• Requires WebSphere MQ Classes for Java for connectivity
• Samples demonstrate typical scenarios
JVM
User
Application CMP Java classes
Integration node
WebSphere MQ Classes Integration node
for Java
Integration node

© Copyright IBM Corporation 2013


Available integration actions
• Deploy BAR files
• Change the integration node configuration properties
• Create, modify, and delete integration servers
• Inquire and set the status of the integration node and its associated
resources, and generate information if status changes
– Integration servers
– Deployed message flows
– Deployed files that message flows use (for example, JAR files)
• View the Administration log
• View the Activity log
• Create and modify message flow applications

© Copyright IBM Corporation 2013


IBM Integration API service trace
• Logs all calls to the IBM Integration API to the output file
– Identifies the APIs that the user application called, and with what arguments
– Logs messages that are sent to or received from the integration node
• Trace file is not circular and it has no maximum size

1. Set the environment variable MQSI_CMP_TRACE, where <filename>


is the name of the file to which the trace is sent:
export MQSI_CMP_TRACE=<filename>

2. Enable tracing by adding the API call in the code:


BrokerProxy.enableAdministrationAPITracing(“tracefile.txt");

© Copyright IBM Corporation 2013


IBM Integration API samples
• Deploy BAR deploys a BAR file to a predefined integration server
• Integration node (broker) management shows the complete run state
of an integration node
• IBM Integration Java API (CMP) Exerciser
– Graphical interface to the IBM Integration API to view and manage an integration
node, or record and play back configuration scripts
– Started from Start menu on Windows or from shell script on UNIX
– Lightweight alternative to IBM Integration Toolkit

© Copyright IBM Corporation 2013


IBM Integration API (CMP) Exerciser

Table entries that


Hierarchical are based on the
representation of the selected object
integration node,
integration servers,
and message flows

Log and script


window

© Copyright IBM Corporation 2013


Starting the IBM Integration API Exerciser
1. On Windows, click All Programs > IBM Integration Bus 9.0.0.0 >
IBM Integration Java APIs > Integration Java API Exerciser.

2. Connect to a running integration node (broker) by clicking File >


Connect to Local Broker or File > Connect to Remote Broker.

3. Enter the connection parameters to the integration node and then


click Submit.

© Copyright IBM Corporation 2013


Backing up and restoring
resources

© Copyright IBM Corporation 2013


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 8.0
Back up and restore
• Back up and restore commands for disaster recovery
• Operational state not saved
• Backs up configuration state from the file system
– Internally managed integration node configuration store
– Artifacts that are deployed from BAR files
– Shared configuration
– Registry Configuration
and registry
• Online backups are supported
Application
databases

WebSphere MQ Java client


Integration
node
IBM Integration
Toolkit workspaces Queue manager

© Copyright IBM Corporation 2013


Back up the integration node
mqsibackupbroker inodeName –d dirName [-a archiveName]
[-v traceFileName] [-f]

• Creates a record of the current configuration of an integration node in a


file, in compressed file format
• Backs up persistent configuration data that is associated with the
integration node:
– Deployed resources: Message flows, dictionaries, JAR files, and other runtime
resources that are deployed in a BAR file
– Integration servers
– Integration node configuration
• Does not back up:
– Transient information such as inflight aggregations or collections
– Runnable code, including resources that are associated with user-defined
extensions (nodes, parsers, and exits)
– Resources that message flows require to function correctly such as
WebSphere MQ queues and data that is stored in user databases
© Copyright IBM Corporation 2013
Restore the integration node

mqsirestorebroker iNodeName –d dirName –a archiveName [-c]


[-v traceFileName]
• Use the archive (backup) file to restore an integration node on a
computer that has an identical configuration
– Operating system must be at the same level
– Integration node and queue manager names must be identical
– Option (-c) to restore all configuration data that is shared with other integration
nodes on the same computer (for example, profiles)
• Always stop the integration node before running this command

Example:
mqsirestorebroker IB9NODE -d C:\MQSI\BACKUP
-a 20090101.zip

© Copyright IBM Corporation 2013


Backing up and restoring IBM Integration Toolkit
• Back up Eclipse workspace directory
– On Windows, default directory is
C:\Users\<user>\IBM\IntegrationToolkit90\workspace
(in most cases, <user> is Administrator)
– Directory can contain applications, libraries, or projects
– Also contains .metadata subfolder
• Subdirectories match folders in IBM Integration Toolkit Application
Development view
• Either use the Export option to make a compressed (.zip) file of the
folders or copy the folders to another location on the file system
• Restore by using the Import option or copying the folders
• Instructions in Eclipse online help

© Copyright IBM Corporation 2013


Backing up application databases
• Integration node depends on a database for runtime information when it
is referenced in a message flow
• Establish database backup procedures with the appropriate backup
commands for the database manager that you are using

Example for DB2 backup:


DB2 BACKUP DATABASE SAMPLE TO D:\Backup

© Copyright IBM Corporation 2013


IBM Integration Bus environment recovery considerations
• Recovering the integration node configuration is only part of the
recovery process
• Other components that might need to be recovered:
– Application servers
– Database servers
– IBM Integration Bus development artifacts such as applications, integration
services, and data models
• Ensure that backups can be restored
• Test the restoration process regularly
• Test full restore scenario for disaster recovery and business continuity
planning

© Copyright IBM Corporation 2013


Unit summary
Having completed this unit, you should be able to:
• Use IBM Integration Bus commands, IBM Integration Explorer, the IBM
Integration web console, and the IBM Integration API Exerciser to
administer the integration node
• Back up and restore critical resources

© Copyright IBM Corporation 2013


Checkpoint questions
1. True or False: Every IBM Integration Bus command that can be
issued with a command has an IBM Integration Toolkit equivalent.

2. True or False: The IBM Integration API provides an application


programming interface to the integration node.

3. True or False: It is possible to create and manage a remote


integration node from IBM Integration Explorer.

© Copyright IBM Corporation 2013


Checkpoint answers
1. False. Many commands, such as configuration and trace commands, do not
have an equivalent in the IBM Integration Toolkit (that is, they can be run only as
line commands).

2. True.

3. False. You can manage a remote integration node but you cannot create a
remote integration node with IBM Integration Explorer.

© Copyright IBM Corporation 2013


Exercise 3

Administering the runtime


components

© Copyright IBM Corporation 2013


Course materials may not be reproduced in whole or in part without the prior written permission of IBM. 8.0
Exercise objectives
After completing this exercise, you should be able to:
• Administer IBM Integration Bus components by using IBM Integration
Bus commands, IBM Integration Explorer, and the IBM Integration web
console
• Create an integration set in IBM Integration Explorer
• Back up and restore the integration node and its configuration data

© Copyright IBM Corporation 2013

Anda mungkin juga menyukai