Application packaging methods supported by VMBC

VM Build Container supports three options for packaging your application for virtual appliance creation: a directory of deployable units, a Rhino export, or a Sentinel package.

Deployable units

Deployable units (DUs) are packages of compiled application code, which you can install into the Rhino Service Logic Execution Environment (SLEE). After the installation and appropriate configuration, the application can run in Rhino and handle network traffic.

Rhino export

It is possible to take a snapshot of a Rhino SLEE, most commonly as a method of backing up the SLEE contents so they can be restored later in the event of a problem. This snapshot is called a Rhino export. The page About Rhino Exports in the Rhino documentation explains what exports are and what they contain.

Sentinel package

The standard approach for applications built using the Sentinel platform is to package its components into one or more Sentinel SDK modules. The SDK modules, together with any configuration files and scripts, can then be put into a Sentinel standalone package which provides an easy method of installing and configuring the application in Rhino.

Choosing between a directory of deployable units, a Rhino export, or a Sentinel package

VM Build Container allows you to create VMs running your Rhino application from any of these three methods.

  • For the vast majority of Rhino applications, we recommend using a directory of deployable units. This is the simplest method as, once the application has been compiled, it requires no further steps to prepare for use in VMBC beyond copying all the relevant du.jar files into a directory.

  • If your application is based on the Sentinel platform, we recommend using a Sentinel standalone package.

  • In rare cases, notably if your application uses advanced Rhino features such as bindings or linked components, use a Rhino export.

The following sections describe each of these input methods in more detail.

Preparing applications for VMBC

Prepare an application as a directory of deployable units

In the input directory for VMBC, create a directory named du. Place into this directory any deployable units that form part of your application, including but not limited to:

  • resource adaptors

  • resource adaptor types

  • profile specifications

  • services and SBBs

  • event types

  • dependencies of any of the above, for example third-party libraries.

Important

All deployable units must be jar files with names ending in du.jar.

Do not include any jar files for built-in Rhino components, such as API compatibility types (rhino-api-compatibility-<version>.du.jar) or the session ownership RA (session-ownership-resource-adaptor[-type].du.jar). Otherwise, Rhino raises an error indicating that the component is already installed.

Note

VMBC will install your DUs into Rhino, but for your services to function, you will need to create any RA entities, profile tables and profiles they require, and create links between these components and your SBBs.

We recommend that you use build hooks to create profiles, RA entities, RA link name bindings, and maybe set some default RA entity properties. Then, use initconf hooks to set RA entity properties and profile attributes based on configuration provided at runtime, and activate services and RA entities.

Prepare an application as a Rhino export

Install your application into Rhino locally

After writing your application, you first need to deploy the application into Rhino version 3.2 locally. It does not matter if you use an SDK or production Rhino deployment for this purpose.

This guide does not describe how to write your application or how to deploy it into Rhino; this is described in the Rhino documentation.

Important

If installing into a production Rhino deployment, ensure no per-node activation state is set before taking an export. You can achieve this using the setdefaultdesiredstatefromnode or removepernodedesiredstate commands. For more information about these commands, run help declarative in the Rhino console.

Create a Rhino export

The VM Build Container takes as input a Rhino export created from a local deployment of your application into Rhino. It then creates a VM image containing your application by importing your export into a production Rhino on the VM.

Perform these steps to create your Rhino export.

  1. Find your Rhino home directory, and cd into it.

  2. Run the rhino-export command, making sure to provide the -s option:

    If exporting from a Rhino SDK installation, run:

    ./client/bin/rhino-export -J -s my_rhino_export

    This will create a my_rhino_export directory in your Rhino home directory. For more details on how to run the rhino-export command, refer to the Rhino administration guide.

    Important

    It is important to specify the -s flag to rhino-export to ensure configuration will not be included in the export. This is to ensure no compatibility issues occur (when exporting from SDK Rhino) and to ensure no incorrect configuration gets applied to the resulting VM.

  3. Create a zip file of your Rhino export:

    cd my_rhino_export
    zip -r ../rhino-export.zip .

    Copy the rhino-export.zip file to the VMBC input directory.

  4. You can now remove the my_rhino_export directory if desired:

    cd ..
    rm -rf my_rhino_export

Prepare an application as a Sentinel package

To create a Sentinel package, follow the instructions on the Sentinel standalone packages page. Name your output file sentinel-package.zip. Make sure you add .zip to the output name so the package gets saved as a zip file.

Copy the sentinel-package.zip file to the VMBC input directory.

Previous page Next page