Configure the Semarchy xDI Runtime delivery repositories
A runtime looks for the deliveries to run in delivery repositories, hosted in the runtime filesystem, in Analytics or a cloud storage system.
Repository configuration
Delivery repositories are configured in the runtime configuration File (engineParameters.xml
), as in the following example:
<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 repository. |
|
|
Yes |
Delivery repository plug-in class name. |
|
|
No |
|
Module containing the plug-in 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 plug-in (FileDeliveryRepositoryPlugin
) stores deliveries in the runtime local filesystem.
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 for Analytics (HTTP V2 repository)
The HTTP repository (HttpDeliveryRepositoryV2Plugin
) pulls deliveries from a remote repository managed in Analytics. The deliveries are not stored locally in the runtime.
For instructions on how to pull deliveries, see the dedicated article.
This plug-in is often referred to as the HTTP V2 repository plug-in, to distinguish it from the V1 plug-in in legacy environments. |
Parameter | Mandatory | Description |
---|---|---|
|
Yes |
URL to access xDI Analytics |
|
Yes |
Username to connect xDI 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 |
xDI Analytics environment from which to retrieve deliveries. You can have multiple environments in xDI Analytics for development, testing, production, and more. 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. |
|
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>
<!-- Non-default repository, for regular deliveries -->
<deliveryRepository name="analytics_label_for_this_repository" default="false" class="com.semarchy.xdi.runtime.repository.delivery.HttpDeliveryRepositoryV2Plugin"/>
<parameter name="url" value="http://localhost:8080/semarchy-xdi-analytics"/>
<parameter name="user" value="semarchy"/>
<parameter name="uncryptedPassword" value="semarchy"/>
<parameter name="unreachableTolerancePeriod" value="30000"/>
<parameter name="environment" value="analytics_environment_name"/>
<!-- <parameter name="defaultDeliveryPath" value="analytics_project_name/package_manager_name"/> -->
<!-- Add other parameters here -->
</deliveryRepository>
<!-- Default repository, for web service deliveries -->
<deliveryRepository name="analytics_label_for_this_webservices_repository" default="true" webservice="true" class="com.semarchy.xdi.runtime.repository.delivery.HttpDeliveryRepositoryV2Plugin"/>
<parameter name="url" value="http://localhost:8080/semarchy-xdi-analytics"/>
<parameter name="user" value="semarchy"/>
<parameter name="uncryptedPassword" value="semarchy"/>
<parameter name="unreachableTolerancePeriod" value="30000"/>
<parameter name="environment" value="analytics_environment_name"/>
<parameter name="mode" value="poll"/>
<parameter name="pollInt" value="100000"/>
<!-- Add other parameters here -->
</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.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 |
---|---|---|---|
|
Yes |
|
Name of the Azure Storage account. |
|
Yes |
|
Name of the container into which the deliveries are stored. |
|
No |
The |
|
|
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 container. |
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.
<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>