Set up PSA in Minikube
- Minikube is installed in a single machine. Hence, it is not scalable or highly available when you set up PSA in Minikube.
- Functionality-wise, there is no difference between PSA in Minikube and PSA in AKS, EKS, or any other Kubernetes cluster.
Set up the Web Monitoring PSA and API Monitoring PSA in Minikube 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 |
|---|---|
|
|
Kubernetes クラスタの作成
Minikube で Kubernetes クラスタを作成するには、次の手順を実行します。
Kubernetes クラスタにアクセスするには、次の手順に従って、クラスタとの対話型ユーティリティである kubectl をインストールします。
クラスタが実行されていることを確認するには、次のように入力します。
kubectl get nodes
(オプション)プロキシサーバーの設定
プロキシサーバーを設定すると、すべてのドメインに適用されます。values.yaml ファイルにプロキシサーバーアドレスを指定して、プロキシサーバーを設定します。「キーと値のペアの設定」を参照してください。
プロキシサーバーからドメインをバイパスするには、次の手順を実行します。
Configure Proxy Server at a Job Level
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.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
```(オプション)カスタム Python ライブラリの追加
使用可能な標準ライブラリセットに加えて、スクリプト測定で使用するカスタム Python ライブラリをエージェントに追加できます。ベースイメージとしてロードしたイメージに基づいて新しいイメージをビルドします。
-
Dockerfile を作成し、Python pip を実行する
RUNディレクティブを作成します。たとえば、algorithmsライブラリをインストールするには、次のように 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注: 任意の数の ディレクティブを作成して、必要なライブラリをインストールできます。 -
新しいイメージをビルドするには、次のように入力します。
新しくビルドされたエージェントイメージには、必要なライブラリが含まれています。docker build -t sum-chrome-agent:<agent-tag> - < Dockerfile
Minikube の Docker デーモンへのイメージの保存
クラスタがアクセスできるように、イメージにタグを付けてレジストリにプッシュする必要があります。Minikube の Docker にイメージを保存するには、次のコマンドを実行します。
docker save appdynamics/heimdall-psa:<heimdall-tag> | (eval $(minikube docker-env) && docker load)
docker save appdynamics/chrome-agent-psa:<agent-tag> | (eval $(minikube docker-env) && docker load)
docker save appdynamics/heimdall-psa:<heimdall-tag> | (eval $(minikube docker-env) && docker load)
docker save appdynamics/api-monitoring-agent-psa:<agent-tag> | (eval $(minikube docker-env) && docker load)
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. |
| -j | Ingress and egress bandwidth value for the API monitoring pod. |
| -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. |
Kubernetes クラスタのモニタリング
カスタムの Grafana ダッシュボードと共に、Helm チャート sum-psa-monitoring.tgz kube-prometheus-stackを使用して、Private Simple Synthetic Agent を監視します。
モニタリングスタックのインストール
-
別の
monitoring名前空間を作成するには、次のように入力します。
設定オプションを確認するには、次のように入力します。kubectl create namespace monitoring
これにより、すべての設定オプションを含むhelm show values sum-psa-monitoring.tgz > values-monitoring.yamlvalues-monitoring.yamlファイルが生成されます。Helm チャートのインストール中に生成されたvalues-monitoring.yamlファイルを変更して渡すには、次のように入力します。helm install psa-monitoring sum-psa-monitoring.tgz --values values-monitoring.yaml --namespace monitoring -
モニタリングスタックをインストールした後、(クラスタ内で実行される)Grafana を起動してダッシュボードを表示できます。クラスタの外部から Grafana にアクセスするには、ポートフォワーディングを設定するか、Ingress を設定します。ローカルにアクセスするようにポートフォワーディングを設定するには、次のように入力します。
kubectl port-forward svc/psa-monitoring-grafana 3000:80 --namespace monitoring -
ブラウザから localhost:3000 を起動し、デフォルトのログイン情報(ユーザー名:
admin、パスワード:prom-operator)を使用してログインします。Private Simple Synthetic Agent という名前のダッシュボードに、Kubernetes クラスタ、Apache Ignite、Heimdall、および実行中の測定に関する詳細が表示されます。
PSA のアンインストール
PSA をアンインストールするには、次のコマンドを実行します。
./uninstall_psa -e -p -m
次の表では、コマンドでのフラグの使用について説明します。
| フラグ | 説明 |
|---|---|
| -e |
環境 たとえば、Docker、Minikube、または Kubernetes などです。 |
| -p | PSA のみをアンインストールします。 |
| -m | PSA と Minikube をアンインストールします。 |
Minikube での PSA のアップグレード
プライベート合成エージェントのアップグレード
PSA をアップグレードするには、次の手順を実行します。
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, enter: Web Monitoring PSA:
The newly built agent image contains the required libraries. API Monitoring PSA:docker build -t sum-chrome-agent:<agent-tag> - < Dockerfile
The newly built agent image contains the required libraries.docker build -f Dockerfile-PSA -t sum-api-monitoring-agent:<monitoring-tag> .
Tag and Push Images to the Registry
To tag the images, enter:
docker save sum-heimdall:<heimdall-tag> | (eval $(minikube docker-env) && docker load)
docker save sum-chrome-agent:<agent-tag> | (eval $(minikube docker-env) && docker load)
docker save sum-api-monitoring-agent:<agent-tag> | (eval $(minikube docker-env) && docker load)
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