Download PDF
Download page Install the Database Agent as a Container Image.
Install the Database Agent as a Container Image
Install the Database Agent container image as follows:
You can install Database Agent as a non-root user.
Obtain the Database Agent Container Image
You can obtain the container image in one of the following ways:
Download and Build the Database Agent Container Image
- Download the Database Agent zip file from the Download portal.
- Unzip the Database Agent zip file.
Navigate to the directory where you unzipped the file and run this command:
docker build -t <image-name> .CODE
Pull the Database Agent Container Image from Docker Hub
Pull the latest Database Agent container image from the Docker hub:
docker pull appdynamics/db-agent:latestCODE(Optional) Tag the image:
docker tag appdynamics/db-agent:latest <image-name>CODE
If you want to run the image on Docker, set certain environment variables:
Sample command
docker run -e APPDYNAMICS_CONTROLLER_HOST_NAME="" -e APPDYNAMICS_CONTROLLER_PORT="" -e APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY='' -e APPDYNAMICS_AGENT_ACCOUNT_NAME="" -e APPDYNAMICS_CONTROLLER_SSL_ENABLED="" -e APPDYNAMICS_DB_AGENT_NAME="DatabaseAgent" -e APPDYNAMICS_DB_PROPERTIES="-Ddbagent.telemetry.enabled=true" -d <image-name>
The environment variables specified in the preceding command are examples. You can set more environment variables as per your need. See Database Agent Configuration Properties for more details.
To add more properties to the APPDYNAMICS_DB_PROPERTIES parameter, add the property separated by a space.
For example:
APPDYNAMICS_DB_PROPERTIES: "-Ddbagent.telemetry.enabled=true -Dretry.on.auth.failure=false"
Deploy the Database Agent
Perform these steps to deploy the Database agent:
- Deploy the Database Agent in EKS Cluster
- Update the configMap
- Provide the Account Access Key as a Parameter
Deploy the Database Agent in EKS Cluster
Update the following fields in the yaml files:
| YAML File | Field |
|---|---|
accessKey.secret.yaml |
|
| dbagentProperties.configMap.yaml | APPDYNAMICS_CONTROLLER_HOST_NAME APPDYNAMICS_CONTROLLER_PORT APPDYNAMICS_CONTROLLER_SSL_ENABLED APPDYNAMICS_DB_AGENT_NAME APPDYNAMICS_AGENT_ACCOUNT_NAME |
| dbagent.deployment.yaml | spec.template.spec.containers.image |
Perform these steps to deploy the Database Agent:
Navigate to the
k8s-deploydirectory.Create the configMap for db-agent properties:
kubectl create -f dbagentProperties.configMap.yaml --save-configCODECreate the secret for account access-key:
kubectl create -f accessKey.secret.yaml --save-configCODECreate the logs configMap:
kubectl create -f logs.configmap.yaml --save-configCODECreate the deployment for db-agent:
kubectl create -f dbagent.deployment.yaml --save-configCODE
You can edit the selectors and labels in the deployment.yaml file if the labels overlap with existing deployments in your cluster.
Do not overlap the selectors or labels with other Controllers (including other Deployments and StatefulSets). Kubernetes do not stop you from overlapping. Hence, if multiple Controllers have overlapping selectors, then the Controllers might conflict and behave unexpectedly.
Update the configMap
- Change these configMap files used in the deployment:
appd-db-agent-propertiesappd-db-agent-log-config
Reapply the configMap:
kubectl apply appd-db-agent-propertiesCODEkubectl apply appd-db-agent-log-configCODERollout and restart the
db-agentdeployment:kubectl rollout restart deployment <deployment-name>CODE
Provide the Account Access Key as a Parameter
We recommend using a secret for the account access key.
By default, the db-agent deployment uses a secret for the account access key.
However, if you want to pass the account access key as a parameter, perform these steps:
Add the
APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEYproperty inappd-db-agent-propertiesconfigMap.Do not encode the property.
Reapply the
appd-db-agent-propertiesconfigMap.kubectl apply appd-db-agent-propertiesCODE- Comment out the
spec.template.spec.containers.envFrom.secretRefsection in thedbagent.deployment.yamlfile. Reapply the
db-agentdeployment:kubectl apply -f dbagent.deployment.yamlCODE