Apama Documentation : Deploying and Managing Apama Applications : Overview of Deploying Apama Applications : About deploying Apama applications with a YAML configuration file
About deploying Apama applications with a YAML configuration file
As of 9.10.0.4, it is possible to deploy Apama applications with a YAML configuration file.
Instead of having another process inject code and send events into a correlator at startup, it is possible to use a YAML configuration file to list files to be loaded by the correlator at startup. This is useful for Docker containers or other minimal environments where only part of an Apama installation is available or it is not practical to run Java tools to perform the injections. It is also a better fit for Docker use cases as the correlator does not require any other coordination process for startup. For typical installations not using such environments, use of Ant macros or Command Central is recommended instead, which perform the injections after starting the correlator.
The YAML configuration file for the correlator is specified using the --config option when starting the event correlator (see also Starting the event correlator). The YAML file itself contains the following:
correlator:
initialization:
list:
- ${PARENT_DIR}/bin/myPlugin.jar
- ${PARENT_DIR}/eventdefinitions/evtdef.mon
- ${APAMA_HOME}/monitors/ConnectivityPlugins.mon
- ${PARENT_DIR}/monitors/app.mon
- ${PARENT_DIR}/events/start.evt
encoding: UTF8
It is recommended to use a substitution variable such as ${APAMA_HOME} or ${PARENT_DIR} rather than absolute or relative paths. This makes the configuration independent of the correlator's current working directory. ${PARENT_DIR} is set to the directory containing the configuration file.
The list entries must have one of the following extensions:
*.mon for EPL monitor, aggregate and event definition source.
*.jar for JMon or EPL plug-ins written in Java.
*.cdp for correlator deployment packages.
*.evt for event files.
Note that Apama queries (.qry) or scenario definitions (.sdf) are not supported in source form. Scenarios have to be generated into EPL, and the generated EPL needs to be listed in the YAML configuration.
The encoding entry is optional. If UTF8 is specified, all of the text input files (.mon, .evt) are read as UTF-8. If local is specified or if the encoding entry is not specified at all, the text files are assumed to be in the local encoding unless they start with a UTF-8 byte order mark (BOM) in which case they are treated as UTF-8.
This mechanism separates the build-time (calculating injection order, generating EPL) steps from the deployment-time steps, so no build steps are required in the environment where the correlator is running. This does mean that any changes to the project potentially require rewriting the YAML list and then redeploying, however, it allows separation of these concerns.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback