AWS Elastic Beanstalk

Getting started with Akita is as simple as dropping our Agent into your Docker container. Below are instructions for installing the Akita Agent as a Docker container in AWS Elastic Beanstalk.

❗️

Linux Support Only

We only support Linux at the moment. If you're running AWS Elastic Beanstalk with Windows, you can try DIY Akita Agent Integration

📘

Prefer to run the Akita Agent on an underlying AWS EC2 instance?

See the Linux (bare-metal or local) instructions instead.

To set up the Akita Agent on AWS Elastic Beanstalk, you must first set up Akita and then you can:

  1. Use Docker Compose, or
  2. Use a Dockerfile, or
  3. Use Dockerrun.aws.json (Alpha)

Set Up Akita

You’ll need an Akita account. Join our open beta to create an account.

Create a project

Log into the Akita App, and go to the Settings page.
Enter a project name and click "Create Project". We suggest naming the project after your app or deployment stack.

Give your project a name that's easy to remember – you'll need it later, when you start the Akita agent on the CLI.

Generate API key

On the same Settings page, locate and click the “API Keys” tab. Click the “Set up the Akita client” button. Copy your API key secret into your favorite password manager or somewhere else you can easily access it. Also note your API key, as you will need it later.

Docker Compose

To install the Akita Agent, add the Akita Agent as an additional service to your docker-compose.yaml file, as shown below. If you want to version pin the Akita CLI, replace akita-cli:latest with a specific version.

services:
  ...
  akita:
    container_name: akita
    image: public.ecr.aws/akitasoftware/akita-cli:latest
    
    env_file:
      - .env

    network_mode: "host"
    entrypoint: /akita apidump --project <your project here>

This configures the Akita Agent to listen for all traffic on the host, and upload it to the project you created earlier.

The agent will receive the API key as an environment variable, and the next section describes how to configure the values that are placed in the .env file through the Amazon web console.

Add the Akita API key as an environment property

In the AWS console, go the "configuration" section of the Elastic Beanstalk environment where you'll be deploying Akita.
Edit the "software" category, and add environment properties named AKITA_API_KEY_ID and AKITA_API_KEY_SECRET, using the values of the API key you created

Deploy and Verify

Deploy the new version of your application as you normally would. The Akita Agent will automatically start watching the data sent to and from your application.

In the Akita web console, check out the incoming data on the Model page. You should see a map of your API being generated as the Akita Agent gathers data.

Then check out the Metrics and Errors page to get real-time information on the health of your app or service.

Dockerfile

Add the following line to your Dockerfile, which will install the latest Akita Agent:

RUN bash -c "$(curl -L https://releases.akita.software/scripts/install_akita.sh)"

Next, change the CMD directive in your Dockerfile to run the Akita CLI and start your previous entry point as a subprocess:

CMD ["/usr/local/bin/akita", "apidump", "--project", "<your project name>", \
     "-u", "root", "-c", "<your normal commnand line>", \
     "--rate-limit", "1000"]

You may instead choose to run Akita as a background process, but this requires writing a script that will do so during container start, before launching your normal main process.

Then Add the Akita API key as an environment property to make the API key available to the Akita Agent.

Add the Akita API key as an environment property

In the AWS console, go to the "configuration" section of the Elastic Beanstalk environment where you'll be deploying Akita.
Edit the "software" category, and add environment properties named AKITA_API_KEY_ID and AKITA_API_KEY_SECRET, using the values of the API key you created

Deploy and Verify

Deploy the new version of your application as you normally would. The Akita Agent will automatically start watching the data sent to and from your application.

In the Akita web console, check out the incoming data on the Model page. You should see a map of your API being generated as the Akita Agent gathers data.

Then check out the Metrics and Errors page to get real-time information on the health of your app or service.

Create an Application with Dockerrun.aws.json

Note: This installation method is in Alpha. Please contact us on the Akita Slack if you run into any difficulty, and we’ll be happy to help.

Dockerrun.aws.json is an AWS ECS task definition that allows the Akita Agent to run as a separate container using host networking (on Linux clusters). It allows you to avoid editing your existing container. Add the following container definition to your configuration file:

{
  "containerDefinitions" : [
  ...
    {
      "name": "akita",
      "image": "public.ecr.aws/akitasoftware/akita-cli:latest",
      "essential": false,
      "memory": 256,
      "networkMode": "host",
      "entrypoint": ["/akita", "apidump, "--project", "<your project here>"]
    }
  ]

This will start an instance of the Akita Agent on each host, and monitor all network traffic on that host.

Next, add the Akita API key as an environment property to make the API key available to the Akita Agent.

Add the Akita API key as an environment property

In the AWS console, go to the "configuration" section of the Elastic Beanstalk environment where you'll be deploying Akita.
Edit the "software" category, and add environment properties named AKITA_API_KEY_ID and AKITA_API_KEY_SECRET, using the values of the API key you created

Deploy and Verify

Deploy the new version of your application as you normally would. The Akita Agent will automatically start watching the data sent to and from your application.

In the Akita web console, check out the incoming data on the Model page. You should see a map of your API being generated as the Akita Agent gathers data.

Then check out the Metrics and Errors page to get real-time information on the health of your app or service.