This page describes different options you can use to instrument containerized applications with an AppDynamics App Server Agent.
You can use these on-premises and cloud deployment platforms to deploy an application as a Docker container image:
- Cloud containerized platforms, such as Amazon ECS and Azure Container Instances
- Docker Swarm
- Hosts running Docker Engine
Each of these platforms supports different options to instrument a containerized application with an App Server Agent.
For applications running on Kubernetes platforms (such as: OpenShift, Rancher, EKS, AKS, and GKE), you can use these options to instrument applications:
AppDynamics recommends auto-instrumentation because it provides the simplest operational experience. It avoids the need to change individual application images or deployment specs. It centralizes App Agent configuration to a single location and includes the App Server Agent version. This greatly simplifies initial rollouts of App Server Agents and subsequent upgrades. See Auto-Instrument Applications with the Cluster Agent.
If you cannot use auto-instrumentation, we recommend using init containers as the manual option to copy agent files to the application container at deploy time. See Use Init Containers to Instrument Applications.
You can also use Dockerfiles to copy the agent files to the Docker image at build time. See Use a Dockerfile to Instrument Applications.
For non-Kubernetes environments (such as: Docker Swarm, Amazon ECS, and Azure Container Instances), using Dockerfiles is the best option. See Use a Dockerfile to Instrument Applications.
Depending on the environment, you may be able to install the App Server Agent without changing the application image. For example, you can use a Docker shared volume to provide a running container access to the App Server Agent files. Amazon ECS supports container dependencies which provide a way to reference a second container at startup. You can then use the second container to copy the App Server Agent files to the application container.