Chapter 7. Advanced Autonomic Management Engine topics 247
7.2 Structure of resource model
The resource model ZIP file is one single ZIP file with <RMType>.zip as the
name format. The <RMType>.zip file is composed of a set of other ZIP files that
have __<interp>__<RMType>.zip as the name format. These files are used by
the AME and are called interp dependent files. The resource model package
structure is:
interp Indicates the platform for which the resource model is
designed. For example, w32-ix86 indicates the supported
Microsoft Windows platforms. Allowed values are
w32-ix86, hpux10, os400, solaris2, linux-ix86, os2-ix86,
aix4-r1, linux-s390, and zos.
RMType A single resource model can be designed to run on
several interp types. The resource model bundle contains
one interp-dependent file for each interp. Example 7-9
shows a resource model bundle for a resource model
designed for the solaris2 and w32-ix86 platforms.
Example 7-9 Generic structure of a resource model
<RMType>.zip
{
__w32-ix86__<RMType>.zip
__solaris2__<RMType>.zip
}
For a resource model installation on a particular platform, only the associated
interp-dependent file is considered; all other entries in the ZIP file are skipped.
In the example shown in Example 7-9, on a Windows platform, only
__w32-ix86__RMType.zip is considered. If it is not found, the installation fails.
Example 7-10 on page 248 shows the structure of the __interp__<RMType>.zip
file.
Note: Operating systems might have a limit on the length of the command or
the length of the environment variables. This creates difficulties when the
“SET CLASSPATH” (or equivalent) command in the command prompt
exceeds the limit defined by the OS. A workaround is to clear the
CLASSPATH environment variable before starting the AME.
248 Problem Determination Using Self-Managing Autonomic Technology
Example 7-10 Generic structure of a resource model type
__interp__<RMType>.zip
{
RMType.js
RMType.xml
msgcat/<locale>/<RMType>.cat
Class/<RMType>_<locale>.class
[One or more .mof files]
[One or more jar files / native shared libraries implementing
ILTs]
}
The structure includes:
RMType.js This file has the JavaScript code, which is executed after
the resource model is installed and started.
RMType.xml This is an XML file that contains various parameters that
control the resource model.
RMType.cat This is a catalog file that has the strings used in the
resource model.
As shown in Example 7-10, the resource model bundle actually includes two
message bundles:
msgcat/<locale>/<RMType>.cat
Class/<RMType>_<locale>.class
Both of these contain the same messages. The difference is that one is a
message catalog (.cat), and the other is a Java resource bundle (.class).
Although a message catalog is included in the resource model bundle, the AME
does not use it. It is there for the convenience of an embedding application. The
plug-ins that are included with the AME only use the Java resource bundle by
default.
7.2.1 Directory tree structure
After the resource model is installed with the AME, the following directory
structure is created. Note that the location of the Customscripts subdirectory
should be read as work\rmbundles\Customscripts in the following information.
work The working directory contains runtime information.
eif This directory contains the EIF event sink cache and is
present only if the event sink is used.
m12 This directory contains the CIM-related runtime
information (MOF files installed, and so on).
Chapter 7. Advanced Autonomic Management Engine topics 249
rmbundles This directory contains installed resource model code
for unpacking resource model bundles.
.installed This directory contains a signature file that has
information about the resource models installed.
Classes\<ClassName> This directory contains all the Java Archive
(JAR) files that are added as a dependency to
the resource model. The <ClassName> is the
value of the class specified while building the
resource model in the Resource Model Builder.
Config The resource model descriptor file is stored in
this folder.
Customscripts Any file other than a JAR file added as a
dependency is extracted to this folder.
Dec The JavaScript code that would be executed
after the resource model is installed and started
is extracted to this folder.
Mof The MOF file used by the resource model is
extracted to this folder.
Msgcat The catalog file that has the strings and
messages used in the resource model is
extracted to this folder.
RME This directory contains AME runtime information
(resource model instances, contexts, and so on).
7.2.2 The rme.config file
The parameters required by the AME to install the resource model are specified
in the rme.config properties file. This file should be present in the JAVA classpath
referenced by the AME. A default copy of this file is provided with the AME.
This file should contain at least the following keys:
򐂰 dir.anchor
The root directory where the engine creates its resource models’ deployment
tree.
򐂰 dir.schemas
Schema directory containing both engine-generated basic schemas and
custom action launchers and sinks.

Get Problem Determination Using Self-Managing Autonomic Technology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.