Install the Database Agent container image as follows:

  1. Obtain the Database Agent Container Image
  2. Deploy the Database Agent

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

  1. Download the Database Agent zip file from the Download portal.
  2. Unzip the Database Agent zip file.
  3. 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

  1. Pull the latest Database Agent container image from the Docker hub:

    docker pull appdynamics/db-agent:latest
    CODE
  2. (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>
CODE

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"
CODE

Deploy the Database Agent

Perform these steps to deploy the Database agent:

  1. Deploy the Database Agent in EKS Cluster
  2. Update the configMap
  3. Provide the Account Access Key as a Parameter

Deploy the Database Agent in EKS Cluster

Update the following fields in the yaml files:

YAML FileField

accessKey.secret.yaml

APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY

dbagentProperties.configMap.yamlAPPDYNAMICS_CONTROLLER_HOST_NAME
APPDYNAMICS_CONTROLLER_PORT
APPDYNAMICS_CONTROLLER_SSL_ENABLED
APPDYNAMICS_DB_AGENT_NAME
APPDYNAMICS_AGENT_ACCOUNT_NAME
dbagent.deployment.yamlspec.template.spec.containers.image

Perform these steps to deploy the Database Agent:

  1. Navigate to the k8s-deploy directory. 

  2. Create the configMap for db-agent properties:

    kubectl create -f dbagentProperties.configMap.yaml --save-config
    CODE
  3. Create the secret for account access-key:

    kubectl create -f accessKey.secret.yaml --save-config
    CODE
  4. Create the logs configMap:

    kubectl create -f logs.configmap.yaml --save-config
    CODE
  5. Create the deployment for db-agent:

    kubectl create -f dbagent.deployment.yaml --save-config
    CODE

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

  1. Change these configMap files used in the deployment:
    • appd-db-agent-properties
    • appd-db-agent-log-config
  2. Reapply the configMap:

    kubectl apply appd-db-agent-properties
    CODE
    kubectl apply appd-db-agent-log-config
    CODE
  3. Rollout and restart the db-agent deployment:

    kubectl rollout restart deployment <deployment-name>
    CODE

Provide the Account Access Key as a Parameter

AppDynamics recommends 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:

  1. Add the APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY property in appd-db-agent-properties configMap.

    Do not encode the property.

  2. Reapply the appd-db-agent-properties configMap.

    kubectl apply appd-db-agent-properties
    CODE
  3. Comment out the spec.template.spec.containers.envFrom.secretRef section in the dbagent.deployment.yaml file.
  4. Reapply the db-agent deployment:

    kubectl apply -f dbagent.deployment.yaml
    CODE