Apama Advent Calendar - 13 Dec 2021 - Apama in containers

Level: INTERMEDIATE

Apama has been working with containers since the very early releases of Docker, and then a little later we were even a launch partner of Docker Store (eventually just part of DockerHub).

Prior to providing pre-made Apama base-images in DockerHub we also had instructions available for how to build your own image from an on-prem installation, and those also still exist. We’ve had samples all the way through, as standalone containers, then orchestrated with Docker Compose on top of Docker Swarm and then with Kubernetes. When Apama is used as a microservice in Cumulocity IoT cloud it is in fact running as a container in a Kubernetes pod.

We have official documentation about Apama with Docker (v10.11) and Kubernetes

You can also see when we added Kubernetes support back around 2018 with a nice simple blog post that explains it: Apama Community Edition Using Apama with Docker and Kubernetes

As mentioned, we provide several “base-images” pre-configured with Apama and make those available on DockerHub. These freely available base images containing Apama are then used by customers to build and deploy their custom solutions, in a very similar way to how they might do with other platforms such as Java, Node.js, or Python. You can find the base images with the following link - you’ll need to sign in to your DockerHub account and “purchase” access to images (at zero-cost), which takes you through the license agreement.

You will see that (at the time of writing) there are three distinct base images:

  • apama-correlator : This is the primary target base image for runtime deployments
  • apama-builder : This is an image normally used during the build steps of a Docker multi-stage build
  • apama-cumulocity-jre : This is an alternative to the above apama-correlator image that would be the target base image for custom microservices for Cumulocity IoT

Given the previous post on Day 10 you may have already noted that it is quite simple to add a dockerfile to your existing projects in Software AG Designer. To make that easier we have an existing article that walks you through it, explains the process, and even describes a multi-stage build. The article was written at the time of version 10.3 but is equally valid today with 10.11: Apama Builder For Docker - Knowledge base - Software AG Tech Community & Forums

You can also see various historical Apama Community blog posts on the subject:
Search results for ‘docker tags:Streaming-Analytics-Apama’ - Software AG Tech Community & Forums

Aside from the knowledge base articles, blogs, and official documentation, we also have some samples available on GitHub:

As you have seen, using Apama in containers isn’t really any more difficult than without, and it becoming the new normal for most deployments.

Finally, please accept our apologies - like the rest of the IT industry we’ve had a rather unexpectedly busy weekend after the Log4J zero-day was announced on Friday. So there are no posts for Saturday 11th and Sunday 12th December. Given we are talking about Docker here in this article, you may find their recent blog post about Log4J helpful and interesting as it would also apply here.


This is Day #13 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.