Configure the Semarchy xDI Runtime Deliveries 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:
<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 |
---|---|---|---|
|
Yes |
Unique name identifying the the repository. |
|
|
Yes |
Delivery repository plugin class name. |
|
|
No |
|
Module containing the plugin class. |
|
No |
|
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. |
|
No |
|
Defines if this repository is a repository storing deliveries exposed as web services. Only one web service repository can be defined in a Runtime. |
|
No |
|
Defines how the deliveries stored in the repositories are scanned, to update the list of available deliveries. Possible values are:
|
|
No |
10000 |
Polling interval in milliseconds for the runtime to scan the repository for new deliveries. This parameter applies only when using the |
|
No |
|
Store the repository information in a cache. |
|
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 |
---|---|---|---|
|
Yes |
|
Absolute or relative path to a folder containing the deliveries. |
<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 Semarchy xDI Production Analytics version 3.x and above. |
Parameter | Mandatory | Description |
---|---|---|
|
Yes |
URL to access Semarchy xDI Production Analytics |
|
Yes |
Username to connect Semarchy xDI Production Analytics |
|
No |
User password, encrypted with the runtime |
|
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. |
|
Yes |
Semarchy xDI Production Analytics environment from which to retrieve deliveries. You can have multiple environments in Semarchy xDI Production 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 Semarchy xDI Production Analytics. |
|
No |
Default delivery path, in the following form: |
Deliveries executed from such a repository should be specified with their full path: For example:
Use the |
<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 |
---|---|---|---|
|
Yes |
|
Identifier of the Google Cloud project. |
|
Yes |
|
Name of the bucket in Google Cloud Storage in which the deliveries should be stored. |
|
No |
|
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. |
Semarchy xDI uses the GoogleCredentials to build the Google Credentials and so relies on the GOOGLE_APPLICATION_CREDENTIALS
environment variable, which must be set.
<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 |
---|---|---|---|
|
Yes |
|
AWS Region of the AWS S3 bucket. |
|
Yes |
|
Name of the AWS S3 bucket into which the deliveries are stored. |
|
No |
|
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. |
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. |
<repositories>
<deliveryRepository
name="default" class="com.semarchy.xdi.runtime.repository.delivery.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>