What is a Standalone Package

A standalone package is a flattened version of one or more modules, containing the deployable units and required configuration in a simple format. It can be used to deploy modules into Rhino without relying on Ivy or the creating SDK.

Standalone Package Structure

Standalone packages are simply zip files that contain the same artifacts and configuration as ordinary Sentinel SDK modules, just in a different format. This is an example of what can be in a standalone package:

standalone-package.zip
  ├── config/ 1
  │   ├── ...
  │   ├── scc-fetch-msrn-feature/
  │   │   └── config.ant.xml
  │   └── ...
  ├── deployable-units/ 2
  │   ├── ...
  │   ├── sentinel-avp-cdr-format8917347335461977254.du.jar
  │   └── ...
  ├── deploy-scripts/ 3
  │   ├── sentinel-cdr-ra-deploy/
  │   │   ├── cdr-profile-spec.du.jar
  │   │   ├── cdr-ra.du.jar
  │   │   └── ...
  │   └── ...
  ├── build.xml 4
  ├── environment.properties 5
  └── set-tracers.commands 6
1 Module-specific configuration files
2 The artifacts to be deployed
3 Contains directories used to deploy some products using Ant scripts
4 The main Ant build file, whose default build target installs the whole product
5 Properties to be set locally, including the location of the Rhino client directory
6 Rhino console script to set SBB tracers in Rhino, which gets called from the build.xml file

Each module in the dependency hierarchy of the parent module that the package gets created from will result in four targets in the build.xml file:

  1. deploy-<module-name>-with-deps

  2. deploy-<module-name>

  3. configure-<module-name>-with-deps

  4. configure-<module-name>

The original Ivy dependency hierarchy will be reflected in the dependencies of these Ant targets. In addition a few top-level targets will be generated that depend on the deploy, bind and configure targets of the root module.

Creating a Standalone Package from an SDK Module

In this section, we assume the we have an existing module called my-module, and we want to create a standalone package for my-module and its dependencies. For more details on how to create a module see Creating a new module.

Note that the module needs to have been published by running ant publish-local before a package can be created from it. A standalone package is always created based on the published version found in Ivy, rather than the module as it exists in source. So any local changes to the module will only be reflected in the generated package after running ant publish-local.

The SDK provides two methods for creating a standalone package from a module:

Using the create-package sdkadm command

First run sdkadm

/path/to/sentinel-sdk/build/bin/sdkadm

Then run:

> create-package my-org#my-module#trunk;latest.integration standalone-package

The following is an example of output from create-package

Initialising Ivy.
Invoking Ivy to resolve module 'my-org#my-module#trunk;latest.integration' and its dependencies.

[...]

Writing package to disk at /path/to/sentinel-sdk/standalone-package ...
Assembling Ant project element...
Writing build.xml file...
Writing environment.properties file...
Finished writing package to /path/to/sentinel-sdk/standalone-package

The result of the above steps is a standalone-package directory located under sentinel-sdk with the structure described above.

The package can also be written to a ZIP file instead of a directory by specifying a path that ends in .zip.

Using Ant

First, cd to the my-module directory:

cd /path/to/sentinel-sdk/my-module

If the module has not yet been published in Ivy, or has been changed after the last publishing, run:

ant publish-local

Then run:

ant create-package

The following is an example of the output from create-package:

Buildfile: /path/to/sentinel-sdk/my-module/build.xml

clean-module:
     [echo] Cleaning module build artifacts.
   [delete] Deleting directory /path/to/sentinel-sdk/my-module/target

[...]

create-package:
     [echo] Creating standalone installer package for module.

[...]

[oc:create-package] Writing package to disk at /path/to/sentinel-sdk/my-module/target/standalone-package ...
[oc:create-package] Assembling Ant project element...
[oc:create-package] Writing build.xml file...
[oc:create-package] Writing environment.properties file...
[oc:create-package] Finished writing package to /path/to/sentinel-sdk/my-module/my-module-package.zip

The result of the above steps is an archive named my-module-package.zip located under my-module with the structure described above.

Tip

Properties that end up in the environment.properties file can be specified at package creation time by prefixing them with packager., otherwise they will take their values from the current environment or use defaults.

Example:

ant -Dpackager.platform.operator.name=my-org create-package

Deploying a Standalone Package

The build.xml included in the base of the generated package is an Ant script that uses Rhino’s SLEE Management Ant tasks to install the module and its dependencies into Rhino.

Tip Standalone packages can be edited post-creation and those edits will be applied when deploying without requiring republication of the module in Ivy.

Once a standalone package has been created it can be deployed into a Rhino.

Note Before deploying ensure the values in standalone-package/environment.properties are correct for the target environment.

If not deploying to the Rhino included with the SDK, ensure that rhino.home and client.home in environment.properties are set correctly for the target Rhino.

Note The target Rhino needs to be manually started prior to deployment of the standalone package.

Once the environment is correctly configured then deployment of the standalone package into Rhino simply requires running ant in the root of the standalone-package directory:

cd /path/to/standalone-package

Then simply run,

ant
Note The build.xml file expects to be run from the top level of the package against a fresh install of Rhino.

The following is an example of the output when deploying a standalone-package:

Buildfile: /path/to/standalone-package/build.xml

check-environment:

management-init:
     [echo] Open Cloud Rhino SLEE Management tasks defined

login:
[slee-management] Establishing new connection to localhost:1199
[slee-management] Connected to localhost:1199 (101) [Rhino-SDK (version='2.4', release='0.19', build='201610031603', revision='2f48084')]
[...]

deploy-my-module-with-deps:
[...]

deploy-my-module:
[...]

bind-my-module-with-deps
[...]

bind-my-module
[...]

configure-my-module-with-deps
[...]

configure-my-module
[...]

BUILD SUCCESSFUL

The deploy, bind and configure steps can also be initiated individually by calling the respective targets:

ant deploy-root-module-with-deps
ant bind-root-module-with-deps
ant configure-root-module-with-deps

The end result of this process will be a deployment of the module in Rhino that is identical to a deployment done using the normal SDK tooling.

Known limitations with standalone packages

  • Undeploying, redeploying or upgrading installations is not currently supported.

  • Expected service copy versions are calculated ahead of time when creating a package, so a package must be installed into a clean Rhino or the versions will not match.

  • As mentioned above the static nature of standalone packages means that they are not as flexible as deployments from a Sentinel SDK.

Previous page Next page