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.
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:
- Create an Akita Project
- Generate an API key for the Akita Agent
- Install the Akita Agent in your container
- Run the Akita Agent
- Configure your Akita API key in the App Service configuration
- Launch the new container
- Verify 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 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.
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)"
There are two options for running the Akita Agent:
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_SECRET and enter your API key ID and key secret. These values will be securely added to the environment variables in the 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.
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.
Updated 29 days ago