Upgrade the Private Synthetic Agent

To upgrade the PSA, perform the following steps:

  1. Build the Docker Image
  2. (Optional) Add Custom Python Libraries
  3. Tag and Push Images to the Registry
  4. Update the Helm Chart
  5. Upgrade the PSA

Build the Docker Image

  1. Download the latest version of the PSA file from the Appdynamics Downloads Portal. This file contains Dockerfiles for sum-chrome-agent, sum-heimdall, and Helm charts used to install the agent and set up monitoring.
  2. Build image for sum-heimdall:

    To build an image for sum-chrome-agent and sum-heimdall, ensure that Docker is installed. If it is not installed, you can download and install Docker from here.

    1. Unzip the file to access the sum-heimdall directory. 
    2. Navigate to the sum-heimdall/k8s-PSA directory.

    3. Copy the service-jar file to the sum-heimdall/k8s-PSA directory and run the following command:

      docker build -f Dockerfile-PSA -t sum-heimdall:<heimdall-tag> .
      CODE

      You must build the images on the host with the same OS type of Kubernetes cluster nodes. For example, if you are pushing the image to AWS, then run the following command:

      docker buildx build -f Dockerfile-PSA --platform=linux/amd64 -t sum-heimdall:<heimdall-tag> .
      CODE

      You can use any value for <heimdall-tag> and <agent-tag>, but ensure that you use the same value in the subsequent steps.

Add Custom Python Libraries

This is an optional step. In addition to the available standard set of libraries, you can add custom Python libraries to the agent to use in scripted measurements. You build a new image based on the image you loaded as the base image.

  1. Create a Dockerfile and then create RUN directives to run python pip. For example, to install the library algorithms you can create a Dockerfile: 

    # Use the sum-chrome-agent image we just loaded as the base image
    FROM sum-chrome-agent:<agent-tag>
       
    # Install algorithm for python3 on top of that
    RUN python3 -m pip install algorithms==0.1.4
     
    # We can add more RUN directives for installing more libraries
    # RUN python3 -m pip install ...
    CODE

    You can create any number of RUN directives to install the required libraries.

  2. To build the new image, run the following commands:
    Web Monitoring PSA

    docker build -t sum-chrome-agent:<agent-tag> - < Dockerfile
    CODE

    API Monitoring PSA:

    docker build -f Dockerfile-PSA -t sum-api-monitoring-agent:<agent-tag> .
    CODE

    You must build the images on the host with the same OS type of Kubernetes cluster nodes. For example, if you are pushing the image to AWS, then run the following command:

    docker buildx build -f Dockerfile-PSA --platform=linux/amd64 -t sum-api-monitoring-agent:<api-tag> .
    CODE


    The newly built agent image contains the required libraries.

Tag and Push Images to the Registry

Managed Kubernetes services, such as EKS or AKS, provide container registries where you can push your image. No other configuration is needed. Kubernetes cluster within EKS or AKS will have the access to these images.

You must tag and push the images to a registry for the cluster to access them. You have to use the ACR_NAME environment variable while creating the cluster.

To tag the images, enter:

ACR_LOGIN_SERVER=$ACR_NAME.azurecr.io
docker tag sum-heimdall:<heimdall-tag> $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker tag sum-chrome-agent:<agent-tag> $ACR_LOGIN_SERVER/sum-chrome-agent:<agent-tag>
docker tag sum-api-monitoring-agent:<agent-tag> $ACR_LOGIN_SERVER/sum-api-monitoring-agent:<agent-tag>
CODE

To push the images, enter:

az acr login --name $ACR_NAME
docker push $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker push $ACR_LOGIN_SERVER/sum-chrome-agent:<agent-tag>
docker push $ACR_LOGIN_SERVER/sum-api-monitoring-agent:<agent-tag>
CODE

Update the Helm Chart

Follow these steps and update the configuration key-value pairs in the values.yaml file:

Upgrade the PSA

From PSA 23.12 onwards, you must deploy Ignite and Heimdall in a single namespace named measurement.

  1. Navigate to the new Linux distribution folder and run the following command:

    helm install synth ignite-psa.tgz --values values-ignite.yaml --namespace measurement
    CODE
  2. Wait until the status of Ignite pods changes to running. Then, run the following command:

    helm upgrade heimdall-onprem sum-psa-heimdall.tgz --values values.yaml --namespace measurement
    CODE


  3. After the status of the new Heimdall and Ignite pods changes to running, uninstall the old Ignite namespace:

    helm uninstall synth -n ignite
    CODE