Azure AKS での PSA の設定
次のように、Azure AKS での Web モニタリング PSA と API モニタリング PSA を設定します。既存の Kubernetes クラスタで PSA を設定する場合は、「Kubernetes クラスタの作成」セクションをスキップします。
| 手動展開 | 自動化スクリプトを使用した展開 |
|---|---|
- 自動化スクリプトを使用する場合は、Kubernetes クラスタとノードを手動で設定し、PSA を展開する前にコンテナレジストリにログインする必要があります。
- 別のレジストリを使用する場合は、PSA を展開する前に、自動化スクリプトでレジストリを指定します。
-
install_psa ファイルを開き、push_images_to_docker_registry() 関数に移動します。
- この関数の下で、${DOCKER_REGISTRY_URL}/ の後に、sum-chrome-agent、sum-api-monitoring-agent、および sum-heimdall のレジストリ名を指定します。
-
generate_psa_k8s_deployment()関数の下で、YAML 値のリポジトリ名を更新します。
-
- Kubernetes クラスタノードと同じ OS タイプのホストでイメージをビルドする必要があります。
Kubernetes クラスタの作成
Azure AKS で Kubernetes クラスタを作成するには、次の手順を実行します。
Access the Cluster
To access the Kubernetes cluster, follow theseinstructionsto 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:
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(オプション)カスタム Python ライブラリの追加
標準ライブラリセットに加えて、スクリプト測定用のカスタム Python ライブラリをエージェントに追加できます。カスタム Python ライブラリを追加するには、ダウンロードしたベースイメージを使用してイメージをビルドします。
イメージのタグ付けとレジストリへのプッシュ
クラスタがアクセスできるように、イメージにタグを付けてレジストリにプッシュする必要があります。クラスタの作成時に ACR_NAME 環境変数を使用する必要があります。
イメージにタグを付けるには、次のように入力します。
Web モニタリング PSA:
ACR_LOGIN_SERVER=$ACR_NAME.azurecr.io
docker tag appdynamics/heimdall-psa:<heimdall-tag> $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker tag appdynamics/chrome-agent-psa:<agent-tag> $ACR_LOGIN_SERVER/sum-chrome-agent:<agent-tag>API モニタリング PSA:
ACR_LOGIN_SERVER=$ACR_NAME.azurecr.io
docker tag appdynamics/heimdall-psa:<heimdall-tag> $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker tag appdynamics/api-monitoring-agent-psa:<agent-tag> $ACR_LOGIN_SERVER/sum-api-monitoring-agent:<agent-tag>イメージをプッシュするには、次のように入力します。
Web モニタリング PSA:
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>API モニタリング PSA:
az acr login --name $ACR_NAME
docker push $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker push $ACR_LOGIN_SERVER/sum-api-monitoring-agent:<agent-tag>Web モニタリング PSA と API モニタリング PSA を展開します。
イメージがレジストリに登録されると、アプリケーションはクラスタに展開されます。Helm チャートを使用して、必要な順序ですべての Kubernetes リソースを展開および作成します。
自動化スクリプトを使用した AKS での PSA の展開
Splunk AppDynamicsPSA インストール zip ファイルを、Cisco AppDynamics ダウンロードセンターまたはベータアップロードツールからダウンロードします。このファイルには、sum-chrome-agent、sum-api-monitoring-agent、sum-heimdall、Helm チャート、および自動化スクリプトの Docker ファイルが含まれています。sum-chrome-agent、sum-api-monitoring-agent、および sum-heimdall のイメージをビルドする場合は、Docker がインストールされていることを確認します。インストールされていない場合は、ここから Docker をダウンロードしてインストールできます。
以下の手順を実行して、PSA をインストールします。
| フラグ | 説明 |
|---|---|
| -e |
*環境 たとえば、Docker、Minikube、または Kubernetes などです。 |
| -l | Minkube 環境にイメージをロードします。 |
| -v | デバッグモード |
| -u |
*シェパード URL たとえば、https://sum-shadow-master-shepherd.saas.appd-test.com/ シェパード URL のリストについては、「シェパード URL」を参照してください。 |
| -a |
*EUM アカウント たとえば、ti-23-2-saas-nov2 |
| -k |
*EUM キー たとえば、2d35df4f-92f0-41a8-8709-db54eff7e56c |
| -c |
*ロケーションコード たとえば、デリーの場合は DEL、ニューヨークの場合は NY |
| -d |
*ロケーションの説明 たとえば、'Delhi, 100001' |
| -t |
*ロケーションの都市 たとえば、Delhi |
| -s |
*ロケーションの州 たとえば、カリフォルニアの場合は CA |
| -o |
*ロケーションの国 たとえば、India、United States |
| -i |
ロケーションの緯度 たとえば、デリーの場合は 28.70 |
| -g |
ロケーションの経度 たとえば、デリーの場合は 77.10 |
| -p |
*PSA リリースタグ たとえば、23.5 |
| -r | *Heimdall レプリカ数 |
| -z |
*エージェントタイプ たとえば、web、api、または all |
|
-m | *sum-chrome-agent の最小/最大メモリ(Mi/Gi 単位) |
| -n | *sum-api-monitoring-agent の最小/最大メモリ(Mi/Gi 単位) |
| -x | *sum-chrome-agent の最小/最大 CPU |
| -y | *sum-api-monitoring-agent の最小/最大 CPU |
| -b | *sum-heimdall の最小/最大メモリ(Mi/Gi 単位) |
| -f | *sum-heimdall の最小/最大 CPU |
| -q | true または false を指定して、Ignite Persistence を有効または無効にします。 |
| -w |
Heimdall、API、および Web モニタリング用のプロキシ サーバーをチルダ(~)で区切って指定します。 プロキシサーバーを設定する必要がない場合は、空白のままにすることができます。 |
| -B |
プロキシサーバーからバイパスするドメイン URL を指定します。 例:"*abc.com;*xyz1.com;*xyz2.com". |
| -C | Chrome ブラウザでのパフォーマンスログを有効にするには true を指定します。デフォルト値は false です。 |
Kubernetes クラスタのモニタリング
sum-psa-monitoring.tgz により、モニタリングスタックがインストールされます。この Helm チャートは、Private Simple Synthetic Agent をモニタするためのカスタム Grafana ダッシュボードとともに kube-prometheus-stack をインストールします。Install the Monitoring Stack
Uninstall PSA
To uninstall PSA, run the following command:
./uninstall_psa -e kubernetes -p
Upgrade PSA in Azure AKS
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-psaAdd 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:
docker build -t sum-chrome-agent:<agent-tag> - < DockerfileAPI Monitoring PSA:
docker build -f Dockerfile-PSA -t sum-api-monitoring-agent:<agent-tag> .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> .The newly built agent image contains the required libraries.
Tag and Push Images to the Registry
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>
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>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