Docker Compose

Getting started with Akita is as simple as adding our Agent into your Docker container. Below are instructions for installing the Akita Agent using docker compose.

❗️

Public Internet Access Required

Your Docker container must be connected to the public internet for this integration to work. If you are running on a private network, please see our docs on Internal Network.

You will be setting up the Akita Agent by:

  1. Creating an Akita Project
  2. Generating an API key for the Akita Agent
  3. Attaching the Akita Agent
  4. Verifying that the Akita Agent is working

🚧

Akita Account Required

You must have an Akita account to use Akita. You can create an account here.

Create a project

Log-in to 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.

2254

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.

780

Attach Agent

To attach the Akita Agent to your Docker container, your container must a.) be connected to the public internet, and b.) be running. Then:

  1. Start your service via docker-compose.
  2. Locate the name of the container where the app, service, or API you want to monitor is running.
  3. Add the following to your Docker Compose file, specifying the docker-compose service label in the network_mode:
version: '3'
services:
  your-service-label:
    ...
  akita:
    container_name: akita
    image: akitasoftware/cli:latest
    depends_on:
     - your-service-label
    environment:
     - AKITA_API_KEY_ID=apk_xxxxxxxx
     - AKITA_API_KEY_SECRET=xxxxxxx
    network_mode: "service:your-service-label"
    entrypoint: /akita apidump --service your-project-name

🚧

Version Pinning

The above example will pull the latest version of our Akita Agent. If you would like to pin the version of the Agent, replace ":latest" with the version you choose. See our GitHub for the latest version.

  1. (Recommended) Add the --always-recreate-deps flag when running docker-compose up command to have Docker recreate the Akita container along with your service container.

The Akita container observes traffic to your service by sharing the network stack with your service's container, so the connection needs to be recreated when your service is recreated.

Note that the --always-recreate-deps flag will cause other dependencies to be recreated. If you would prefer to only restart the Akita service, you can run docker-compose a second time to recreate the Akita service specifically:

docker-compose up -d --force-recreate akita

Verify

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.