Creating a Digital Event Persistence Service Using Composite Templates
This section includes an example of a composite template that you can use to create a service of type Digital Event Persistence for Digital Event Services (DES), which is embedded in an Integration Server instance.
Before You Begin
Before you can create the composite template for creating a Digital Event Persistence service, do the following:
Install a default
Integration Server with DES and
Digital Event Persistence. When using the sample template in this section, install
Integration Server on the local host with default ports.
See the "Creating Custom Composite Templates" section in
Software AG Command Central Help.
Creating the Template Definition File
The following example configures a Digital Event Persistence service with Apache Hadoop 5.3.0 as the storage technology. To configure a Digital Event Persistence service with Elasticsearch 2.3.2 as the storage technology, use the same template but include parameters specific to Elasticsearch.
The template creates a single layer, with alias local-is and applies the create-an-evp-service inline template on the layer. The local-is layer is created in the local installation.
In the configuration section of the template, the configuration details specified in DES-EVP-CONFIGURATION are applied on the OSGI-IS_default-DigitalEventServices run-time component. DES-EVP-CONFIGURATION contains the parameters for the EVENT-PERSISTENCE-DES configuration type, and LocalPersistence is the instance ID.
OSGI-IS_default-DigitalEventServices is the run-time component ID, which you can obtain by using the sagcc list inventory components CLI command.
Important: | To connect to an HDFS server you need to authenticate with a password. To successfully provision a Digital Event Persistence service when you apply the template you must provide the value for hiveServerPassword in one of the following ways: As a value in the composite template itself. As an argument. In a properties file. |
Example
alias: evp-configuration
description: Create and configure a EVP service in DES
version: 0.1
layers:
local-is:
templates: [create-an-evp-service]
DES-EVP-CONFIGURATION: &DES-EVP-CONFIGURATION
EVENT-PERSISTENCE-DES:
LocalPersistence:
serviceName: LocalPersistence
serviceType: HDFS CDH.5.3.0
serviceDescription: MyDescription
eventTypeStoreLocation: default
nameNodeURI: hdfs://localhost:8020
hdfsMaxFileSize: 65
hiveServerURI: jdbc:hive2://localhost:10000
hiveDatabaseName: Database
hiveWarehouseLocation: /user/hive/warehouse
hiveServerUser: Admin
hiveServerPassword: my.secret
hdfsBatchSize: 10000
hdfsBatchWriteTimerSec: 15
elasticSearchBatchSize: 1000
elasticSearchBatchWriteTimerSec: 15
elasticSearchCoreThreadPoolSize: 5
elasticSearchMaximumThreadPoolSize: 10
elasticSearchThreadPoolKeepAliveTime: 5
elasticSearchThreadPoolQueueSize: 10
elasticSearchPreStartCoreThreads: false
elasticSearchSSLEnabled: false
templates:
create-an-evp-service:
products:
integrationServer:
default:
configuration:
OSGI-IS_default-DigitalEventServices: *DES-EVP-CONFIGURATION
provision:
default:
local-is: local
Importing the Composite Template
Before you can apply the template, you must import the template into Command Central.
Import the template from the example with the following command:
If you only have a template definition file:
sagcc exec templates composite import -i evp-configuration.yaml
If you have a template archive with a template definition and an environment properties file:
sagcc exec templates composite import -i evp-configuration.zip
Applying the Composite Template
Importing the template registers it in Command Central. You can apply the template with the following command:
sagcc exec templates composite apply evp-configuration
Apply the template from the example with the following command:
With an input argument for
hiveServerPassword:
sagcc exec templates composite apply evp-configuration my.password=my.secret
With an input properties file:
sagcc exec templates composite apply -i evp-configuration sample.properties
where sample.properties is the name of your custom properties file that contains the value for the hiveServerPassword parameter.
Verifying the Template Execution
Verify that the template execution is successful in the following ways:
Check the
Jobs view in the Command Central web user interface while applying the template.
After applying the template, check in
Command Central if the service is listed with the correct configuration settings in
Environments > Instances > All > local-is > Digital Event Services > Configuration > Event Persistence.