Configure the Semarchy xDI Runtime delivery repositories

A runtime looks for the deliveries to run in delivery repositories, hosted in the runtime file system, in Analytics or a cloud storage system.

Repository configuration

Delivery repositories are configured in the Runtime Configuration File (engineParameters.xml), as illustrated 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 containing the plugin class.

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 web services deliveries.

webservice

No

false

Defines if this repository is a repository storing deliveries exposed as web services. Only one web service repository can be defined in a Runtime.

mode

No

direct

Defines how the deliveries stored in the repositories are scanned, to update the list of available deliveries. Possible values are:

  • direct: The runtime takes into account new or updated deliveries at startup and when Designer or Analytics publishes deliveries. The deliveries added or updated manually are taken into account only when the runtime restarts.

  • poll: The Runtime polls regularly the repository for new deliveries.

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 in the deliveryRepository node.

The following sections detail the configuration of the various types of delivery repositories.

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 V2 repository - 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 xDI Analytics version 3.x and above.
Parameter Mandatory Description

url

Yes

URL to access xDI Analytics

user

Yes

Username to connect xDI 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

xDI Analytics environment from which to retrieve deliveries. You can have multiple environments in xDI Analytics for development, testing, production, etc. This property defines the environment from which you want to retrieve deliveries. This must correspond to the name of an environment existing in xDI 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/MyManager/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.

This capability is not included by default. You must install the Google Cloud Storage Delivery component to use this type of delivery repository.
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.delivery.repository.google.cloud.storage.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>

Amazon S3

The AmazonS3DeliveryRepositoryPlugin stores deliveries in an Amazon S3 bucket. The deliveries are not stored locally in the runtime.

This capability is not included by default. You must install the Amazon S3 Delivery component to use this type of delivery repository.
Parameter Mandatory Default Value Description

awsRegion

Yes

eu-west-1

AWS Region of the AWS S3 bucket.

bucket

Yes

semarchy

Name of the AWS S3 bucket into which the deliveries are 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, to access AWS S3, the AWS Default Credential Provider Chain, and therefore relies on the system/environment for the AWS credentials.

For example, credentials are retrieved automatically from the C:\Users\<UserName>\.aws\credentials (windows) or ~/.aws/credentials (macOS/Linux) file. which contains your credentials as shown in the below example:

[default]
aws_access_key_id = YOUR_AWS_ACCESS_KEY_ID
aws_secret_access_key = YOUR_AWS_SECRET_ACCESS_KEY
The same credentials are also used when configuring an External Value Resolver with AWS Secrets Manager.
Example 5. Sample AWS S3 delivery repository configuration
<repositories>
  <deliveryRepository
    name="default" class="com.semarchy.xdi.delivery.repository.aws.s3.AmazonS3DeliveryRepositoryPlugin" default="false" module="Amazon S3 Delivery Repository">
    <parameter name="awsRegion" value="eu-west-1"/>
    <parameter name="bucket" value="semarchy"/>
    [<parameter name="path" value="xdi/runtime/deliveries"/>]
    </deliveryRepository>
</repositories>

Microsoft Azure Blob Storage

The AzureBlobStorageDeliveryRepositoryPlugin stores deliveries in an Azure Blob Storage. The deliveries are not stored locally in the runtime.

This capability is not included by default. You must install the Azure Blob Storage Delivery Repository component to use this type of delivery repository.
Parameter Mandatory Default Value Description

storage

Yes

semarchy

Name of the Azure Storage account.

container

Yes

container-name

Name of the container into which the deliveries are stored.

url

No

https://myaccount.blob.core.windows.net

The url parameter is corresponding to your Azure resource URL. Find this value in the Azure resource properties.

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 container.

Credentials configuration

Semarchy xDI uses, to access Azure Blob Storage, the Azure Default Credential Provider, and therefore relies on the system/environment for the Azure credentials.

For example, credentials are retrieved automatically from environment variables.

Example 6. Sample Azure Blob Storage delivery repository configuration
<repositories>
 <deliveryRepository name="azure_repository_name" class="com.semarchy.xdi.delivery.repository.azure.blob.storage.AzureBlobStorageDeliveryRepositoryPlugin" default="false" module="Azure Blob Storage Delivery Repository">
  <parameter name="storage" value="semarchy"/>
  <parameter name="container" value="container-name"/>
  [<parameter name="url" value="https://myaccount.blob.core.windows.net/"/>]
  [<parameter name="path" value="xdi/runtime/deliveries"/>]
 </deliveryRepository>
</repositories>