Azure Web Apps

Getting started with Akita is as simple as dropping our Agent into your service. Below are instructions for installing the Akita Agent in Azure App Service.

🚧

Private Beta

To use Akita, you’ll need to be in our beta.

❗️

Running Azure Web Apps with Windows?

We only support Linux at the moment. Let us know so we can prioritize adding support.

❗️

Deploying directly from source?

If you are not using a Linux Docker container to deploy to Azure App Service, these instructions will not apply. See Generating API Models without Packet Capture for some additional options.

You will be setting up the Akita Agent to run within your custom Linux container. To set up the Akita Agent you will:

  1. Create an Akita Project
  2. Generate an API key for the Akita Agent
  3. Install the Akita Agent in your container
  4. Run the Akita Agent
  5. Configure your Akita API key in the App Service configuration
  6. Launch the new container
  7. Verify that the Akita Agent is working

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.

22542254

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.

780780

Install Agent in container

Install the Akita Agent during your container build process by running the install script below, adding it to your Dockerfile.

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

Run Agent

There are two options for running the Akita Agent:

  1. Modify the entry point in your Dockerfile, or
  2. Via a script

Run with Dockerfile

Next, change your container's default command to the Akita Agent by adding the below to your Dockerfile. Use the project name you created earlier on the Akita console.
The default rate limit is 1000 requests per minute. You can change it as desired, just note that it is applied to each running container.

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

Run with script

If your normal entry point is a script, you can run the Akita Agent as a background process. Run akita apidump --project <your_project_name> in the background.

Configure API key

The Akita Agent needs to access the API Key you created earlier. The best way to set the API key is by an environment variable passed in to the container.

In the Azure web interface, you can configure the environment variables by navigating to Settings > Configuration > Application settings. Add new application settings named AKITA_API_KEY_ID and AKITA_API_KEY_SECRET and enter your API key ID and key secret. These values will be securely added to the environment variables in the container.

21772177

Launch Container

After adding the Akita API key, build your new container, add it to your normal repository, and restart your application in Azure App Service. This will cause Azure to pull the new version of the container, and the Akita Agent will start sending data.

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.