Getting started with Akita is as simple as dropping our Agent into your service or stack. Once we’re in, we gather all the data you need and surface it in the Akita app so you can easily see what your system is doing.
Deploying directly from source?
If you are using Fly.io to deploy an application without a container, these instructions do not apply to you. See Generating API Models without Packet Capture for some additional options.
You will be setting up the Akita Agent to run within your Docker 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 as a Secret
- Launch the new container
- Verify that the Akita Agent is working
Give your project a name that's easy to remember – you'll need it later, when you start the Akita Agent on the CLI.
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 the Akita Agent during your container build process by running the install script below, adding it to your Dockerfile, or manually downloading the Debian package from our repository.
RUN bash -c "$(curl -L https://releases.akita.software/scripts/install_akita.sh)"
There are two options for running the Akita Agent:
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.
You will need to set a rate-limit. We recommend starting with a low rate-limit, as it is applied to each running container.
CMD ["/usr/local/bin/akita", "apidump", "--service", "<your project name>", \ "-u", "root", "-c", "<your normal commnand line>", \ "--rate-limit", "1000"]
If your normal entry point is a script, you can run the Akita Agent as a background process. Run
akita apidump --service <your_project_name> in the background.
The Akita Agent needs to access the API Key you created earlier. The best way to set the API key is using a Secret, which is passed as an environment variable to the container.
From the command line, add new secrets called
AKITA_API_KEY_SECRET with your key's values filled in:
$ flyctl secrets set AKITA_API_KEY_ID=apk_xxxxxxx $ flyctl secrest set AKITA_API_KEY_SECRET=xxxxxxxxxx
You will see a hashed version of the secret in your Fly.io activity log.
After adding the Akita API key, use
flyctl deploy (for an existing application) or
flyctl launch (for a new one). This will build the new version of the container that contains the Akita Agent, and deploy it to Fly.io as a new revision of 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.
Updated 29 days ago