Set up PSA in Amazon EKS
Set up the Web Monitoring PSA and API Monitoring PSA in Amazon Elastic Kubernetes Service (Amazon EKS) as follows. If you want to set up PSA in an existing Kubernetes cluster, skip the Create the Kubernetes Cluster section.
Deploy Manually | Deploy Using the Automation Script |
---|---|
|
|
- If you use the automated script, you must manually set up the Kubernetes cluster and nodes and log in to container registries before deploying PSA.
- If you use a separate registry, specify the registry in the automated script before deploying PSA:
-
Open the
install_psa
file and go to thepush_images_to_docker_registry()
function. - Under that function, after ${DOCKER_REGISTRY_URL}/, specify the registry names of
sum-chrome-agent
,sum-api-monitoring-agent,
andsum-heimdall.
-
Under the
generate_psa_k8s_deployment()
function, update the repository names on the YAML values.
-
- You must build the images on the host with the same OS type of Kubernetes cluster nodes.
Create the Kubernetes Cluster
To create a Kubernetes cluster in Amazon EKS:
Access the Cluster
To access the Kubernetes cluster, follow these instructions to install kubectl, a utility to interact with the cluster.
To verify that the cluster is running, enter:
kubectl get nodes
(Optional) Configure Proxy Server
When you configure a proxy server, it applies to all the domains. Configure a proxy server by specifying the proxy server address on the values.yaml
file. See Key-Value Pairs Configuration.
To bypass any domains from the proxy server, perform the following steps:
Pull the Docker Image
Pull the pre-built docker images for sum-chrome-agent, sum-api-monitoring-agent, and sum-heimdall from DockerHub. The pre-built images include the dependent libraries, so you can use these images even when you do not have access to the Internet.
Run the following commands to pull the agent images:
docker pull appdynamics/heimdall-psa
docker pull appdynamics/chrome-agent-psa
docker pull appdynamics/api-monitoring-agent-psa
Alternatively, you can also download the .tar
file from the Splunk AppDynamics Download Center. This file includes pre-built docker images for sum-chrome-agent, sum-api-monitoring-agent, sum-heimdall, ignite, and the dependent libraries. So, you can use these images when you do not have access to the Internet and DockerHub.
.tar
file and load the images using the following commands:-
sum-chrome-agent:
docker load < ${webAgentTag}
-
sum-api-monitoring-agent:
docker load < ${apiAgentTag}
-
sum-heimdall:
docker load < ${heimdallTag}
-
ignite:
docker load < ${igniteTag}
# Load all Docker images
docker load -i heimdall-25.7.3098.tar
docker load -i api-monitoring-agent-1.0-415.tar
docker load -i chrome-agent-1.0-1067.tar
docker load -i ignite-2.16.0-jdk11.tar
docker images | grep -E "(heimdall|api-monitoring|chrome-agent|ignite)"
```
829771730735.dkr.ecr.us-west-2.amazonaws.com/sum/heimdall 25.7.3098 abc123def456 2 hours ago 500MB
829771730735.dkr.ecr.us-west-2.amazonaws.com/sum/api-monitoring-agent 1.0-415 def456ghi789 2 hours ago 300MB
829771730735.dkr.ecr.us-west-2.amazonaws.com/sum/chrome-agent 1.0-1067 ghi789jkl012 2 hours ago 800MB
apacheignite/ignite 2.16.0 jkl012mno345 2 hours ago 400MB
```
(Optional) Add Custom Python Libraries
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.
Tag and Push Images to the Registry
You must tag and push the images to a registry for the cluster to access it. The Amazon EKS clusters pull the images from Elastic Container Registry (ECR), which is the managed registry provided by AWS.
Tag the Images
docker tag appdynamics/heimdall-psa:<heimdall-tag> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-heimdall:<heimdall-tag>
docker tag appdynamics/chrome-agent-psa:<agent-tag> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-chrome-agent:<agent-tag>
docker tag appdynamics/api-monitoring-agent-psa:<agent-tag> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-api-monitoring-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
Push the Images
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>
docker push <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-api-monitoring-agent:<agent-tag>
Deploy PSA Manually
The application is deployed to the cluster after the images are in the Registry. You use the Helm chart to deploy and create all Kubernetes resources in the required order.
Deploy PSA Using the Automation Script
Download the PSA installation zip file from the Splunk AppDynamics Download Center or from the beta upload tool. This file contains Docker files for sum-chrome-agent, sum-api-monitoring-agent, sum-heimdall, Helm charts, and automation scripts. To build an image for sum-chrome-agent, sum-api-monitoring-agent, and sum-heimdall, ensure that Docker is installed. You can download and install Docker from here if it is not installed.
Perform the following steps to install PSA:
Flag | Description |
---|---|
-e |
*Environment For example, Docker, Minikube, or Kubernetes. |
-l | Load images to the Minkube environment |
-v | Debug mode |
-u |
*Shepherd URL For example, https://sum-shadow-master-shepherd.saas.appd-test.com/ For the list of Shepherd URLs, see Shepherd URL. |
-a |
*EUM Account For example, Ati-23-2-saas-nov2 |
-k |
*EUM Key For example, 2d35df4f-92f0-41a8-8709-db54eff7e56c |
-c |
*Location Code For example, DEL NY |
-d |
*Location Description For example, 'Delhi, 100001' |
-t |
*Location City For example, Delhi |
-s |
*Location State For example, CA |
-o |
*Location Country For example, India, United States |
-i |
Location Latitude For example, 28.70 |
-g |
Location Longitude For example, 77.10 |
-p |
*PSA release tag For example, 23.12 |
-r | *Heimdall replica count |
-z |
*Agent type For example, web, api, or all |
-m | *Minimum/Maximum memory in Mi/Gi for sum-chrome-agent
|
-n | *Minimum/Maximum memory in Mi/Gi for sum-api-monitoring-agent
|
-x | *Minimum/Maximum CPU for sum-chrome-agent
|
-y | *Minimum/Maximum CPU for sum-api-monitoring-agent
|
-b | *Minimum/Maximum memory in Mi/Gi for sum-heimdall
|
-f | *Minimum/Maximum CPU for sum-heimdall
|
-q | Specify true or false to enable or disable Ignite Persistence. |
-w |
Specify the proxy servers for Heimdall, API, and Web monitoring, separated by a tilde(~). If you do not need to set up any proxy server, you can leave it blank. |
-B |
Specify the domain URLs that you want to bypass from the proxy server. For example, "*abc.com;*xyz1.com;*xyz2.com" |
-C | Specify true to enable performance logs on the Chrome browser. The default value is false . |
-A | Specify the service account of the sum-chrome-agent and sum-api-monitoring-agent pod. |
-U | Specify the user ID that the sum-chrome-agent or sum-api-monitoring-agent container should run as. |
-G | Specify the group ID that the sum-chrome-agent or sum-api-monitoring-agent container should run as. |
-N | Specify if the sum-chrome-agent or sum-api-monitoring-agent container should run as a non-root user. The default value is true . |
-F | Specify the file system group ID of the sum-chrome-agent or sum-api-monitoring-agent container. |
-O | Specify true to override the security context for Web and API monitoring. The default value is false . |
Monitor the Kubernetes Cluster
The Helm chart sum-psa-monitoring.tgz in the zip you downloaded installs the monitoring stack. This Helm chart installs kube-prometheus-stack along with a custom Grafana dashboard to monitor the Private Simple Synthetic Agent.
Install the Monitoring Stack
Uninstall PSA
To uninstall PSA, run the following command:
./uninstall_psa -e kubernetes -p
Upgrade PSA in Amazon Elastic Kubernetes Service
Upgrade the Private Synthetic Agent
To upgrade the PSA, perform the following steps:
Pull the Docker Image
Pull the pre-built docker images for sum-chrome-agent, sum-api-monitoring-agent, and sum-heimdall from DockerHub. The pre-built images include the dependent libraries, so you can use these images even when you do not have access to the Internet.
Run the following commands to pull the agent images:
docker pull appdynamics/heimdall-psa
docker pull appdynamics/chrome-agent-psa
docker pull appdynamics/api-monitoring-agent-psa
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 you just loaded as the base image FROM appdynamics/chrome-agent-psa:<agent-tag> USER root RUN apk add py3-pip USER appdynamics # Install algorithm for python3 on top of that RUN python3 -m pip install algorithms==0.1.4 --break-system-packages
Note: You can create any number of RUN directives to install the required libraries. -
To build the new image, run the following commands: Web Monitoring PSA:
API Monitoring PSA:docker build -t sum-chrome-agent:<agent-tag> - < Dockerfile
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 build -f Dockerfile-PSA -t sum-api-monitoring-agent:<agent-tag> .
The newly built agent image contains the required libraries.docker buildx build -f Dockerfile-PSA --platform=linux/amd64 -t sum-api-monitoring-agent:<api-tag> .
Tag and Push Images to the Registry
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>
docker tag sum-api-monitoring-agent:<agent-tag> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-api-monitoring-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
aws ecr create-repository --repository-name sum/sum-api-monitoring-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>
docker push <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-api-monitoring-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 the following command:
helm install synth ignite-psa.tgz --values values-ignite.yaml --namespace measurement
-
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
-
After the status of the new Heimdall and Ignite pods changes to
running
, uninstall the old Ignite namespace:helm uninstall synth -n ignite