Docker エンジンでの PSA の設定

インストール zip ファイルに含まれている自動化スクリプトを使用して、Docker エンジンで PSA を設定できます。インストールコマンドを実行すると、スクリプトによって docker イメージが自動的に構築され、PSA が展開されます。

Supported Operating System

  • Linux(CentOS および Ubuntu)
  • Intel または M1 プロセッサを搭載した macOS
  • Windows

    注: 自動化スクリプトを使用した PSA のインストールは、Windows ではサポートされていません。Windows で PSA をインストールするには、次を参照してください。

    PSA の手動展開

次の表は、Kubernetes と Docker での PSA のインストールの違いを示しています。

Kubernetes Docker

Heimdall と Ignite は、Helm チャートを介して既存の Kubernetes クラスタにポッドとして展開されます。

Heimdall と Ignite はコンテナとして展開されます。

Heimdall は、Kube API を介して Web モニタリングと API モニタリングの測定ジョブポッドを作成します。 Heimdall は、Docker API を介して Web モニタリングと API モニタリングの測定ジョブコンテナを作成します。
測定の準備ができると、Heimdall は Kube API を介してジョブポッドを削除します。 測定の準備ができると、Heimdall は Docker API を介してジョブコンテナを削除します。

Download the PSA Installation Files

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.

(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 application-onprem.yaml file. Key-Value Pairs Configuration.

To bypass any domains from the proxy server, perform the following steps:

  1. Open the application-onprem.yaml file.
  2. Add the domain URLs in the noProxy proxyConfig :For example, proxyServer : "*Domain URLs that you specify in noProxy noProxy
    CODE
    proxyConfig:
    apiMonitoringAgent:
    enabled: true
    proxyServer: <proxy-server-address>
    browserMonitoringAgent:
    enabled: true
    proxyServer: <proxy-server-address>
    heimdall:
    enabled: true
    proxyServer: <proxy-server-address>
    noProxy:
    enabled: true
    proxyServer: "<specify the domain URLs that you want to bypass separated by comma>"

    For example, proxyServer: "*abc.com,*xyz1.com,*xyz2.com"

    Domain URLs that you specify in noProxy are not redirected to the proxy server. You can add any number of domains in the noProxy field. All other unspecified domain URLs are redirected to the proxy server.

Configure Proxy Server at a Job Level

You can configure a proxy server and a bypass list for a particular job. Any proxy server URL and bypass list configured at the agent level gets overridden by the proxy server URL and bypass list configured at the job level. Perform the following steps to configure a proxy server at the job level:
  1. Create or edit a Synthetic job.
  2. Select the Run a script option.
  3. Add the following details in the beginning the script:
    CODE
    '''yml
    jobLevelProxyConfig:
      proxyServer: "<proxy-server-address>"
      bypassProxyList: "<list of URLs that you want to bypass, separated by semi-colon>"
    '''
    Example:
    CODE
    '''yml
    jobLevelProxyConfig:
      proxyServer: "http://tinyproxy: tinyproxy.svc.cluster.local:8888"
      bypassProxyList: "*abc.com;*xyz1.com;*xyz2.com"
    '''
    
    pageUrl = "https://help.splunk.com/en"
    driver.get(pageUrl)
    assert "Splunk" in driver.title, "Title should contain Splunk"

Deploy PSA in Docker

  1. Unzip the PSA installation zip file.
  2. Run the following command to install PSA in a Docker engine:
    CODE
    ./install_psa -e docker -v -u <Shepherd-URL> -a <EUM-account> -k <EUM-key> -c <location-code> -d <location-description> -t <location-name> -s <location-state> -o <location-country> -i <location-latitude> -g <location-longitude> -p <PSA-tag> -r <heimdall-replica-count> -z <agent-type> -m <chrome-agent_min/max-memory> -n <API-agent_min/max-memory> -x <chrome-agent_min/max-CPU> -y <API-agent_min/max-CPU> -w <heimdall_proxy_server>~<web_monitoring_proxy_server>~<api_monitoring_proxy_server> -B <bypass-proxy-domains> -q <ignite-persistence> -C true -A <serviceaccount-name> -U <userID> -G <groupID> -N <run_as_a_non-root_user> -F <file_system_groupID> -O <override_the_security_context>
    A sample installation command looks like this :
    CODE
    ./install_psa -e docker -v -u <Shepherd-URL> -a <EUM-account> -k <EUM-key> -c DEL -d Delhi -t Delhi -s DEL -o India -i 28.70 -g 77.10 -p 23.5 -r 1 -z all -m 100Mi/500Mi -n 100Mi/100Mi -x 0.5/1.5 -y 0.1/0.1 -w http://testproxy-heimdall.net:3213~http://testproxy-chrome.net:3213~http://testproxy-api.net:3213 -B "www.test.com,*.appdynamics.com" -q true -C true -A serviceaccount-name -U 9001 -G 9001 -N true -F 9001 -O true
    The install_psa script can also read parameters from a configuration file, which makes it easier to manage complex installations. Use the following command if you want to install PSA using a .txt configuration file:
    CODE
    ./install_psa --config <path-to-config-file.txt>
    注:
    The installation package contains a sample configuration file named config.sample.txt. You can copy this file and edit the values. Any parameter values specified through command line flags will override the values specified in the text file:
    CODE
    ./install_psa --config production.txt -e kubernetes -r 5 -v
The following table describes the usage of the flags in the command. Asterisk (*) on the description denotes mandatory parameters.
Flag Configuration Key Description
-a EUM_ACCOUNT

*EUM Account

For example, Ati-23-2-saas-nov2

-A SERVICE_ACCOUNT Specify the service account of the sum-chrome-agent and sum-api-monitoring-agent pod.
-B BYPASS_LIST

Specify the domain URLs that you want to bypass from the proxy server.

For example, "*abc.com;*xyz1.com;*xyz2.com"

-c LOCATION_CODE

*Location Code

For example, DEL NY

-C CHROME_PERFORMANCE_LOGS Specify true to enable performance logs on the Chrome browser. The default value is false.
-d LOCATION_DESCRIPTION

*Location Description

For example, 'Delhi, 100001'

-e ENVIRONMENT

*Environment

For example, Docker, Minikube, or Kubernetes.

-F FS_GROUP Specify the file system group ID of the sum-chrome-agent or sum-api-monitoring-agent container.
-g LOCATION_LONGITUDE

Location Longitude

For example, 77.10

-G RUN_AS_GROUP Specify the group ID that the sum-chrome-agent or sum-api-monitoring-agent container should run as.
-i LOCATION_LATITUDE

Location Latitude

For example, 28.70

-k EUM_KEY

*EUM Key

For example, 2d35df4f-92f0-41a8-8709-db54eff7e56c

-m

First value: CHROME_MIN_MEMORY

Second value: CHROME_MAX_MEMORY

*Minimum/Maximum memory in Mi/Gi for sum-chrome-agent

-n

First value: API_MIN_MEMORY

Second value: API_MAX_MEMORY

*Minimum/Maximum memory in Mi/Gi for sum-api-monitoring-agent

-N RUN_AS_NON_ROOT Specify if the sum-chrome-agent or sum-api-monitoring-agent container should run as a non-root user. The default value is true.
-o LOCATION_COUNTRY

*Location Country

For example, India, United States

-O OVERRIDE_SECURITY_CONTEXT_FOR_WEB_API_MON Specify true to override the security context for Web and API monitoring. The default value is false.
-p TAG

*PSA release tag

For example, 23.12

-q IGNITE_PERSISTENCE Specify true or false to enable or disable Ignite Persistence.
-r HEIMDALL_REPLICA *Heimdall replica count
-s LOCATION_STATE

*Location State

For example, CA

-t LOCATION_CITY

*Location City

For example, Delhi

-u EUM_URL

*Shepherd URL

For example, https://sum-shadow-master-shepherd.saas.appd-test.com/

For the list of Shepherd URLs, See Shepherd URL.

-U RUN_AS_USER Specify the user ID that the sum-chrome-agent or sum-api-monitoring-agent container should run as.
-v VERBOSE Debug mode
-w

First value: HEIMDALL_PROXY

Second value: API_MON_PROXY

Third value: WEB_MON_PROXY

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.

-x

First value: CHROME_MIN_CPU

Second value: CHROME_MAX_CPU

*Minimum/Maximum CPU for sum-chrome-agent

-y

First value: API_MIN_CPU

Second value: API_MAX_CPU

*Minimum/Maximum CPU for sum-api-monitoring-agent

-z AGENT_TYPE

*Agent type

For example, web, api, or all

Monitor PSA

To monitor the CPU and memory usage of the Heimdall and Ignite containers, run the following command:

CODE
./monitoring_psa

PSA の手動展開

以下の手順を実行します。

  1. エージェント Docker イメージをプルします。
    CODE
    docker pull appdynamics/heimdall-psa
    docker pull appdynamics/chrome-agent-psa
    docker pull appdynamics/api-monitoring-agent-psa
  2. ./docker-psa/appdynamics に移動して、onprem.yaml ファイル内の次の詳細を更新します。
    • シェパード URL
    • EUM ログイン情報
    • 登録ロケーション
    • エージェントタグ

      以下は、onprem.yaml ファイルで編集する必要がある設定キーと値のペアです。

      Web Monitoring PSA:

      設定キー
      chromeAgent > image <agent-tag>
      shepherd > url Shepherd URL
      shepherd > credentials credentials
      shepherd > location agent location
      proxyConfig > enabled

      true

      このフィールドは、プロキシサーバーを使用している場合にのみ指定してください。Heimdall にも同じ変更を加えます。

      proxyConfig > proxyServer プロキシ サーバ URL(Proxy server URL)

      API Monitoring PSA:

      設定キー
      apiMonitoringAgent > image <agent-tag>
      shepherd > url Shepherd URL
      shepherd > credentials credentials
      shepherd > location agent location
      proxyConfig > enabled

      true

      このフィールドは、プロキシサーバーを使用している場合にのみ指定してください。Heimdall にも同じ変更を加えます。

      proxyConfig > proxyServer プロキシ サーバ URL(Proxy server URL)
  3. ./docker-psa docker-compose.yaml に移動します。
    設定キー
    heimdall > image <heimdall-tag>
  4. Docker の作成を実行します。
    CODE
    docker-compose up -d

Upgrade PSA

Perform the following steps to upgrade PSA:

  1. Download and unzip the PSA installation zip file.
    注: The upgrade_psa -h command displays the parameters that you can specify.
  2. Run the following command:
    CODE
    ./upgrade_psa -d -v <PSA-release-tag>
The following table describes the usage of the flags in the command. The asterisk (*) on the description denotes a mandatory parameter.
Flag Description
-d Debug mode
-v

*PSA release tag.

This is the version to which you are upgrading. For example, 23.9.0.

Uninstall PSA

To uninstall PSA, run the following commands:

Operating System Command
Linux and macOS
CODE
./uninstall_psa -e docker -p
Windows
  1. CODE
    docker ps -a
  2. CODE
    docker rm <heimdall-containerID>
    docker rm <ignite-containerID>