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:
<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 in which the plugin class will be searched. It is optional and will search in internal module when not specified. |
|
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 webservices deliveries. |
|
No |
|
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. |
|
No |
|
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:
|
|
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 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 |
---|---|---|---|
|
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 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 |
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. |
|
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.
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>