Pre-requisites for Installation

In order to execute Stambia Runtime, your system must meet the following requirements:

Operating System:
- The Runtime can be installed on any system having a Java Virtual Machine (JVM)

Memory / CPU
- The memory and CPU capacity required will depend on the flows that are executed

Disk Space
- The system must have at least 80 MO of free disk space

Java Virtual Machine
- Java 8 or Java 11

Note: On a 64-bits system you should use a 64-bits JVM for better performance and compatibility.


Runtime installation

Installing the Runtime

Preliminary steps

  1. Install a Java Virtual Machine (JVM) 8 or higher
  2. Set the environment variable STAMBIA_JAVA_HOME to the folder situated located just before the “bin” folder in your JDK

Runtime Installation

  1. Unzip the archive which has been downloaded into the target folder
  2. Set execution permissions on the script files which are at the root of the installation if needed
    1. on the .bat files for Windows
    2. on the .sh files for Linux
  3. Set write permissions, especially on the following directories:
    1. temp
    2. build
    3. sessions
  4. Configure the Runtime if necessary
  5. Configure the Runtime’s Scheduler if necessary

Note: In order to ease updates, it is recommended to copy the Stambia ‘properties’ folder into another place and to set the parameters of the STAMBIA_PROPERTIES_LOCATION variable so that it points to it. In this way, Runtime updates can be made by replacing the whole arborescence. The configuration data of the ‘properties’ folder will not be lost, since it will be elsewhere.

Runtime as a Windows service

Service installation

To install a Runtime as a Windows service, refer to the standard installation procedure to install the Runtime, and then follow the following additional steps.

The runtime can be easily installed as a Windows service if needed.
For this, navigate to the root directory of the Runtime and use the following commands:

  1. use the installEngineAsService.bat -i [<serviceName>] command to install the service
  2. use the installEngineAsService.bat -r [<serviceName>] command to remove the service

The <serviceName> parameter can be useful to install multiple Runtimes on the same machine.
If not set the service will be named ‹Stambia Runtime›.

The file «stambiaEngine.conf» which is in the folder external\stambiaService\conf can be used to configure some of the service’s properties. By default, it is not useful to modify this file.

Warning: Depending on the configuration of the operating system, it is usually required to execute those commands in a command prompt started as system administrator to be able to install services

Warning: Any modification of Stambia Runtime files or parameters (in “properties” or in the ‘.bat’ files) requires the removal and reinstallation of the Windows service, so that these modifications may be taken into account.

Tip: The specified user used to launch the Runtime (Windows service) should be changed to a user with network abilities, usually a domain user.

Runtime as a Linux service

Service installation

To install a Runtime as a Linux service, refer to the standard installation procedure to install the Runtime, and then refer to the documentation of your Linux environment to find how to install a service in it.

The startup script of the Runtime is 'startengine.sh'
The shutdown script of the Runtime is 'stopengine.sh'

Those are the two scripts to manage in the Linux service / in the Linux startup shutdown processes.


Runtime configuration

Overview

There are several entry points to configure the Runtime:

Environment variables

The following optional environment variables may be defined to override default settings:

Environment variable Description example
STAMBIA_JAVA_HOME path of the JVM that is used
STAMBIA_PROPERTIES_LOCATION path of the ‹properties› folder. Useful if you want to externalize the configuration of the Runtime. D:/configuration/properties
STAMBIA_INIT_MEMORY Runtime’s JVM initialization memory
STAMBIA_MAX_MEMORY Runtime’s JVM maximum memory
STAMBIA_STACK_SIZE Runtime’s JVM stack size

You can define your own additional variables if you want to externalize some configuration.

You can find examples of customized configuration file with additional environment variables in properties/samples/enginesParameters folder.

This is useful if you want to have everything defined through environment variables, to deploy docker images for instance.

Runtime configuration file

Overview

Most of Runtime’s configuration is done in the properties/engineParameters.xml file

This file allows to manage:

On a default installation this file is located at the following path:

<runtime_installation_folder>/properties/engineParameters.xml

Modify this file if you want to configure the Runtime.

You can change the location of this file through environment variables, as explained in previous section.

Defining the started services

The services exposed by the Runtime, such as the scheduler, the SOAP component, or the internal Java database can be turned off if needed.
By default, they are all launched at the Runtime’s startup.
To specify which services should be started:

  1. Open the engineParameters.xml file
  2. Update the parameters accordingly to your needs.
<parameters>
	<...>
	<engineParameters>
		<...>
		<parameter name="launchSchedulerEngine" value="true"/>
		<parameter name="launchExecutionEngine" value="true"/>
		<parameter name="launchReportEngine" value="true"/>
		<parameter name="startInternalDb" value="true"/>
		<parameter name="startSoapServer" value="true"/>
		<...>
	</engineParameters>
	<...>
</parameters>

The following parameters are available:

Parameter Default value Description
launchSchedulerEngine true start scheduler
launchExecutionEngine true start execution engine
launchReportEngine true start reporting ability
startInternalDb true start internal H2 database
startSoapServer true start soap service
enableHttpClientConnections true Defines if clients can connect and perform operations on the Runtime through HTTP.

Defining the services ports

The services exposed by the Runtime are running on defined port, that can indeed be modified easily.

  1. Open the engineParameters.xml file
  2. Update the following parameters accordingly to your needs.
<parameters>
	<...>
	<engineParameters>
		<...>
		<parameter name="rmiPort" value="42000"/>
		<!--<parameter name="rmiCallbackPort" value="42000"/>-->
		<parameter name="internalDbTcpPort" value="42100"/>
		<parameter name="internalDbWebPort" value="42101"/>
		<parameter name="soapServerPort" value="42200"/>
		<...>
	</engineParameters>
	<...>
</parameters>

Defining the log database

The Runtime stores the information about sessions' execution in a log database.
This database is by default an internal H2 database, that is shipped with the Runtime and started with it.

This offers a ready-to-go environment that can be used immediately.
We however recommend changing it to a more robust database such as Oracle, Microsoft SQL Server (MSSQL), etc for production use.
You will need to provide to Stambia Runtime a user having read and write permissions on the chosen database/schema.

Here is how to change the log database of the Runtime:

1) Open the engineParameters.xml file
The configuration is performed in this file, which contains samples for the most known databases.

2) Modify the log database parameters as explained below.
This consists of defining the JDBC URL, user, password, schema, Module, ... which define where the log database will be located and how to connect.

3) Restart the runtime
All necessary tables will be created automatically the first time the log database is initialized

Warning: For the Runtime to be able to communicate with the database, except if you are using the default internal H2 database, you must define in the configuration a valid Module containing the required drivers (such as JDBC drivers). The Module to use is defined through the Module parameter.

Log database parameters
<parameters>
	<...>
	<engineParameters>
		<...>
		<parameter name="userLogDefaultName" value="logDatabase"/>
		<parameter name="defaultSessionLogLevel" value="400"/>
		<...>
	</engineParameters>
	<...>
	<logs>
		<...>
		<log userLogName="logDatabase" autoUpdate="true" userLogClass="com.indy.engine.userLog.RdbmsUserLog">
			<parameter name="userLogRdbmsDriver" value="org.h2.Driver"/>
			<parameter name="userLogRdbmsUrl" value="jdbc:h2:tcp://localhost:42100/sessions/internalDb/sessionLogs"/>
			<parameter name="userLogRdbmsUser" value="sa"/>
			<parameter name="userLogRdbmsPassword" value=""/>
			<!--<parameter name="userLogRdbmsEncryptedPassword" value=""/>-->
			<parameter name="userLogRdbmsModule" value="internal"/>
			<parameter name="userLogRdbmsVarcharType" value="varchar"/>
			<parameter name="userLogRdbmsVarcharMaxSize" value="1000"/>
			<parameter name="userLogRdbmsNumericType" value="numeric"/>
			<parameter name="userLogRdbmsClobType" value="clob"/>
			<parameter name="userLogRdbmsBlobType" value="blob"/>
			<parameter name="userLogRdbmsSchemaName" value="logs"/>
			<parameter name="userLogRdbmsUseSchemaNameForIndexCreation" value="true"/>
			<parameter name="userLogRdbmsDeleteSyntaxe" value="Delete from"/>
			<!--<parameter name="userLogRdbmsTablePrefix" value="STB_LOG_"/>-->
			<!-- bestCompression / bestSpeed / default-->
			<parameter name="userLogRdbmsCompressedLevel" value="bestCompression"/>
			<!-- text / binary / compressed-->
			<parameter name="userLogRdbmsDeliveryFormat" value="compressed"/>
			<parameter name="userLogRdbmsPropertyMaxVarcharSize" value="1000"/>
			<!-- -1 : infinite -->
			<parameter name="userLogRdbmsPropertyMaxClobSize" value="10000"/>
			<!-- binary / compressed-->
			<parameter name="userLogRdbmsPropertyBinaryFormat" value="compressed"/>
			<parameter name="userLogRdbmsTimestampQuery" value="select now()"/>
			<parameter name="userLogRdbmsInactivityDetectionPeriod" value="90000"/>
			<parameter name="userLogRdbmsActivityRefreshInterval" value="60000"/>
			<parameter name="userLogRdbmsDeletionWithNotExists" value="true"/>
			<!--<parameter name="userLogRdbmsIndexCreationOption" value=""/>-->
			<!--<parameter name="userLogRdbmsTableCreationOption" value=""/>-->
			<parameter name="userLogRdbmsConnectionRetryNumber" value="10"/>
   			<parameter name="userLogRdbmsConnectionRetryDelay" value="2000"/>
   			<parameter name="userLogRdbmsConnectionEnableRetry" value="true"/>
		</log>
		<...>
	</logs>
	<...>
</parameters>
User Log Default Name

The «userLogDefaultName» is used to define which configured log database should be used.
This corresponds to the «userLogName» attribute which can be found in the log database configuration nodes(<log></log> nodes)

Default Session Log Level

The «defaultSessionLogLevel» defines what level of information is logged inside log database for each session executed by the Runtime.
The higher the value is the higher information are logged.
Possible values are the following: -1, 0, 100, 200, 300, 400

Note that is applies only for sessions on which the log level is not defined manually at execution.
Refer to the runtime parameters reference part of this documentation for details information about each value.

Log part

This is the part where you will configure the JDBC URL, user, password, schema, Module, ... to connect to the log database.
All necessary tables will be created automatically the first time the log database is initialized.
The initialization is performed the first time the Runtime is started on this log database.

Under <logs></logs> node, you can find commented examples of configuration for several databases systems.
You can use these examples to configure your log database accordingly to the target database system which will be used.

The Runtime will use as log database the <log></log> node which «userLogName» attribute value corresponds to the «userLogDefaultName» parameter value.

If you uncomment the examples nodes to, you’ll therefore have to be careful to keep only one <log></log> node which «userLogName» attribute value corresponds to the «userLogDefaultName» parameter value.

Warning: For the Runtime to be able to communicate with the database, except if you are using the default internal H2 database, you must define in the configuration a valid Module containing the required drivers (such as JDBC drivers). For instance, if you are using Oracle as log database, you must use a Module in which you have added Oracle’s JDBC driver. The Module to use is defined through the Module parameter.

Example

The example below is for an Oracle database.

You should at least define / verify those parameters.

<parameters>
	<...>
	<engineParameters>
		<...>
		<parameter name="userLogDefaultName" value="logDatabase"/>
		<parameter name="defaultSessionLogLevel" value="400"/>
		<...>
	</engineParameters>
	<...>
	<logs>
		<...>
		<log userLogName="logDatabase" autoUpdate="true" userLogClass="com.indy.engine.userLog.RdbmsUserLog">
			<parameter name="userLogRdbmsDriver" value="oracle.jdbc.driver.OracleDriver"/>
			<parameter name="userLogRdbmsUrl" value="jdbc:oracle:thin:@[host]:[port]:[sid]"/>
			<parameter name="userLogRdbmsUser" value="[USER]"/>
			<parameter name="userLogRdbmsPassword" value="[PASSWORD]"/>
			<parameter name="userLogRdbmsModule" value="[MODULE_NAME]"/>
			<parameter name="userLogRdbmsSchemaName" value="[SCHEMA_NAME]"/>
			<parameter name="userLogRdbmsVarcharType" value="varchar2"/>
			<parameter name="userLogRdbmsVarcharMaxSize" value="4000"/>
			<parameter name="userLogRdbmsClobType" value="clob"/>
			<parameter name="userLogRdbmsBlobType" value="blob"/>
			<parameter name="userLogRdbmsNumericType" value="number"/>
			<parameter name="userLogRdbmsDeleteSyntaxe" value="Delete from"/>
			<parameter name="userLogRdbmsDeliveryFormat" value="text"/>
			<parameter name="userLogRdbmsPropertyMaxVarcharSize" value="1000"/>
			<parameter name="userLogRdbmsPropertyMaxClobSize" value="10000"/>
			<parameter name="userLogRdbmsPropertyBinaryFormat" value="compressed"/>
			<parameter name="userLogRdbmsConnectionRetryNumber" value="10"/>
			<parameter name="userLogRdbmsConnectionRetryDelay" value="2000"/>
			<parameter name="userLogRdbmsConnectionEnableRetry" value="true"/>
		</log>
		<...>
	</logs>
	<...>
</parameters>

Note: Refer to the ‹Runtime parameter reference› part of this documentation for the list of all available parameters with explanations.

Disabling the log database

It is possible to use the Runtime without connecting to a log database.

For the Runtime to not have any log database, you can simply not define any logs nodes inside Runtime configuration file. You can remove or comment the existing <logs></logs> nodes.

Moreover, you can also define explicitly that you do not want the Runtime to use a log database by defining a log node with the «EmptyUserLog» class. This is more declarative if you prefer to control what is inside the configuration file and if you want to avoid relying on default behaviour.

<parameters>
	<...>
	<engineParameters>
		<...>
		<parameter name="userLogDefaultName" value="logDatabase"/>
		<...>
	</engineParameters>
	<...>
	<logs>
    	<log userLogName="logDatabase" autoUpdate="false" userLogClass="com.indy.engine.userLog.EmptyUserLog">
        </log>
	</logs>
	<...>
</parameters>

Defining Delivery Repositories

Repositories are the locations where the Runtime will look for the delivery files at execution.

About Delivery Repositories

Delivery Repositories are the locations where the Runtime will look for the delivery files at execution.

There are different Delivery Repositories plugins, allowing to store deliveries locally on the local file system, allowing to store the deliveries remotely on Analytics, and more...

Each Delivery Repository plugin has its own way to store and retrieve deliveries, depending on your requirements.

Common configuration

Delivery repositories are configured in Runtime Configuration File (engineParameters.xml).

They are defined as follow.

<parameters>
	<...>
	<repositories>
		<...>
		<deliveryRepository name="repository_name" class="delivery_repository_plugin_class_name" [module="module_containing_the_delivery_repository_plugin_class"] [default="true|false"] [webservice="true|false"] [mode="direct|poll"] [pollInt="10000"] [enableMemoryCache="true|false"] [cacheFolder="folderPath"]>
			<parameter name="" value="" />
			<...>
		</deliveryRepository>
		<...>
	</repositories>	
	<...>
</parameters>

If you want to define multiple repositories, they should all be defined under the same <repositories></repositories> container.

Following common attributes are available on a Delivery Repository.

Parameter Mandatory Default value Description
name Yes Custom unique name to identify the repository.
class Yes Repository plugin class name. Depending on the repository plugin used, a different class must be specified.
module No internal Module in which the plugin class will be searched. It is optional and will search in internal module when not specified.
default No false 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.
webservice No false 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.
mode No direct 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.
pollInt No 10000 The time interval in milliseconds to scan the repository for new deliveries. This applies only when using the «poll» mode.
enableMemoryCache No False Store repository information in cache.
cacheFolder No Folder used to cache repository information.

modes

  1. direct: The Runtime will take into account new / updated deliveries at startup and when doing a publish operation from the various clients (Designer / Analytics / ...). Deliveries manually added or updated will be taken into account only at restart.
  2. poll: The Runtime will check periodically if new deliveries are available in the repository. This is useful mostly for deliveries exposed as web service. To define the polling interval, please see the pollInt attribute.

parameters

Above attributes are common to all repository plugins.

Each repository plugin has also its own set of parameters which are defined under the repository container.

Those parameters are described in each dedicated plugin section.

Available Delivery Repository plugins

Below is the list of Delivery Repository plugins available on a default installation.

Label Plugin Class Name Available in Module Description
File Repository com.stambia.repository.delivery.FileDeliveryRepositoryPlugin internal Deliveries are stored locally in file system. In a default Runtime installation, File Repositories are used to store the various published deliveries.
HTTP Repository V1 com.stambia.repository.delivery.HttpDeliveryRepositoryV1Plugin internal Deliveries are pulled from a remote Analytics 2.x.x HTTP Repository. This repository is used to perform delivery pulling, which means that the deliveries are pulled from a remote repository and not stored locally on the Runtime.
HTTP Repository V2 com.stambia.repository.delivery.HttpDeliveryRepositoryV2Plugin internal Deliveries are pulled from a remote Analytics 3.x.x HTTP Repository. This repository is used to perform delivery pulling, which means that the deliveries are pulled from a remote repository and not stored locally on the Runtime.


Note that additional plugins can be implemented to store deliveries in other locations.
You can contact us if you have specific requirements.

Repository Plugin – File Repository

File Repository Plugin is used to store deliveries locally in file system.

The plugin class to use is: «com.stambia.repository.delivery.FileDeliveryRepositoryPlugin».

The following parameters are available:

Parameter Mandatory Default Value Example Description
folder true build/deliveries Absolute or Runtime relative path to the folder which will contain the deliveries of this repository.

Example of repositories:

<repositories>
	<deliveryRepository name="default" class="com.stambia.repository.delivery.FileDeliveryRepositoryPlugin" default="true">
		<parameter name="folder" value="build/deliveries/"/>
	</deliveryRepository>		
	<deliveryRepository name="webservices" class="com.stambia.repository.delivery.FileDeliveryRepositoryPlugin" default="true" webservice="true">
		<parameter name="folder" value="build/deliveries/webservices/"/>
	</deliveryRepository>
</repositories>
Repository Plugin – HTTP Repository V1 – Analytics 2.x.x

HTTP Repository V1 Plugin allow to pull deliveries from a remote repository managed in Stambia Production Analytics 2.x.x.

This repository is used to perform delivery pulling, which means that the deliveries are pulled from a remote repository and not stored locally on the Runtime.

The plugin class to use is: «com.stambia.repository.delivery.HttpDeliveryRepositoryV1Plugin».

The following parameters are available:

Parameter Mandatory Default value Description
url Yes URL to access Stambia Analytics
user Yes Yes Login / Username to access Stambia Analytics
password No Encrypted password of the user, encrypted with the Runtime’s encrypt command. Only one of the password or uncryptedPassword parameters should be used at a time.
uncryptedPassword 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.

This repository plugin requires that the name of the repository matches the name of a Deployment Manager defined in Stambia Production Analytics 2.x.x

Example of repository:

<repositories>
	<deliveryRepository name="analytics_2_deployment_manager_name" class="com.stambia.repository.delivery.HttpDeliveryRepositoryV1Plugin" default="false">
		<parameter name="url" value="http://localhost:8080/analytics"/>
		<parameter name="user" value="stambia"/>
		<parameter name="uncryptedPassword" value="stambia"/>
		<parameter name="unreachableTolerancePeriod" value="30000"/>
	</deliveryRepository>			
</repositories>
Repository Plugin – HTTP Repository V2 – Analytics 3.x.x

HTTP Repository V2 Plugin allow to pull deliveries from a remote repository managed in Stambia Production Analytics 3.x.x.

This repository is used to perform delivery pulling, which means that the deliveries are pulled from a remote repository and not stored locally on the Runtime.

The plugin class to use is: «com.stambia.repository.delivery.HttpDeliveryRepositoryV2Plugin».

The following parameters are available:

Parameter Mandatory Default value Description
url Yes URL to access Stambia Analytics
user Yes Yes Login / Username to access Stambia Analytics
password No Encrypted password of the user, encrypted with the Runtime’s encrypt command. Only one of the password or uncryptedPassword parameters should be used at a time.
uncryptedPassword 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.
environment 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.
defaultDeliveryPath No Default delivery path to be used when executing a delivery from this repository, with the following syntax: <Analytics Project Name>/<Analytics Package Manager Name>. This will be added before the delivery name when executing a delivery from this repository without specifying the full delivery path. For example, if you define the default delivery path to ProjectA/ManagerA, if trying to execute a delivery named «DeliveryA», it will try to execute «ProjectA/ManagerA/DeliveryA». When no default delivery path is defined, the user has to specify the full path of the delivery when executing.

Deliveries executed from this repository are executed using the following path: <Analytics Project Name>/<Analytics Package Manager Name>/<Delivery name>.
For example: startdelivery.bat -repository analytics_3 -name ProjectA/ManagerA/DeliveryA
Refer to the «defaultDeliveryPath» parameter if you want the starting path to be defined automatically instead of having to define it in the execution command.

Example of repository:

<repositories>
	<deliveryRepository name="analytics_3_label_for_this_repository" class="com.stambia.repository.delivery.HttpDeliveryRepositoryV2Plugin" default="false">
		<parameter name="url" value="http://localhost:8080/analytics"/>
		<parameter name="user" value="stambia"/>
		<parameter name="uncryptedPassword" value="stambia"/>
		<parameter name="unreachableTolerancePeriod" value="30000"/>
		<parameter name="environment" value="analytics_environment_name"/>
		[<parameter name="defaultDeliveryPath" value="analytics_project_name/package_manager_name"/>]
	</deliveryRepository>
</repositories>
Legacy Delivery Repository configuration

Note that the legacy Delivery repository configuration is currently still supported for compatibility purposes.

If you have legacy repositories configuration you can use them in the Runtime, they will work.

However, we suggest using the new repository configuration presented above in this document when possible, it is the recommended way to configure the repositories.

Example of legacy configuration:

<repositories>
	<fileRepository name="default" default="true" folder="build/deliveries/"/> 
	<fileRepository name="webservices" default="true" folder="build/deliveries/webservices/" webService="true" synchPollingInterval="10000" scanMode="polling"/>
	<httpRepository name="analytics_2_deployment_manager_name" default="false" url="http://localhost:8080/analytics" user="stambia" uncryptedPassword="stambia" unreachableTolerancePeriod="30000"/>
	<httpRepository name="analytics_3_label_for_this_webservice_repository" environment="analytics_3_environment_name_to_retrieve_deliveries_from" default="true" url="http://localhost:8080/analytics" user="stambia" uncryptedPassword="stambia" unreachableTolerancePeriod="30000" webService="true" synchPollingInterval="10000" scanMode="polling"/>
</repositories>

Defining Jython scripting version

Jython is a language which can be used in scripting actions, allowing to use Python scripts in Java.

On a default installation Jython 2.2 version is shipped and used.

You can change the Jython version used by the Runtime through the following parameter:

<parameters>
	<...>
	<engineParameters>
		<...>
		<parameter name="jythonVersion" value="2.2"/>
		<...>
	</engineParameters>
	<...>
</parameters>

If you want to use another version, create a folder under the following location in the Runtime and put inside the corresponding Jython libraries.

The name of the folder you choose will be the name of the version to specify in this parameter.

<Runtime Installation Folder>/lib/jython/<jythonVersion>

You can find Jython libraries in the official Jython website: https://www.jython.org/download
You must download the «Jython Standalone» library and put it in the folder you created in the Runtime.
For instance, if you created a folder named «2.7.1» inside the Runtime, copy / paste inside the Jython Standalone library you want to use and then specify «2.7.1» in the «jythonVersion» Runtime parameter, so that the Runtime will use the Jython contained in this folder for scripting actions.

Read carefully the Java prerequisites when you want to use other Jython versions to be sure it is compatible with the Java version you are using for your Runtime.

Defining Java Additional Options

Java options are generally added to the Java command launching the Runtime with the -DmyOption01=value01 argument.
This part allows to set them directly in the Runtime’s Configuration file through the javaConfiguration node.
The options specified inside will be loaded just after the Runtime’s start.

  1. Open the engineParameters.xml file
  2. Set the additional options you want to add at Runtime’s startup.

The syntax is the following:

<parameters>
	<...>
	<javaConfiguration>
		<property name="myOption01" value="value01"/>
		<property name="myOption02" value="value02"/>
		<...>
	</javaConfiguration>
	<...>
</parameters>

Securing the Runtime

A Runtime installed with the default configuration can be accessed by anyone.

Any user can connect and make operations on it, such as listing or executing sessions.

This behavior can be configured easily in the Runtime configuration file (engineParmeters.xml), that offer the possibility to secure the connection through

A basic security configuration looks like this:

For securing RMI, HTTP, and Web Services endpoints through TLS:

<parameters>
	<...>
	<engineParameters>
		<...>
		<parameter name="rmiEnableTls" value="true"/>
		<...>	
		<parameter name="webServiceSecureProtocol" value="TLSv1.1"/>
		<parameter name="webServiceKeyStoreFile" value="D:/keystore/mykeystore.jks"/>
		<parameter name="webServiceKeyStoreType" value="JKS"/> 
		<parameter name="webServiceKeyStorePassword" value="keystore_password"/> 
		<parameter name="webServiceKeyAlias" value="key_alias"/>
		<parameter name="webServiceKeyPassword" value="key_password"/>
		<...>
	</engineParameters>
	<...>
</parameters>

For user / hostname restriction:

<parameters>
	<...> 
	<security>
		<user anonymous="true" roles="Connect View"/>
		<user name="admin"  uncryptedPassword="admin" roles="Admin"/>
		<user name="developer"  uncryptedPassword="developer" roles="Connect View Execute"/>
		<user name="consult"  uncryptedPassword="consult" roles="Connect View"/>
		<allow address="192.168.0.42"/>
	</security>
	<...>
</parameters>

Warning: The security node must contain at least one user, which can be a normal or anonymous user.

Securing RMI, HTTP, and published web services with TLS

If you want to enable TLS for RMI, HTTP, and Web services endpoints, you have to define the following parameters:

<parameters>
	<...>
	<engineParameters>
		<...>
		<parameter name="rmiEnableTls" value="true"/>
		<...>	
		<parameter name="webServiceSecureProtocol" value="TLSv1.1"/>
		<parameter name="webServiceKeyStoreFile" value="D:/keystore/mykeystore.jks"/>
		<parameter name="webServiceKeyStoreType" value="JKS"/> 
		<parameter name="webServiceKeyStorePassword" value="keystore_password"/> 
		<parameter name="webServiceKeyAlias" value="key_alias"/>
		<parameter name="webServiceKeyPassword" value="key_password"/>
		<...>
	</engineParameters>
	<...>
</parameters>

Note that defining the keystore and certificate details is mandatory if you want to enable TLS.
They are used to secure all the different protocols: RMI, HTTP, and Web Services endpoints.
Once they are defined, they automatically secure RMI (if RMIS is enabled), HTTP and web services.

The following parameters are available

Parameter Description
rmiEnableTls Define if you want the RMI protocol to be secured.
webServiceSecureProtocol Protocol to be used for securing the endpoints, like TLSv1.1 for instance.
webServiceKeyStoreFile Path to the Java keystore containing the certificate to use for securing the endpoints.
webServiceKeyStoreType Java keystore type, such as ‹JKS›.
webServiceKeyStorePassword Password of the keystore file.
webServiceKeyAlias Alias of the key which should be used,which must correspond to the alias of an existing key in the defined keystore.
webServiceKeyPassword Password of the key.

note about the clients

Note that once your Runtime endpoints are secure with TLS, the clients, such as the Designer, Analytics, or command line scripts, will need to know the certificate to be used for the communication.

If you are using certificates provided from an official authority, this will most of the time work without having to configure the certificate on the clients.

If you are using self-signed certificates, you will have to configure the clients to know this certificate.

Refer to this article to learn how to configure the various clients:
Communicating with Runtime

User / Password Restriction and Roles

You can define the users that can connect to the Runtime and their permissions.

The syntax is the following:

<parameters>
	<...> 
	<security>
		<...>
		<user anonymous="true" roles="Connect View"/>
		<user name="user01"  password="encrypted password" uncryptedPassword="plain text password" roles="Connect View Execute"/>
		<user name="user02"  password="encrypted password" uncryptedPassword="plain text password" roles="Connect View Execute"/>
		<...>
	</security>
	<...>
</parameters>

The following parameters are available:

Parameter Description
name User name, that will be used as the login credential
password Encrypted password of the user
uncryptedPassword Uncrypted (plain text) password of the user
roles Space separated list of roles for the user

The following roles are available:

Role Description
Connect The user can connect to the Runtime (required)
View The user can list and view all the sessions of the Runtime
Execute The user can execute deliveries on the Runtime
Admin The user has the full permissions on the Runtime. This is required for operations such as purging the sessions or scheduling deliveries.

About the Anonymous User:

An anonymous user can be set, to specify the permissions of the users that connect to the Runtime without specifying credentials.

<user anonymous="true" roles="Connect View"/>

When the anonymous user is set, it is therefore not mandatory to specify credentials when connecting.
The connected user will have the permissions of the anonymous user.

When the anonymous user is not set, specifying credentials when connecting is mandatory.
Anonymous connections will then be rejected.

Note that only one anonymous user can be set at a time.

Notes:
* Passwords are encrypted using the encrypt <password> command on the Runtime engine console (engine command line tool).
* Only one of the password or uncryptedPassword should be set
* Multiple roles can be assigned to one user, separated with space characters

Warning: The security node must contain at least one user, which can be a normal or anonymous user.

Hostname / IP restriction

You can define the hostnames / IP addresses that are allowed to connect to the runtime.

The syntax is the following:

<parameters>
	<...> 
	<security>
		<...>
		<allow address="Hostname or IP Address"/>
		<allow address="Another Hostname or another IP Address"/>
		<...>
	</security>
	<...>
</parameters>

Warning: The security node must also contain at least one user, which can be a normal or anonymous user.

Scheduler configuration

Configuring internal scheduler

The scheduler shipped with the Runtime stores all the schedules into a database.
This database is by default an internal H2 database, that is shipped with the Runtime and started with it.

If you want to change this and store the schedules into another database:

When the property org.quartz.jobStore.dataSource is set to internal (which is the default), the scheduler stores its schedules in the internal database.
Therefore, change it to another name when you want to use another database.

Finally, define the datasource parameters to match the location where the tables are created.

org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.StdJDBCDelegate 
org.quartz.jobStore.useProperties=false
#org.quartz.jobStore.dataSource=internal
org.quartz.jobStore.dataSource=database01
org.quartz.jobStore.tablePrefix=STB_
org.quartz.jobStore.isClustered=false
#============================================================================
# Configure Datasources  
#============================================================================
org.quartz.dataSource.database01.driver =org.h2.Driver
org.quartz.dataSource.database01.URL = jdbc:h2:tcp://localhost:42100/scheduler/internalDb;SCHEMA=SCHEDULER
org.quartz.dataSource.database01.user = sa
org.quartz.dataSource.database01.password = 
org.quartz.dataSource.database01.maxConnections = 5
org.quartz.dataSource.database01.validationQuery=
org.quartz.dataSource.database01.module=internal

Warning: For the Runtime scheduler to be able to communicate with the database, you must install the corresponding JDBC driver inside Runtime’s ‹default› Module. For instance, if you want to use Oracle as scheduler database, install Oracle’s JDBC driver in Runtime’s ‹default› Module.

Log database automatic purge

Purging automatically log database

You can plan an automatic purge of the Runtime session logs.
This can be done in Stambia and Stambia Analytics in the Purge tab of the Runtime Editor or alternatively on command line as explained below.

To proceed:

  1. Launch startCommand (.bat or .sh).
  2. Then use the purge scheduling command, the description of which follows:
schedule purge keep <number> <minute|hour|day|session>  cron <cronExpression> [sessionname <name,name2,...>] [status <done,error,killed>] [on host <hostname>] [port <hostport>]

It is possible to purge while keeping:

For example, to keep 90 days and schedule the purge every evening at 23h:

schedule purge keep 90 day cron "0 0 23 * * ?"

Modules location configuration

Changing default Modules location

When starting, the Runtime will load all the Modules located in the modules folder which is in Runtime installation folder.

You can change the location of this folder to another location by updating the initvariables.bat (Windows) or initavariables.sh (Linux / MAC) script which is in the Runtime installation folder.

Open this file and update the following variable with your desired location:

STAMBIA_MODULES_PATH=modules

Default value is a relative path to the ‹modules› folder inside the Runtime.

You can use absolute path also.

Refer to Developer’s Guide for further information about Modules.

If you are changing the Runtime’s Modules location, all the Modules will be loaded from this folder at Runtime’s startup. So if you are changing this on the Runtime which is included in the Designer, make sure this is consistent with the location where the Designer will manage the Modules. Moreover, as the Designer is reinitializing the included Runtime’s files at startup, make sure also to include the initvariables.bat / initvariables.sh script to the properties/protection.rules file to avoid your modification to be erased at Designer startup.


Runtime parameters reference

The configuration of the Runtime is done in the engineParameters.xml file that can be found in the properties folder of the Runtime’s installation.
This file allows to manage:

Take care, it is highly recommended to check first with Stambia the modifications you wish to bring to the XML files containing the Runtime parameters.
You can moreover find configuration samples in the properties/samples folder.

Note: Passwords are encrypted using the encrypt <password> command on the Runtime engine console (engine command line tool).

Tip: All the parameters are centralized in this file but can be easily externalized if required.

Engine Parameters

Common Parameters

Parameter Default value Comment
userLogDefaultName internalDB Name of the log where session logs are written. This is the name defined in the userLogName attribute on the log database configuration.
debugLevel 0 Debug level in the Runtime
temporaryFolder temp Temporary folder for the Runtime. Used by developers as a workspace, and by the Runtime to store some temporary files.
deliveryExtension deliv Extension of the deliveries. Do not change this value.
defaultFetchSize 1000 Default fetch value for reading data in databases. This value may be overloaded by the developers or when putting into production directly in the deliveries.
defaultBatchSize 1000 Default batch update value for writing data into databases. This value may be overloaded by the developers or when putting into production directly in the deliveries.
defaultJdbcConnectionTimeout 100 Default timeout value for connections to databases, in seconds
defaultJdbcQueryTimeout 10 Default timeout value for queries to databases, in seconds
defaultSessionReportNumber 10 Default number of sessions for the reporting part of the Runtime. Usually overloaded by the graphical interface.
memoryLogScanDelay 10000 Scan delay of the logs that have been brought back to memory so as to be purged, in milliseconds.
memoryLogCacheDelay 300000 Time during which logs stay in memory, in milliseconds.
logPurgeBatchSize Batch size used when performing purge operations on Runtime’s log database. When this parameter is not specified the queries performed by purge operations are processing all the rows at once. Specifying a batch size can help to avoid overloading the database when performing purge operations. The number of rows removed is logged inside Runtime log files, and note that the number of sessions processed per batch may slightly vary between each batch, in situations where multiple sessions have the same starting date.
defaultSessionLogLevel 400 This defines what level of information is logged inside log database for each session executed by the Runtime. The higher the value is the higher information are logged. Possible values are the following: -1, 0, 100, 200, 300, 400. Note that is applies only for sessions on which the log level is not defined manually at execution. See Logs parameter part of this documentation for further information.

Services Parameters

Parameter Default value Comment
launchSchedulerEngine true Condition for starting the scheduler that is integrated to the Runtime.
launchExecutionEngine true Condition for starting the execution part of the Runtime. This must stay true.
launchReportEngine true Condition for starting the reporting part of the Runtime. This must stay true.
startInternalDb true Condition for starting the internal database used for the session logs and the scheduler.
startSoapServer true Condition for starting the SOAP services that enable Stambia to expose web services.
rmiHost The RMI host is by default automatically calculated. This parameter allows to specify it manually if needed. Useful when there are multiple domains, or address translations that generate different IP addresses for the same host. The host that is indicated (IP or name) must be reachable by the client.
soapHost The SOAP host is by default automatically calculated. This parameter allows to specify it manually if needed. Useful when there are multiple domains, or address translations that generate different IP addresses for the same host. The host that is indicated (IP or name) must be reachable by the client.
enableHttpClientConnections true Defines if clients can connect and perform operations on the Runtime through HTTP.

Services Ports Parameters

Parameter Default value Comment
rmiPort 42000 IP port of the Java RMI service used for communication between the Runtime and graphical interfaces
rmiCallbackPort In the RMI protocole, the client can also receive queries from the server. In this case, it uses the rmiCallbackPort. The default value is that of the rmiPort.
internalDbTcpPort 42100 IP port of the internal database
internalDbWebPort 42101 IP port of the Web interface of the internal database
soapServerPort 42200 IP port used by the SOAP server

Services Security

Parameter Default value Comment
rmiEnableTls false Defines if the RMI service exposed for other tools to connect to the Runtime should be secured through TLS.
globalPasswordCipheringKeyName Name of the key that should be used for all password encryption / decryption. It must match a key defined under a keystore in the Runtime configuration. This parameter was formerly named passwordCipheringKeyName.
deliveryPasswordCipheringKeyName Name of the key that should be used for password decryption while executing a delivery. This is used only for the passwords which are in deliveries. This key overrides the key defined by globalPasswordCipherKeyName parameter when both are defined, for the delivery password decryption part. It must match a key defined under a keystore in the Runtime configuration.

Services Miscellaneous Parameters

Parameter Default value Comment
enableConnectionPoolForJdbcDatabases false If this parameter is set to true, connections created and used by the Runtime for exchanges with JDBC databases will be performed through a pool of connection. This can help to reduce the amount of connections created to these databases, as they will be re-used instead of re-created each time.
enableConnectionPoolForLogDatabase false If this parameter is set to true, connections created and used by the Runtime for exchanges with its Log Database will be performed through a pool of connection. This can help to reduce the amount of connections created to the Log Database, as they will be re-used instead of re-created each time.

Standard Output Parameters

Parameter Default value Comment
stackTraceOnStdOutput true To write the stacktrace on the standard output, if there is an error.
statisticsOnStdOutput true To write the statistics on the standard output, at the end of a session.
sumVariables List of the variables used to calculate the session’s statistics

Web Services Parameters

Parameter Default value Comment
soapServerUser Optional user for queries to the SOAP server
soapServerPassword Optional password for queries to the SOAP server
soapServerUncryptedPassword Optional unencrypted password for queries to the SOAP server
soapServerThreadPoolSize Maximum number of concurrent threads on the SOAP server. If number exceeds this size, sessions are put on hold
httpRestServerUser Optional user for queries to the REST server
httpRestServerPassword Optional password for queries to the REST server
httpRestServerUncryptedPassword Optional unencrypted password for queries to the REST server
webServiceInputMessageKeep if_error Specifies if the input files created during web services invocations should be kept or not. The possible values are: yes, no, if_error. (This parameter also exist in the headers of the web Services and in the meta-inf of a process)
webServiceOutputMessageKeep if_error Specifies if the output files created during web services invocations should be kept or not. The possible values are: yes, no, if_error. (This parameter also exist in the headers of the web Services and in the meta-inf of a process)
webServiceFaultMessageKeep if_error Specifies if the fault files created during web services invocations should be kept or not. The possible values are: yes, no, if_error. (This parameter also exist in the headers of the web Services and in the meta-inf of a process)

Logs parameters

In this part, the default values will be those used for the logs in H2 (the internal base). For other logs examples, please refer to the example files that are provided.

Log header

Parameter Example value Comment
userLogName internalDB Name of the log, that must then be used in the userLogDefaultName engine Parameter
autoUpdate true Condition for the automatic update of the log structures
userLogClass com.indy.engine.userLog.RdbmsUserLog Java class that is used (do not change)
synchMode synch Recording mode

synchMode

  1. synch : session logs are synchronous, while being executing, a session will log synchronously all its session logs. This is the default mode used.
  2. asynch : while being executing, a session will log asynchronously all its session logs, the session will continue to be executed without waiting for the information to be logged in database.
  3. synchFirstLog : this mode is therefore a mix between the synch and asynch mode. The first log of the session will be synchronous, to be sure that at least one log has worked and that the log database is available, then the following logs will all be asynchronous.

Internal parameters

Parameter Example value Comment
userLogRdbmsDriver org.h2.Driver Java driver which will be used (this file must be in the Runtime folder lib/jdbc)
userLogRdbmsUrl jdbc:h2:tcp://localhost:42100/sessions/internalDb/sessionLogs Connection url
userLogRdbmsUser sa Connection user
userLogRdbmsPassword Connection password (non encrypted, plain text)
userLogRdbmsEncryptedPassword Connection password (encrypted)
userLogRdbmsModule Module containing the client libraries (usually the Module containing the JDBC driver of the database)
userLogRdbmsVarcharType varchar Type used when the data is a character string
userLogRdbmsVarcharMaxSize 1000 Maximum length of the character strings with the type defined above.
userLogRdbmsNumericType numeric Type used when the data is numerical
userLogRdbmsClobType clob Type used when the data is text (clob, limitless text)
userLogRdbmsBlobType blob Type used when the data is binary (blob)
userLogRdbmsSchemaName logs Database scheme used to create the tables
userLogRdbmsUseSchemaNameForIndexCreation true Condition for adding a scheme to prefix indexes during creation
userLogRdbmsDeleteSyntaxe Delete from Syntax of the delete commands. The name of the table will be added behind.
userLogRdbmsCompressedLevel bestCompression Type of compression used (if activated). Possible values: bestCompression, bestSpeed or default
userLogRdbmsDeliveryFormat compressed Gives the delivery’s storage format in the database. Possible values: text,binary or compressed
userLogRdbmsPropertyMaxVarcharSize 1000 Size of the character strings beyond which the data will be stored as CLOB
userLogRdbmsPropertyMaxClobSize 10000 Size of the CLOB beyond which the data will be stored as BLOB. -1 means «infinite»
userLogRdbmsPropertyBinaryFormat compressed Specifies the compression of the BLOB. Possible values: binary or compressed
userLogRdbmsTimestampQuery select now() SQL order to retrieve the current time stamp.
userLogRdbmsInactivityDetectionPeriod 90000
userLogRdbmsActivityRefreshInterval 60000
userLogRdbmsIndexCreationOption Character string that is added after the SQL order which creates indexes. Useful to specify physical storage parameters such as «tablespaces» or underlying physical types. For example, with MysqlENGINE = InnoDB
userLogRdbmsTableCreationOption Character string that is added after the SQL order which creates tables. Useful to specify physical storage parameters such as «tablespaces» or underlying physical types. For example, with MysqlENGINE = InnoDB
userLogRdbmsConnectionRetryNumber 20 Number of times the Runtime will try to connect / reconnect to the log database when it is unavailable.
userLogRdbmsConnectionRetryDelay 1000 Delay between each attempt of connection / reconnection to the log database when it is unavailable.
userLogRdbmsConnectionEnableRetry true Defines if the runtime should attempt reconnect to the log database when it is unavailable.

Note: Passwords are encrypted using the encrypt <password> command on the Runtime engine console (engine command line tool).

Session Log Level

The session log level defines the level of information which is logged inside log database for each session executed by the Runtime.

The higher the value is the higher information are logged.
You can find below the different log level values and what level of details can be consulted, depending on the session status.

Log level Running session Successful session Session with errors
-1 Not logged Not logged Not logged
0 Full details Not logged Full details
100 Full details Session Header and Statistics Full details
200 Full details logLevel 100 + Process Information and Statistics Full details
300 Full details logLevel 200 + Actions Information and Statistics Full details
400 Full details Full details Full details

Runtime upgrade

Overview

Upgrade procedure is described below.

Depending on if you are upgrading between minor versions, or if you are upgrading to a new major version, the procedure may change, please read carefully the procedure details below.

Major version upgrade procedure

If you are upgrading from Stambia S17.x.x to Stambia 2020 (S20.x.x), please refer to complete upgrade / migration procedure:

https://stambia.org/doc/53-stambia-di-software/runtime/installation-and-upgrade/69-upgrading-a-runtime-instance

Minor version upgrade procedure

If you are upgrading from S20.0.x to another S20.0.x version you can follow the procedure below.

After downloading the desired Runtime ZIP archive, proceed through the steps listed below.

We assume your current Runtime is installed into a directory named «stambiaRuntime».

  1. Install the new Runtime in a new directory, something like "stambiaRuntime_new"
  2. On UNIX/Linux systems make sure that all the stambiaRuntime_new/*.sh files are executable
  3. Stop the old Runtime and make a backup
  4. Copy the content of the following directories from the old Runtime to the new Runtime:
    1. stambiaRuntime\build\deliveries
    2. stambiaRuntime\build\packages
    3. stambiaRuntime\modules
    4. stambiaRuntime\properties (if you have set some properties)
    5. stambiaRuntime\scheduler (if you are using the Runtime’s scheduler)
    6. stambiaRuntime\sessions (if you use the Runtime’s internal log database)
    7. Optionally: stambiaRuntime\temp (if your Processes store specific files intentionnally in this directory)
  5. Rename the old Runtime’s directory to something like "stambiaRuntime_old"
  6. Rename the new Runtime’s directory to "stambiaRuntime"
  7. Apply the read / right permissions to the new folder as it was set on the old one
  8. If the Runtime is installed as a Windows service, remove and re-install the service
  9. Start the Runtime

Troubleshooting

You will find in this section some tips and help for troubleshooting common issues.

MAC OS – Runtime startup and execution time is slow

You installed a Runtime on MAC OS, and you notice that Runtime’s startup is very slow, as well as executing sessions.

Refer to the following article which will guide you to try resolving this issue.

Runtime startup and execution time is slow on MAC OS