Apama and Amazon Marketplace

Introduction

Marketplace front page

Amazon marketplace is a new offering that they describe as follows

AWS Marketplace is a curated digital catalog that makes it easy for customers to find, buy, deploy, and manage third-party software and services that customers need to build solutions and run their businesses. AWS Marketplace includes thousands of software listings from popular categories such as security, networking, storage, machine learning, business intelligence, database, and devOps and simplifies software licensing and procurement with flexible pricing options and multiple deployment methods.

At the time of writing Software AG products have been published on AWS Marketplace and are available for use. You can find them by searching for Software AG on the main marketplace page here. There will be a listing for Apama alongside the other Software AG products and this will take you to a product overview page that should look similar to the picture below.

Apama on AWS Marketplace

Whilst you can browse the offering without an Amazon account, you will need to have an AWS account to make use of them.

Useful links

AWS is a complex ecosystem of components, and it is well beyond the scope of this blog post to describe exactly how you can get a working environment. For people that are new to AWS I will highlight a few resources that can ease the process of provisioning the correct resources once you have signed up.

  • virtualenv – generate a personal Python install that can be used to install useful tools
  • aws CLI – Python CLI tool specifically for the setup of Kubernetes environment and interacting with AWS
  • eksctl – this is a one stop tool for creating an EKS cluster
  • kubectl – the required version must be >= 1.10 to work with AWS
  • AWS IAM authenticator for Kubernetes – used by aws CLI to manage credentials

There is a bias toward Linux and command line within this blog post but everything here can also be achieved in a Windows environment and by using the AWS console. See the Amazon AWS website for specific details and tutorials on how to use the console and what everything means.

Getting Started

I am going to take you through from subscription to running the Apama AWS Marketplace images. I will show below how to get Apama from the marketplace, and to deploy a container in a pod running in an EKS cluster. The process will be similar for EC2 but is not explicitly covered here. To keep this blog lean I am assuming that you have:

  • an AWS account and aws CLI installed (see here for further details on the aws CLI)
  • A configured EKS cluster to run the container on.
  • See here for those not using eksctl listed above
  • otherwise you can run eksctl create cluster apama-eks-cluster
  • kubectl configured (Note eksctl sets this up for you)

The first thing to do is subscribe to the Apama offering in the AWS Marketplace, you do this by clicking the ‘continue to subscribe‘ button on the top of the page (See image above). This takes you to a page where you accept terms and the process of subscription continues. The sign-up is complete when you receive a mail confirming that you are subscribed similar to below, and the ‘Continue to Configuration‘ button becomes usable .

The mail refers to AMI, but we do not have an AMI definition and so launching from marketplace is not currently an option for our images.  The reason for this is because Apama correlator will form the basis of an application and the images provided will usually be used to create new images containing user created code and configuration.

Subscription page

Next we continue to the configuration page which allows the selection of the version but only has one option for fulfillment currently. Whilst the supported Amazon Services say that it can only be used in EKS it can in fact be used in ECS in a similar way as outlined below.Click ‘Continue to Launch‘ and you will see a page similar to this:

Launch page

Click on ‘View container details‘ link and you will see details of the containers in a pop-up window including the image registry names and how to authenticate to pull the images.

Image details

Running the images

Now we are subscribed we can use the container by referring to the images in our Kubernetes configuration or on the command line. Using the command line we log in so that Docker can access the images. The login command uses aws CLI and indirectly calls docker login to the Apama marketplace registry.

The pull is a more familiar command that gets the image from the marketplace registry and stores it locally so it is accessible when we come to create resources that will access it.

The image can be run by using kubectl, see Kubernetes documentation for full details.

Lastly the image can be referenced in a configuration file. Apama has several samples that can be used to test the images but here I have chosen the simple-sample. I edited the kubernetes.yml file so that it refers to the correct image.

Then I used kubectl to deploy a pod running the container.

The status of the pod can be obtained by using

Further detailed information, including what the current state of the pod is, can be obtained using:

By using describe pods we can see that the create pulled the image correctly and then started the container. to see the output of the correlator logs you can use the following:

Finally to stop the sample and remove the deployed pod use kubectl delete and if If you used eksctl to create a temporary cluster to test on you can now delete it using:

This should get you started with Apama in AWS but the power and flexibility of Amazon and Apama will allow you to take your application to new heights!

–John