Apama Advent Calendar - 14 Dec 2021 - Deploying Apama projects

Level: INTERMEDIATE

Once you’ve finished your Apama project, you likely want to utilize it in a different environment than where you developed it. In this edition of the Apama Advent Calendar, we’ll explore some of the ways that you can take completed projects and turn them into deployable packages for Apama.

apama_project

apama_project is a command-line utility, that enables you to access some of the development patterns previously only available in Software AG Designer. For a more in-depth overview, check out this blog on the ApamaCommunity website: Apama Community Edition Introducing ‘apama_project’

Utilizing this tool, or Software AG Designer, allows you to structure your project in the correct form, such that the tools we’re going to mention in the rest of this article will convert them into something you can deploy.

engine_deploy

engine_deploy is our primary mechanism to convert projects into deployable assets.

One of the easiest ways to utilize this tool is using the --outputDeployDir | -d option. For example, the following command

    engine_deploy --outputDeployDir deployed_project/ input_project

This takes your input project, creates the relevant YAML initialization file to inject all the relevant files into your correlator, and generates a folder containing everything you need to run your project within Apama. Furthermore, you can set the output directory to be a zip file, and it will automatically create a zip file with the same structure as the deployment directory.

(As an aside, it it worth noting that engine_deploy also supports outputting to our proprietary correlator deployment package (CDP) format, which treats EPL files much in the way the JAR file format treats Java files. CDPs require a license to use. More information on CDPs can be found on our (v10.11) documentation page.)

For more documentation on our engine_deploy tool, look at this documentation page: Deploying a correlator (softwareag.com)

Docker

We provide support for using Apama with Docker as we’ve described on Day #13 of the Apama advent calendar. If your project is already deployed, then you can provide it to your Docker container, but with the Apama Builder docker image, you can build Apama projects as a part of a Docker multi-stage build, using the engine_deploy tool that we’ve described above, with all the provided features.

More information on building projects during a Docker build can be found on the following page: Building Apama projects during the Docker build (softwareag.com)

Today’s article was kindly provided by Bevan Philip from the Apama engineering team.


This is Day 14 of a short series of brief tips, tricks, hints, and reminders of information relating to the Apama Streaming Analytics platform, both from Software AG as well as from the community.
This series of articles will be published Monday-Friday only, with the occasional weekend bonus.