Download PDF
Download page Upgrade Private Synthetic Agent in Amazon Elastic Kubernetes Service.
Upgrade Private Synthetic Agent in Amazon Elastic Kubernetes Service
Upgrade the Private Synthetic Agent
To upgrade the PSA, perform the following steps:
- Build the Docker Image
- (Optional) Add Custom Python Libraries
- Tag and Push Images to the Registry
- Update the Helm Chart
- Upgrade the PSA
Build the Docker Image
- 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.
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.
- Unzip the file to access the
sum-heimdall
directory. Navigate to the directory and run the following command:
docker build -f Dockerfile-PSA -t sum-heimdall:<heimdall-tag> .
CODEYou can use any value for
<heimdall-tag>
and<agent-tag>
, but ensure that you use the same value in the subsequent steps.
- Unzip the file to access the
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.
Create a Dockerfile and then create
RUN
directives to runpython
pip
. For example, to install the libraryalgorithms
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 ...
CODEYou can create any number of
RUN
directives to install the required libraries.To build the new image, enter:
docker build -t sum-chrome-agent:<agent-tag> - < Dockerfile
CODEThe 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. The Amazon EKS clusters pull the images from Elastic Container Registry (ECR), which is the managed registry provided by AWS.
Since the Vanilla K8S runs on AWS infrastructure, Kubernetes Operations (kops) creates and assigns appropriate roles to the cluster nodes and they can directly access the ECR. You do not need any other configuration. Hence, the process is the same for both EKS and Vanilla K8S using EC2.
To tag the images, enter:
docker tag sum-heimdall:<heimdall-tag> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-heimdall:<heimdall-tag>
docker tag sum-chrome-agent:<agent-tag> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-chrome-agent:<agent-tag>
You need to replace <aws_account_id>
& <region>
with your account id and region values.
To create repositories, enter:
aws ecr create-repository --repository-name sum/sum-heimdall
aws ecr create-repository --repository-name sum/sum-chrome-agent
To push the images, enter:
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin <aws_account_id>.dkr.ecr.<region>.amazonaws.com
docker push <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-heimdall:<heimdall-tag>
docker push <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-chrome-agent:<agent-tag>
Update the Helm Chart
Follow these steps and update the configuration key value pairs in the values.yaml
file:
Upgrade the PSA
Navigate to the new Linux distribution folder and run this command:
helm upgrade heimdall-onprem sum-psa-heimdall.tgz --values values.yaml --namespace measurement