Runtime Environments > Serverless runtime environment setup in AWS > Configuring the serverlessUserAgentConfig.yml file
  

Configuring the serverlessUserAgentConfig.yml file

When you create a supplementary file location, you need to create and configure the serverlessUserAgentConfig.yml file.
Select a task to perform:
Note: Escape any spaces or special characters that appear in paths entered in the serverlessUserAgentConfig.yml file.

Populating the serverlessUserAgentConfig.yml File

Use the following template to create your serverlessUserAgentConfig.yml file:
# The Secure Agent is the root element, and configurations are applied to the agent.
# Under the agent, there are three levels:
#1: apps : Application where you need to apply configurations.
#2: event: Event relating to the life cycle of application.
#autoDeploy: Configurations that need the agent app to restart. Configurations are applied and minor versions of the app are upgraded. An upgrade event will detect the difference between the configuration that was last applied and the current request and apply only those configuration changes. Note that Administrator does not show notifications during minor version upgrades.
#autoApply: Configuration that takes effect immediately, such as copying Swagger files.
#3: section: Contains configurations based on connectors.

# How do I apply the YML file?
# Create a serverlessUserAgentConfig.yml file with these contents in <supplementary_file_location>/serverless_agent_config.
# The path in the serverlessUserAgentConfig.yml file is relative to <supplementary_file_location>/serverless_agent_config/.

# fileCopy section : Provide the source location of the file that needs to be copied.

version: 1
agent: # At the agent level, provide general configurations that are not specific to the application.
agentAutoApply:
general: # General section for common configurations across applications and connectors.
sslStore: # Use this to copy SSL files to the instance machine. You can provide a list of fileCopy.
- fileCopy:
sourcePath: SSL/RESTV2_JWTpyn.jks
# Data Integration Server app
dataIntegrationServer:
autoApply: # Apply configurations that don't need to upgrade the minor version or a restart of the app. For example, you can copy files.
restv2: # Connector section
swaggers: # List of Swaggers files to copy to the instance machine.
- fileCopy:
sourcePath: restv2/<swagger_file_name>.json
keystores: # List of keystore files to copy to the instance machine.
- fileCopy:
sourcePath: restv2/key
truststores: # List of truststore files to copy to the instance machine.
- fileCopy:
sourcePath: restv2/key.ext
wsconsumer:
wsdls:
- fileCopy:
sourcePath: s3/
jdbc:
drivers:
- fileCopy:
sourcePath: s3/file
autoDeploy:
# A change in this event will trigger a minor version upgrade with the new configurations.
# In this case, the Data Integration Server app will get a minor version upgrade.
general: # General section for Data Integration Server app autoDeploy event.
ssls:
- fileCopy:
sourcePath: SSL/RESTV2_JWTpyn.jks
importCerts:
certName: cname
alias: IICS
sap:
jcos: # List of jco related files to copy.
- fileCopy:
sourcePath: sap/jco/libsapjco3.so
- fileCopy:
sourcePath: sap/jco/sapjco3.jar
nwrfcs: # List of nwrfc related files to copy.
- fileCopy:
sourcePath: sap/nwrfc/libicudata.so.50
- fileCopy:
sourcePath: sap/nwrfc/libicudecnumber.so
hanas: # List of hana related files to copy.
- fileCopy:
sourcePath: sap/hana/libicudata.so.50
odbc:
# Specify ODBC configurations.
# This section can be used to configure multiple drivers.
drivers: # Specify drivers to copy.
- fileCopy:
sourcePath: ODBC/DWdb227.so
- fileCopy:
sourcePath: ODBC/DWdb227.so
dns:
# Specify DNS entries. These entries will be updated in odbc.ini file.
# If the file is not present, a new odbc.ini file will be created.
# Make sure to give a name as a unique entry for the ini file configuration. The file will be read and updated using the name.
- name: "SQL server" # Section name in ini file unique key.
entries:
- key: Driver # Only provide the driver file name without the path.
value: DWsqls227.so # Because the file is copied, the path to attach during odbc entry is already known.
- key: Description
value: "SQL Server 2014 Connection for ODL"
- key: HostName
value: INVW16SQL19
- key: PortNumber
value: 1433
- key: Database
value: adapter_semantic
- key: QuotedId
value: No
- key: AnsiNPW
value: Yes
For more information about populating connector information in the serverlessUserAgentConfig.yml file, see the help for the appropriate connector.

Copying files for the Elastic Server

In the serverlessUserAgentConfig.yml file, you can specify files to copy from the supplementary file location to the serverless runtime environment. When you run mappings in advanced mode in the serverless runtime environment, the Elastic Server and the advanced cluster can use the files to access and process data.
You can copy the following file types for the Elastic Server:
You can customize file paths by specifying the relative path to the file in the supplementary file location. For example, you might store JDBC V2 Connector JAR files in the following locations:
You can specify the following relative paths in the serverlessUserAgentConfig.yml file:
agent:
elasticServer:
autoApply:
jdbcv2:
common:
- fileCopy:
sourcePath: jdbc_v2_jars/common/driver.jar
spark:
- fileCopy:
sourcePath: jdbc_v2_jars/spark/driver.jar

Copying JDBC V2 Connector JAR files

To copy JAR files for JDBC V2 Connector, use the following code snippet as a template:
agent:
elasticServer:
autoApply:.
jdbcv2:
common:
- fileCopy:
sourcePath: jars/connectors/thirdparty/informatica.jdbc_v2/common/driver.jar
- fileCopy:
sourcePath: jars/connectors/thirdparty/informatica.jdbc_v2/common/driver.jar
spark:
- fileCopy:
sourcePath: jars/connectors/thirdparty/informatica.jdbc_v2/spark/driver.jar
- fileCopy:
sourcePath: jars/connectors/thirdparty/informatica.jdbc_v2/spark/driver.jar

Copying Java transformation JAR files

To copy JAR files, native libraries, and/or native binaries for the Java transformation, use the following code snippet as a template:
agent:
elasticServer:
autoApply:
javaTx:
resources:
- fileCopy:
sourcePath: j_depends/sapjco3.jar
- fileCopy:
sourcePath: j_depends/chilkat.jar
- fileCopy:
sourcePath: j_depends/chilkatLoader.jar
- fileCopy:
sourcePath: j_depends/NativeBinExecutor.jar
nativeLib:
resources:
- fileCopy:
sourcePath: native-lib/libchilkat.so
- fileCopy:
sourcePath: native-lib/libsapjco3.so
nativeBin:
resources:
- fileCopy:
sourcePath: native-bin/printEnvVariables.sh
- fileCopy:
sourcePath: native-bin/printProcess.sh

Copying Python transformation resource files

To copy resource files for the Python transformation, use the following code snippet as a template:
agent:
elasticServer:
autoApply:
pythonTx:
resources:
- fileCopy:
sourcePath: py_depends/res1.txt
- fileCopy:
sourcePath: py_depends/res2.txt

Adding files while the environment is running

You can add files for the Elastic Server to the supplementary file location while the serverless runtime environment is running. Files for the Elastic Server include JDBC V2 Connector JAR files, Java transformation JAR files, and Python transformation resource files.
To add a file while the environment is running, complete the following steps:
  1. 1Add the file to the appropriate location in <Supplementary file location>/serverless_agent_config/.
  2. 2Specify the file in the serverlessUserAgentConfig.yml file. For information about the serverlessUserAgentConfig.yml file, see Creating the supplementary file location or the help for the appropriate connector.
It may take up to 10 minutes for the file to synchronize to the serverless runtime environment.
You must redeploy the serverless runtime environment after you perform any of the following tasks: