Headless deployment of a monitor model

It is possible to generate the Java™ 5 Platform, Enterprise Edition (Java EE) application code for a given monitor model without starting the Business Monitor development toolkit. This is called headless deployment, meaning that it does not require a user interface, and is useful for automated development and testing and can also be used in a production environment. The monitor model file and all of the supporting source files produced by the Monitor Model editor can be exported as a project interchange file and used as input for the headless deployment.

Before you begin

Before running headless deployment, validate the model either by using headless validation or by fixing all errors in the Monitor Model editor.

About this task

The mmdeploy script is basically a generator. It takes a .zip file containing Eclipse projects and generates an EAR file for a monitor model. Like the WebSphere® Application Server ejbdeploy and the Integration Designer servicedeploy scripts, the mmdeploy script does not deploy an EAR file to the server; it just produces the EAR file.

Headless deployment uses the mmdeploy script at the command line. The command has the following format:
mmdeploy -pi <project_interchange_file> -w <working directory>
-ear <path/filename_of_ear_file> -mm /<monitor_model_project>/<mmfile.mm> [ options ]
Where:
  • <project_interchange_file> is a project interchange (PI) file that was generated from the Monitor Model editor using File > Export > Other > Project Interchange. The PI file must contain a project with a single monitor model and its associated event definitions. The event definitions can reside in the same project as the monitor model or in an associated project. If the events are in an associated project, both projects must be included in the PI file that is used as input to the mmdeploy command.
    Restriction: Because only one monitor model can be processed by this command, the business monitoring project in the PI file must contain only one monitor model.
  • <working directory> indicates the temporary working directory that contains the model file
    Important: The workspace must not be in use by another process.
  • <path/filename_of_ear_file> is the name to use for the resulting enterprise archive (EAR) file, which is the file that can be deployed to the IBM® Business Monitor 8.0 server. If the EAR file already exists at the specified location, it is overwritten.
  • /<monitor_model_project>/<mmfile.mm> is the name of the monitor model project that the monitor model resides in and the name of monitor model to use in the project interchange file. You must use forward slashes (/) with your path name.
For example, you could run this from your installation directory, such as C:\WID62installation\runtimes\bi_v62\bin:
mmdeploy -pi C:\Models\StockTradeBPELV5PI.zip -w C:\workingDir -ear C:\Models\StocktradeBPELV5.ear -mm /StockTradeBPELMM/StockTradeBPELBRHTM.mm
Available options are as follows:
-novalidation
Turn off monitor model validation.
-ignorevalidation
Do not stop for validation errors.
-keep
Do not clean up on exit.
-w <workingdir>
Specify a temporary working directory.
-trace
Trace the progress of the deploy tool.
-tracefile <tracefile.log>
Specify a log file for trace output.

You can find the mmdeploy.bat file in the bin directory of your WebSphere Application Server or in your toolkit.

Essentially, the mmdeploy script has the following command format:
java -cp "%PathToRADInstallDirectory%startup.jar" org.eclipse.core.launcher.Main
-application com.ibm.wbimonitor.deploy.mmdeploy.MonitoringModelDeploy
-data "%WorkspaceDirectory%"
-pi %ProjectInterchangeFileName%
                               %*