Red Hat OpenShift での PSA の設定
OpenShift で Web モニタリング PSA および API モニタリング PSA を展開するには、Amazon EKS または Azure AKS で OpenShift クラスタを作成する必要があります。次のいずれかの方法で PSA を設定できます。
| 手動展開 | 自動化スクリプトを使用した展開 |
|---|---|
(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:
Docker イメージのプル
DockerHub から sum-chrome-agent、sum-api-monitoring-agent、sum- heimdall の既成の Docker イメージをプルします。既成イメージには依存ライブラリが含まれているため、インターネットにアクセスできない場合でもこれらのイメージを使用できます。
docker pull appdynamics/heimdall-psa
docker pull appdynamics/chrome-agent-psa
docker pull appdynamics/api-monitoring-agent-psaまたは、Splunk AppDynamics Download Center から .tar ファイルをダウンロードすることもできます。このファイルには、sum-chrome-agent、sum-api-monitoring-agent、sum-heimdall、ignite、および依存ライブラリの事前ビルド済み Docker イメージが含まれています。したがって、インターネットや DockerHub にアクセスできない場合にこれらのイメージを使用できます。
.tar ファイルを解凍し、次のコマンドを使用してイメージをロードします。- 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.tardocker 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.
イメージにタグを付け、レジストリにプッシュします。
クラスタがアクセスできるように、イメージにタグを付けてレジストリにプッシュする必要があります。Amazon EKS クラスタは、AWS が提供するマネージドレジストリである Elastic Container Registry(ECR)からイメージをプルします。
イメージにタグを付けるには、次のように入力します。
Web モニタリング PSA:
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>API モニタリング PSA:
docker tag sum-heimdall:<heimdall-tag> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-heimdall:<heimdall-tag> docker tag sum-api-monitoring-agent:<agent-tag> <aws_account_id>.dkr.ecr.<region>.amazonaws.com/sum/sum-api-monitoring-agent:<agent-tag>と をアカウント ID とリージョンの値に置き換える必要があります。
リポジトリを作成するには、次のように入力します。
Web モニタリング PSA:
aws ecr create-repository --repository-name sum/sum-heimdall aws ecr create-repository --repository-name sum/sum-chrome-agentAPI モニタリング PSA:
aws ecr create-repository --repository-name sum/sum-heimdall aws ecr create-repository --repository-name sum/sum-api-monitoring-agentイメージをプッシュするには、次のように入力します。
Web モニタリング PSA:
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>API モニタリング PSA:
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-api-monitoring-agent:<agent-tag>OpenShift での PSA の手動展開
イメージがレジストリに登録されると、アプリケーションはクラスタに展開されます。Helm チャートを使用して、必要な順序ですべての Kubernetes リソースを展開および作成します。
自動化スクリプトを使用した OpenShift での PSA の展開
PSA インストールスクリプトを実行する前に、次の手順を実行します。
- OpenShift クラスタを作成し、Kubeconfig でクラスタ を設定します。
- イメージレジストリにログインします。
- パッケージ v6.01 をダウンロードします。
以下の手順を実行して、PSA をインストールします。
Troubleshoot
You may encounter certain issues if the pod configurations are incorrect. The following table lists the issues and the steps you can follow to resolve them:
| Issue | Resolution |
|---|---|
|
PodSecurity violation due to SeccompProfile configuration. Warning Message
|
Perform the following steps:
|
The runAsUser value is outside the allowed range. Warning Message |
Modify the runAsUser value to the appropriate range:
|
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 openshift -p
Upgrade PSA in Red Hat OpenShift
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
RUNdirectives to runpythonpip. For example, to install the libraryalgorithmsyou 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-packagesNote: 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-Openshift -t sum-api-monitoring-agent:<agent-tag> .
The newly built agent image contains the required libraries.docker buildx build -f Dockerfile-PSA-Openshift --platform=linux/amd64 -t sum-api-monitoring-agent:<api-tag> .
You must tag and push the images to a registry for the cluster to access them. The Amazon EKS clusters pull the images from the 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 values.yaml 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