Hi
We are implementing some build processes in which docker images will be an output of a build pipeline.
We will need to be able to bake AppD agents into the docker images.
Are you able to provide a Docker file receipe or direct me to a resource for information on possible approaches ?
Thanks in advance,
Conceptually, the Java agent is just another asset of your application to deploy and whatever orchestration you're using for your application could be used to put the Java agent into your base image or add it to the containers dynamically.
The machine agent should NOT be deployed into the Docker images, but rather should be installed on the host where your containers run. The machine agent will automatically collect container metrics in an upcoming release, but in the meantime you can use the Docker Extension from the Community: https://www.appdynamics.com/community/exchange/extension/docker-monitoring-extension/
Regards,
Brian Wheeldon
I have a requirement of keeing Appdynamics Java Agent inside the docker image and want application inside docker image to pol the appdynamics controller.
Have put the agaent in docker image and the same is getting show inside container also when i create and execute container with that image ,But my application is not getting registered with appdynamics controller.
I'm giving the path of javaaganet.jar in "ENTRYPOINT" of the docker file. liie below
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -javaagent:/usr/local/appagent/javaagent.jar -jar /app.jar" ],
I'm expecting once my container is up in entry point i will provide this jar and my application will register with the controller , but the same is failing.
Do have any suggestion for this , pls
The basic approach you describe should be fine, but you need to set the details the agent will use to connect to the controller.
If you have not somehow editted these into the controller-info.xml in your dockerfile, you will need to pass additional system properties or environment variables to your container.
To verify that this is indeed the issue, you can look in the agent log file within the container.
Also, note that node name need to be unique within a tier. You may want to look at auto node naming.