環境の準備

ハイブリッドデプロイメントをインストールする前に、仮想アプライアンスとオンプレミスコントローラ間の安全なシームレス コミュニケーションを確保して環境を準備します。次のセクションで説明するように、入力コントローラ、Splunk AppDynamics オンプレミス コントローラ、およびデータベースの証明書とキーを含む必要なすべてのアーティファクトを収集してコピーします。

これにより、仮想アプライアンスでは Splunk AppDynamics オンプレミス コントローラとの暗号化された通信チャネルが安全に接続、認証、および確立されて、信頼性の高い動作が実現します。

ハイブリッドデプロイメントの概要

3 ノードクラスタの作成

  1. プライマリノードコンソールにログインします。
  2. クラスタの各ノードのブートステータスを確認します。
    CODE
    appdctl show boot
    注:
    • 各ノードのサービスのステータスが [Success] と表示されていることを確認します。それ以外の場合は、失敗した仮想マシンを再起動します。それでも失敗する場合は、仮想マシンを再展開する必要があります。

    • すべてのクラスタノードで同じ時刻を設定してください。

    サンプル出力:

    CODE
    NAME             | STATUS    | ERROR
    ------------------+-----------+-------
     enable-time-sync | Succeeded | --
     firewall-setup   | Succeeded | --
     hostname         | Succeeded | --
     microk8s-setup   | Succeeded | --
     ssh-setup        | Succeeded | --
     storage-setup    | Succeeded | --
     cert-setup       | Succeeded | --
  3. プライマリノードで次のコマンドを実行し、ピアノードの IP アドレスを指定します。
    CODE
    cd /home/appduser
    appdctl cluster init <Node-2-IP> <Node-3-IP>
  4. ノードステータスを確認するには、次のコマンドを実行します。
    CODE
    appdctl show cluster
    microk8s status

    出力に、クラスタの一部であるノードの Running ステータスが true として表示されることを確認します。

    出力例

    CODE
    NODE           | ROLE  | RUNNING 
    ----------------+-------+---------
     10.0.0.1:19001 | voter | true    
     10.0.0.2:19001 | voter | true    
     10.0.0.3:19001 | voter | true
    注:
    • クラスター内で少なくとも 2 つのノードがアクティブであることを確認します。いずれか 2 つのノードが使用できなくなると、データが失われるリスクがあります。
    • 次のエラーが表示された場合は、端末に再ログインする必要があります。
      CODE
      Insufficient Permissions to Access Microk8

Configure DNS Entries

Verify DNS resolution for the Splunk AppDynamics components. The following script helps identify common network configuration issues that might cause communication issues in Virtual Appliance. It checks if specific host names can be resolved to IP addresses, which is crucial for the proper functioning of the Controller and its services.

Ensure that the globals.yaml.gotmpl contains the primary node IP address of Virtual Appliance. Edit the globals.yaml.gotmpl file as follows:
  1. Log into the console of the primary node.

  2. Navigate to the following folder:
    CODE
    cd /var/appd/config
  3. Edit the globals.yaml.gotmpl file and update dnsNames and dnsDomain.
    CODE
    vi globals.yaml.gotmpl

    List the Ingress domain names that you require to configure for the Virtual Appliance.

    注:
    • Include local host for appdcli to access the cluster. If the domain names are unavailable, specify <nodeip>.nip.io for each cluster. You must also include the dnsDomain as a value, in addition to other specified values.
    • Some network policies might block the IP address that contains x.x.x.x.nip.io. In such scenarios, update the /etc/hosts file. See, エアギャップ環境での DNS 設定の更新.
    • If you are using domain names for your Virtual Appliance, comment or delete the range split function. And, comment the localhost.
    JSON
    dnsNames: &dnsNames
    # - localhost
      - 10.0.0.1.nip.io
      - 10.0.0.2.nip.io
      - 10.0.0.3.nip.io
      - appd.example.com
    # If you are using Virtual IP address for your standalone Controller, comment or delete the range split function.
    {{ range split " " $internalIPs }} {{ printf " - %s.%s" . "nip.io" }}
    {{ end }}
  1. Save the following script on the console of your primary Virtual Appliance node as dnsinfo.sh in /var/appd/config.
    注: このスクリプトを初めて実行する場合は、プレーンな YAML のコードをコピーします。サービスのインストール後にこのスクリプトを実行する場合は、暗号化された YAML のコードをコピーします。
    Plain YAML
    CODE
    #!/bin/bash
    set -euo pipefail
    
    # Assuming /var/appd/config/secrets.yaml is now a plain, unencrypted YAML file.
    # The '.encrypted' extension and 'helm secrets decrypt' command are removed.
    TENANT=$(yq .hybrid.controller.tenantAccountName /var/appd/config/secrets.yaml)
    CONTROLLER_DNS_DOMAIN=$(grep -v "^ *\t* *{{" /var/appd/config/globals.yaml.gotmpl | yq -r '.hybrid.controller.domainName')
    DNS_DOMAIN=$(grep -v "^ *\t* *{{" /var/appd/config/globals.yaml.gotmpl | yq -r '.dnsDomain')
    echo Verify the Virtual Appliance tenant should be \'${TENANT}\'
    echo Verify the Virtual Appliance domain name should be \'${DNS_DOMAIN}\'
    echo Verify the Controller domain name should be \'${CONTROLLER_DNS_DOMAIN}\'
     
    echo
    for server_name in "$CONTROLLER_DNS_DOMAIN" "${DNS_DOMAIN}" "${TENANT}.${CONTROLLER_DNS_DOMAIN}" "${TENANT}-tnt-con.${DNS_DOMAIN}" "${TENANT}-tnt-con.${CONTROLLER_DNS_DOMAIN}"; do
      if ! getent hosts "${server_name}" > /dev/null; then
        echo "Please add DNS entry for ${server_name} for controller host IP, VA is not able to resolve it currently"
      fi
    done
    for server_name in "${TENANT}.auth.${DNS_DOMAIN}" "${TENANT}-tnt-authn.${DNS_DOMAIN}"; do
      if ! getent hosts "${server_name}" > /dev/null; then
        echo "Please double-check on standalone controller that DNS can resolve entry for ${server_name} as VA ingress IP"
      fi
    done
    Encrypted YAML
    CODE
    #!/bin/bash
    set -euo pipefail
    TENANT=$(helm secrets decrypt /var/appd/config/secrets.yaml.encrypted  | yq .hybrid.controller.tenantAccountName)
    CONTROLLER_DNS_DOMAIN=$(grep -v "^ *\t* *{{" /var/appd/config/globals.yaml.gotmpl | yq -r '.hybrid.controller.domainName')
    DNS_DOMAIN=$(grep -v "^ *\t* *{{" /var/appd/config/globals.yaml.gotmpl | yq -r '.dnsDomain')
    echo Verify the Virtual Appliance tenant should be \'${TENANT}\'
    echo Verify the Virtual Appliance domain name should be \'${DNS_DOMAIN}\'
    echo Verify the Controller domain name should be \'${CONTROLLER_DNS_DOMAIN}\'
     
    echo
    for server_name in "$CONTROLLER_DNS_DOMAIN" "${DNS_DOMAIN}" "${TENANT}.${CONTROLLER_DNS_DOMAIN}" "${TENANT}-tnt-con.${DNS_DOMAIN}" "${TENANT}-tnt-con.${CONTROLLER_DNS_DOMAIN}"; do
      if ! getent hosts "${server_name}" > /dev/null; then
        echo "Please add DNS entry for ${server_name} for controller host IP, VA is not able to resolve it currently"
      fi
    done
    for server_name in "${TENANT}.auth.${DNS_DOMAIN}" "${TENANT}-tnt-authn.${DNS_DOMAIN}"; do
      if ! getent hosts "${server_name}" > /dev/null; then
        echo "Please double-check on standalone controller that DNS can resolve entry for ${server_name} as VA ingress IP"
      fi
    done
  2. Run dnsinfo.sh.
    CODE
    bash ./dnsinfo.sh
    Sample Output:
    CODE
    Verify the Virtual Appliance tenant should be 'customer1'
    Verify the Virtual Appliance domain name should be 'va.mycompany.com'
    Verify the Controller domain name should be 'controller.mycompany.com'
    
    Please add DNS entry for controller.mycompany.com for controller host IP, VA is not able to resolve it currently
    Please add DNS entry for va.mycompany.com for controller host IP, VA is not able to resolve it currently
    Please add DNS entry for customer1.controller.mycompany.com for controller host IP, VA is not able to resolve it currently
    Please add DNS entry for customer1-tnt-con.va.mycompany.com for controller host IP, VA is not able to resolve it currently
    Please add DNS entry for customer1-tnt-con.controller.mycompany.com for controller host IP, VA is not able to resolve it currently
    Please double-check on standalone controller that DNS can resolve entry for customer1.auth.va.mycompany.com as VA ingress IP
    Please double-check on standalone controller that DNS can resolve entry for customer1-tnt-authn.va.mycompany.com as VA ingress IP

セルフモニタリング機能の有効化

仮想アプライアンスのセルフモニタリング機能を有効にできます。これを行うには、global.yaml.gotmpl ファイルで enableClusterAgent パラメータを true に編集します。

By default, this parameter is set to true. This setting helps you monitor the CPU, Memory, and Network usage of your cluster nodes. See View Container Details

To disable self-monitoring capabilities, set this parameter to false.
CODE
enableClusterAgent: false
注: After you enable or disable self-monitoring capabilities, you must restart the Virtual Appliance services to take effect.

Configure Ingress Certificates (Only for SSL Certificates)

By default, the Ingress controller is installed with a fully-configured self-signed certificate.
注: You may skip this step if the self-signed certificate provided by the Ingress Controller meets your requirements.

If you require a CA signed certificate for the Ingress Controller, configure an SSL/TLS certificate for Splunk AppDynamics 自己ホスト型仮想アプライアンス by providing all the required host names. This ensures that all components and user access points of the Virtual Appliance are securely accessible. The following script generates a list of Subject Alternative Names (SANs) that would be required for a custom ingress certificate in Virtual Appliance. This is crucial for securing communication with the Virtual Appliance using HTTPS.

Ensure that you have the following files:
  • private key: private.key
  • signed public key: cert.crt
  • CA root chain: ca.crt
注:
  • Ensure the ingess.key is in PEM plain text format.
  • The SAN of the server certificate in ingress.crt must include all the hostnames that are defined in the dnsNames section of the global.yaml.gotmpl file.
  • For Secure Application, ensure to include *.<DOMAIN-NAME> in the list and the certificates to include SAN aliases
Configure a custom ingress certificate if you want to include the CA signed certificate.
  1. Copy the Ingress key to the Virtual Appliance.
    CODE
    scp <ingress.pem> appduser@<node-IP-address>:/var/appd/config/ingress.key
  2. Copy the Ingress certificate to the Virtual Appliance.
    CODE
    scp <ingress.crt> appduser@<node-IP-address>:/var/appd/config/ingress.crt

スタンドアロンコントローラ TLS 証明書の更新

  1. すべての必要な SAN で新しいスタンドアロンコントローラ証明書を作成します。詳細は「コントローラ SSL と証明書」を参照してください。
    注: 仮想 IP アドレスを指定してロードバランサを使用する場合は、スタンドアロンコントローラではなくロードバランサから仮想アプライアンス(/var/appd/config)に SSL 証明書をコピーしてください。

    自己署名証明書には、追加した DNS エントリを含む、新しく作成された証明書をインポートします。

    PYTHON
    keytool -import -trustcacerts -alias s1as \
    -file <certificate.crt> \
    -keystore <ControllerInstallation>/platform/product/controller/appserver/jetty/etc/keystore.jks
  2. 仮想アプライアンスのプライマリノードにログインし、ノードのコンソールで /var/appd/configcerts.sh として次のスクリプトを保存します。
    注: このスクリプトを初めて実行する場合は、プレーンな YAML のコードをコピーします。サービスのインストール後にこのスクリプトを実行する場合は、暗号化された YAML のコードをコピーします。
    プレーン YAML
    JSON
    #!/bin/bash
    set -euo pipefail
    TENANT=$(yq .hybrid.controller.tenantAccountName /var/appd/config/secrets.yaml)
    DNS_DOMAIN=$(grep -v "^ *\t* *{{" /var/appd/config/globals.yaml.gotmpl | yq -r '.dnsDomain')
    DNS_NAMES=$(grep -v "^ *\t* *{{" /var/appd/config/globals.yaml.gotmpl | yq -r '.dnsNames|join(" ")')
    
    echo Verify the Virtual Appliance tenant should be \'${TENANT}\'
    echo Verify the Virtual Appliance domain name should be \'${DNS_DOMAIN}\'
    echo Verify the Virtual Appliance node names are: ${DNS_NAMES}
    
    echo If creating and importing into VA a Custom Ingress Certificate, include the following SANs:
    for server_name in "$DNS_DOMAIN" "${TENANT}.${DNS_DOMAIN}" "*.${DNS_DOMAIN}" "${TENANT}.auth.${DNS_DOMAIN}" "${TENANT}-tnt-authn.${DNS_DOMAIN}" $DNS_NAMES; do
            echo "  ${server_name}"
    done
    暗号化された YAML
    JSON
    #!/bin/bash
    set -euo pipefail
    TENANT=$(helm secrets decrypt /var/appd/config/secrets.yaml.encrypted  | yq .hybrid.controller.tenantAccountName)
    DNS_DOMAIN=$(grep -v "^ *\t* *{{" /var/appd/config/globals.yaml.gotmpl | yq -r '.dnsDomain')
    DNS_NAMES=$(grep -v "^ *\t* *{{" /var/appd/config/globals.yaml.gotmpl | yq -r '.dnsNames|join(" ")')
    echo Verify the Virtual Appliance tenant should be \'${TENANT}\'
    echo Verify the Virtual Appliance domain name should be \'${DNS_DOMAIN}\'
    echo Verify the Virtual Appliance node names are: ${DNS_NAMES}
    
    echo If creating and importing into VA a Custom Ingress Certificate, include the following SANs:
    for server_name in "$DNS_DOMAIN" "${TENANT}.${DNS_DOMAIN}" "*.${DNS_DOMAIN}" "${TENANT}.auth.${DNS_DOMAIN}" "${TENANT}-tnt-authn.${DNS_DOMAIN}" $DNS_NAMES; do
            echo "  ${server_name}"
    done
  3. certs.sh を実行して、欠落している SAN のリストを表示します。
    CODE
    bash ./certs.sh
    サンプル出力には、カスタム入力証明書で欠落している SAN が表示されています。
    CODE
    Verify the Virtual Appliance tenant should be 'customer1'
    Verify the Virtual Appliance domain name should be 'va.mycompany.com'
    Verify the Virtual Appliance node names are: localhost vanodename-1
    If creating and importing into VA a Custom Ingress Certificate, include the following SANs:
      va.mycompany.com
      customer1.va.mycompany.com
      *.va.mycompany.com
      customer1.auth.va.mycompany.com
      customer1-tnt-authn.va.mycompany.com
      localhost
      vanodename-1
    注: リスト内の localhost およびワイルドカードエントリは無視してかまいません。
  4. 必要なすべての SAN をコントローラに追加し、仮想アプライアンスにインポートするまで、この手順を繰り返します。
    注: コントローラを再起動するまで、変更は有効になりません。

仮想アプライアンスの証明書とキーの収集

仮想アプライアンスでは、セキュア通信を確立するために Splunk AppDynamics オンプレミス クラシックとそのデータベースからの証明書とキーが必要です。Kafka サービスに CA 署名付き証明書を使用する場合は、それらを仮想アプライアンスにコピーして、環境内で信頼できる接続とシームレスな運用を維持する必要があります。
スタンドアロンコントローラから仮想アプライアンスに SSL 証明書をコピーします。
  • コントローラ:証明書ファイルをエクスポートした場所に移動します。例:<AppD Home>/controller/appserver/jetty/etc/

    CODE
    scp hybrid-controller-ca.crt appduser@<node-IP-address>:/var/appd/config/hybrid-controller-ca.crt
    注: HTTPS 接続には hybrid-controller-ca.crt 証明書を使用します。
  • MySQL データベース:データベースの場所に移動します。たとえば、<AppD Home>/controller/db/data です。

    CODE
    scp ca.pem appduser@<node-IP-address>:/var/appd/config/hybrid-mysql-ca.crt
  • (任意)Kafka:Kafka の CA 証明書を生成する場合は、Kafka IP アドレスを指定します。これらの IP アドレスは、同じノード IP アドレスです。

    Kafka キーを仮想アプライアンスにコピーします。

    CODE
    scp <kafka.key> appduser@<node-IP-address>:/var/appd/config/hybrid-kafka.key

    Kafka 証明書を仮想アプライアンスにコピーします。

    CODE
    scp <kafka.crt> appduser@<node-IP-address>:/var/appd/config/hybrid-kafka.crt

次の手順を実行して、環境を準備します。

  1. appduser のログイン情報を使用して、プライマリノードのコンソールにログインします。ノードは、3 ノードクラスターを作成した後、プライマリノードと見なされます。
  2. 次のフォルダに移動します。
    CODE
    cd /var/appd/config
  3. 必要な設定で globals.yaml.gotmpl ファイルを編集します。詳細については、「globals.yaml.gotmpl」を参照してください。
    CODE
    vi globals.yaml.gotmpl

    仮想アプライアンスで、ネットワークアクセス、SSL 証明書を使用したセキュア通信、および設定済みデータベース接続が確立されていることを確認します。

    1. license.controllerKey にコントローラキーを入力します。
      注: コントローラキーを見つけるには、次の手順を実行します。
      1. Splunk AppDynamics オンプレミス クラシックコントローラ UI にログインします。
      2. Licenses > Account にアクセスします。
      3. [Access Key] で、[Show] をクリックしてコントローラキーをコピーします。

      Specify the license file that you require to apply on your Virtual Appliance.

      By default, the globals.yaml.gotmpl file has random UUIDs for controllerKey and eumKey. In case of Standard deployment, if you wish to generate new UUIDs for controllerkey and eumkey, run the gen-uuid.sh script from the helm charts folder (/home/appduser/appd-charts/utils).

      Specify the generated UUIDs in the license section for service and agent authorization.

      JSON
      license:
      	file: |
      {{ if isFile "/var/appd/config/license.lic" }}
      {{ readFile "/var/appd/config/license.lic" | indent 4 }}
      {{ end }}
      	controllerKey: <Controller Key>
      	eumKey: <EUM Key>
    2. appdController.tenantAccountName セクションでアカウント名を確認します。「appdController」を参照してください。
    3. hybrid セクションで、enable パラメータを true に設定します。
      Kafka サービスに CA 署名付き証明書を使用している場合は、必要な詳細情報で hybrid.kafka セクションを更新します。

      By default, this parameter is set to false.

      Enable this parameter to true to leverage your current Controller, Events Service, and End User Monitoring components from Splunk AppDynamics On-Premises while installing Anomaly Detection and Secure Application Services in your Kubernetes cluster.

      When set to true, the Controller and MySQL settings refer to an existing deployment of Controller.

      • Set the Controller domain name.
        注:
        • If you have set up the Virtual Appliance without a load-balancer or virtual IP address, the connection will not automatically switch to the active node during high-availability failover.

          Therefore, update the IP address, edit hybrid.controller.domainName and hybrid.mysql.dbhost in the global.yaml.gotmpl file after failover.

        • If you have set up the Virtual Appliance with a load-balancer (virtual IP address), enter the load-balancer's domain name and port in the hybrid.controller.domainName, hybrid.controller.port, and hybrid.mysql.dbhost sections of the global.yaml.gotmpl file.

          This domain name should resolve to the load-balancer's virtual IP address.

      • Configure the port to access the standalone Controller.
      • If the TLS is enabled in the Controller
        • Set the sslEnabled field to true .
        • Upload the Controller CA certificates for the standalone Controller in /var/appd/config/hybrid-controller-ca.crt if it is absent.
      • Configure the MySQL host. It is the same host as the Controller domain.
      • Configure a port for the standalone Controller database.
      • Enter the MySQL CA certificates that you copied from the On-Premises Classic deployment.
        注: Ensure that the filename is correct in hybrid.mysql.mysqlCaCertsFile parameter.
      • (Optional) Enter CA certificates for Kafka services.
        注:

        Ensure that the filename is correct in hybrid.kafka.certFile parameter.

        When you generate the CA certificates for Kafka, ensure to specify the Kafka IP addresses. These IP addresses are the same node IP addresses.

        Example IP Addresses:

        CODE
        ipAddresses:
        - 10.0.0.1
        - 10.0.0.2
        - 10.0.0.3
      JSON
      hybrid:
      	enable: false
      	controller:
      		domainName: controller.nip.io
      		port: 8181
      		sslEnabled: true
      {{ if isFile "/var/appd/config/hybrid-controller-ca.crt" }}
      	controllerCaCertsFile: {{ readFile "/var/appd/config/hybrid-controller-ca.crt" | b64enc | quote }}
      {{ end }}
      mysql:
      	dbHost: controller.nip.io
      	dbPort: 3388
      {{ if isFile "/var/appd/config/hybrid-mysql-ca.crt" }}
      	mysqlCaCertsFile: {{ readFile "/var/appd/config/hybrid-mysql-ca.crt" | b64enc | quote }}
      {{ end }}
      kafka:
      defaultCert: true
      {{ if isFile "/var/appd/config/hybrid-kafka.key" }}
      	keyFile: {{ readFile "/var/appd/config/hybrid-kafka.key" | b64enc | quote }}
      {{ end }}
      {{ if isFile "/var/appd/config/hybrid-kafka.crt" }}
      	certFile: {{ readFile "/var/appd/config/hybrid-kafka.crt" | b64enc | quote }}
      {{ end }}
      schemaregistry:
      	externalUrl: https://<domain_name>/schemaregistry
  4. secrets.yaml ファイルを編集して仮想アプライアンスでシークレットを設定します。詳細については、「secrets.yaml」を参照してください
    1. コントローラと MySQL のログイン情報を更新します。

      Provide the Controller and MySQL credentials.

      YAML
      hybrid:
      	controller:
      		controllerKey: <Controller-Key-Value>
      		tenantAccountName: customer1
      		rootUsername: root
      		rootPassword: welcome
      		rootAccountname: system
      		adminUsername: admin
      		adminPassword: welcome
      	mysql:
      		dbUser: secapp
      		dbPassword: changeit
    2. (任意)Splunk AppDynamics サービスのユーザー名とパスワードを編集します。
  5. スタンドアロンコントローラが Kubernetes クラスタの Kafka ポートにアクセスできるように、ファイアウォールルールを更新します。各クラスタノードのファイアウォールルールを更新します。
    CODE
    sudo ufw allow AppdNodePorts