Configure the Semarchy xDI Runtime Deliveries Repositories

A runtime look for its deliveries to run in delivery repositories, which may be hosted in the runtime file system or in Analytics.

Repository Configuration

Delivery repositories are configured in the Runtime Configuration File (engineParameters.xml), as shown in the example below:

Example 1. File delivery configuration sample
<parameters>
  <...>
  <repositories>
    <...>
      <deliveryRepository
        name="fileRepository"
        class="com.semarchy.xdi.runtime.repository.delivery.FileDeliveryRepositoryPlugin"
        module="moduleName"
        default="true"
        webservice="false"
        mode="poll"
        pollInt="10000"
        enableMemoryCache="true"
        cacheFolder="folderPath">
      <parameter name="folder" value="build/deliveries" />
      </deliveryRepository>
    <...>
  </repositories>
  <...>
</parameters>
You can define multiple delivery repositories under the <repositories> node.

Common Parameters

The following common parameters are available for all delivery repository types.

Parameter Mandatory Default value Description

name

Yes

Unique name identifying the the repository.

class

Yes

Delivery repository plugin class name.

module

No

internal

Module in which the plugin class will be searched. It is optional and will search in internal module when not specified.

default

No

false

Defines if this repository is the default repository used by the Runtime when performing delivery operations. Only two default repositories can be defined at a time in a Runtime - one for standard deliveries and one for webservices deliveries.

webservice

No

false

Defines if this repository is a repository for deliveries to be exposed as web service. Only one webservice repository can be defined at a time in a Runtime.

mode

No

direct

Defines how the deliveries contained in the repositories will be scanned, to update the list of available deliveries. See below for further details about available modes. possible values are:

  • direct: The runtime takes into account new or updated deliveries at startup and when one components (Designer, Analytics) performs a publish operation. The deliveries manually added or updated are into account only when the runtime restarts.

  • poll: The Runtime polls regularly the repository for new deliveries. This is mostly useful for deliveries exposed as web service.

pollInt

No

10000

Polling interval in milliseconds for the runtime to scan the repository for new deliveries. This parameter applies only when using the poll mode.

enableMemoryCache

No

False

Store the repository information in a cache.

cacheFolder

No

Folder used to cache repository information.

Repository Types

Each repository type has its own set of parameters, defined which are defined under its deliveryRepository node.

The following Delivery Repository types are available in a default runtime installation.

File Repository

The file repository plugin (FileDeliveryRepositoryPlugin) stores deliveries in the runtime local file system.

Parameter Mandatory Default Value Description

folder

Yes

build/deliveries

Absolute or relative path to a folder containing the deliveries.

Example 2. Sample file delivery repository configuration
<repositories>
  <!-- Standard deliveries file repository -->
  <deliveryRepository
    name="default"
    class="com.semarchy.xdi.runtime.repository.delivery.FileDeliveryRepositoryPlugin"
    default="true">
    <parameter name="folder" value="build/deliveries/"/>
  </deliveryRepository>
  <!-- Web service deliveries file repository -->
  <deliveryRepository
    name="webservices"
    class="com.semarchy.xdi.runtime.repository.delivery.FileDeliveryRepositoryPlugin"
    default="true"
    webservice="true">
    <parameter name="folder" value="build/deliveries/webservices/"/>
  </deliveryRepository>
</repositories>

HTTP Repository V2 - Analytics 3.x

The HTTP V2 repository (HttpDeliveryRepositoryV2Plugin) pulls deliveries from a remote repository managed in Analytics. The deliveries are not stored locally in the Runtime.

This plugin only works with analytics version 3.x and above.
Parameter Mandatory Description

url

Yes

URL to access Semarchy xDI Production Analytics

user

Yes

Username to connect Semarchy xDI Production Analytics

password

No

User password, encrypted with the runtime encrypt command. Only one of the password or uncryptedPassword parameters should be used at a time.

uncryptedPassword

No

Plain text password of the user.

unreachableTolerancePeriod

No

Timeout in milliseconds during which the Runtime will use the cached version of previously pulled deliveries when the server is unavailable.

environment

Yes

Analytics environment from which to retrieve deliveries. You can have multiple environments in Analytics, such as development, testing, production, … This property allows to define from which environment you want to retrieve deliveries from. This must correspond to the name of an environment existing in Analytics.

defaultDeliveryPath

No

Default delivery path, in the following form: <project_name>/<package_manager_name>/. This path automatically prefixes a delivery name started without specifying the full delivery path.

Deliveries executed from such a repository should be specified with their full path:
<project_name>/<package_manager_name>/<delivery_name>.

For example:

startdelivery.bat -repository analytics -name MyProject/MyManaber/MyDelivery

Use the defaultDeliveryPath parameter to set the default path when running deliveries without their full path.

Example 3. Sample HTTP v2 delivery repository configuration
<repositories>
    <deliveryRepository name="analytics_repository"
        class="com.semarchy.xdi.runtime.repository.delivery.HttpDeliveryRepositoryV2Plugin"
        default="false">
        <parameter name="url"
            value="http://localhost:8080/analytics"/>
        <parameter name="user"
            value="deliveryUser"/>
        <parameter name="uncryptedPassword"
            value="xxxxxx"/>
        <parameter name="unreachableTolerancePeriod"
            value="30000"/>
        <parameter name="environment"
            value="analytics_environment"/>
        <parameter name="defaultDeliveryPath"
            value="project_name/manager_name"/>
    </deliveryRepository>
</repositories>

Google Cloud Storage

The GoogleCloudStorageDeliveryRepositoryPlugin stores deliveries in Google Cloud Storage. The deliveries are not stored locally in the runtime.

Parameter Mandatory Default Value Description

projectID

Yes

gcp-project-id

Identifier of the Google Cloud project.

bucket

Yes

semarchy

Name of the bucket in Google Cloud Storage in which the deliveries should be stored.

path

No

xdi/runtime/deliveries

Absolute or relative path to a folder in the bucket that should store the deliveries.

If not specified, the deliveries are stored and searched in the root of the bucket.

Credentials Configuration

Semarchy xDI uses the GoogleCredentials to build the Google Credentials and so relies on the GOOGLE_APPLICATION_CREDENTIALS environment variable, which must be set.

Example 4. Sample Google Cloud Storage delivery repository configuration
<repositories>
  <deliveryRepository
    name="default" class="com.semarchy.xdi.runtime.repository.delivery.GoogleCloudStorageDeliveryRepositoryPlugin" default="false" module="Google Cloud Storage Delivery Repository">
    <parameter name="projectId" value="gcp-project-id"/>
    <parameter name="bucket" value="semarchy"/>
    <parameter name="path" value="xdi/runtime/deliveries"/>
  </deliveryRepository>
</repositories>