クラスタ エージェント コンテナ イメージの作成

このページでは、カスタム クラスタ エージェント コンテナ イメージを作成する方法、または公式にリリースされている事前作成されたイメージを使用して内部レジストリに保存する方法について説明します。

この手順は、次の場合に必須です。

  • カスタム クラスタ エージェント コンテナ イメージを作成する必要がある
  • DockerHub または RedHat Container Registry からの事前作成されたクラスタ エージェント イメージを使用して、内部レジストリに保存する必要がある。

それ以外の場合は、 または Helm ファイルの Splunk AppDynamics DockerHub リポジトリまたは Splunk AppDynamics RedHat Registry にある事前作成されたクラスタ エージェント コンテナ イメージを直接プルして使用できます。

この例では、DockerHub にパブリッシュされた事前作成済みのクラスタ エージェント イメージ 25.4.0 を使用します。

Yaml
apiVersion: cluster.appdynamics.com/v1alpha1
kind: Clusteragent
metadata:
 name: k8s-cluster-agent
 namespace: appdynamics
spec:
 controllerUrl: "http://<account>.saas.appdynamics.com"
 account: "<account-name>"
 appName: "Cluster1"
 image: docker.io/appdynamics/cluster-agent:25.4.0
values.yaml
deploymentMode: PRIMARY


installclusteragent: true
installInfraviz: false


# Docker images
imageInfo:
agentImage: docker.io/appdynamics/cluster-agent
agentTag: 21.12.0
operatorImage: docker.io/appdynamics/cluster-agent-operator
operatorTag:21.12.0
imagePullPolicy: Always
machineAgentImage: docker.io/appdynamics/machine-agent-analytics
machineAgentTag:21.9.0
machineAgentWinTag:21.9.0-win-ltsc2019
netVizImage: docker.io/appdynamics/machine-agent-netviz

カスタム クラスタ エージェント イメージの作成

ダウンロードポータルのダウンロードパッケージには、クラスタエージェントのコンテナイメージを作成および展開するために必要なファイルが含まれています。

クラスタエージェントのイメージを作成するために使用されるベースイメージに応じて、ポータルで使用できるパッケージには次の 2 つのタイプがあります。

  • Alpine Linux ベース
  • Rhel Linux ベース(OpenShift クラスタにのみ推奨)

Alpine および Rhel Linux のダウンロードパッケージのディレクトリ構造は次のとおりです。

Alpine Linux AMD
cluster-agent 
├── cluster-agent-operator.yaml 
├── appdynamics-operator-alpine-linux-amd64-21.12.0-88
├── cluster-agent-operator-openshift-1.15-or-less.yaml
├── cluster-agent-operator-openshift.yaml 
├── cluster-agent.yaml 
├── infraviz.yaml
├── infraviz-pod-security-policy.yaml
├── infraviz-security-context-constraint-openshift.yaml
├── README-alpine.md 
└── docker 
    ├── cluster-agent.zip 
    ├── Dockerfile
    ├── LICENSE 
    └── start-appdynamics
└── helm-charts
	├── Chart.yaml
    ├── README.md
    ├── crds
    ├── templates
    └── values.yaml
Alpine Linux ARM
cluster-agent 
├── cluster-agent-operator.yaml 
├── appdynamics-operator-alpine-linux-arm64-21.12.0-88
├── cluster-agent-operator-openshift-1.15-or-less.yaml
├── cluster-agent-operator-openshift.yaml 
├── cluster-agent.yaml 
├── infraviz.yaml
├── infraviz-pod-security-policy.yaml
├── infraviz-security-context-constraint-openshift.yaml
├── README-alpine.md 
└── docker 
    ├── cluster-agent.zip 
    ├── Dockerfile
    ├── LICENSE 
    └── start-appdynamics
└── helm-charts
	├── Chart.yaml
    ├── README.md
    ├── crds
    ├── templates
    └── values.yaml
Rhel Linux ubi8
cluster-agent 
├── cluster-agent-operator.yaml 
├── appdynamics-operator-rhel-linux-amd64-21.12.0-88
├── cluster-agent-operator-openshift-1.15-or-less.yaml
├── cluster-agent-operator-openshift.yaml 
├── cluster-agent.yaml 
├── infraviz.yaml
├── infraviz-pod-security-policy.yaml
├── infraviz-security-context-constraint-openshift.yaml
├── README-rhel.md 
└── docker 
    ├── cluster-agent.zip 
    ├── Dockerfile-rhel
    ├── LICENSE 
    └── start-appdynamics
└── helm-charts
	├── Chart.yaml
    ├── README.md
    ├── crds
    ├── templates
    └── values.yaml

カスタム クラスタ エージェント イメージの作成

  1. ディレクトリを Docker に変更する

    $ cd docker
  2. Docker の構築およびタグ付け

    Alpine Linux
    $ docker build -t <registryname>/<accountname>/cluster-agent:<Agent-version> --build-arg version=<alpine-version> .
    Rhel Linux ubi8
    $ docker build -t <registryname>/<accountname>/cluster-agent:<Agent-version> -f Dockerfile-rhel .
    注: 特定の Alpine イメージバージョンを使用する場合は、--build-arg version=<alpine-version> を使用してバージョンを指定できます。イメージバージョンを指定しない場合、build コマンドは最新の Alpine イメージバージョンを自動的に取得します。

    たとえば、アカウント名 johndoe の Docker Hub レジストリで、最新の Alpine バージョンを使用してイメージバージョン 21.12.0 を作成し、タグ付けするには、次の手順を実行します。

    Alpine Linux
    $ docker build -t docker.io/johndoe/cluster-agent:21.12.0 .
    Rhel Linux ubi8
    $ docker build -t docker.io/johndoe/cluster-agent:21.12.0 -f Dockerfile-rhel .
  3. ビルドが成功したら、このイメージがローカル Docker リポジトリに表示されていることを確認します。

  4. 次のようにしてイメージをプッシュします。

    $ docker push <registryname>/<accountname>/cluster-agent:<Agent-version>

    たとえば、アカウント名 Johndoe の Docker Hub レジストリにイメージバージョン 21.12.0 をプッシュします。

    $ docker push docker.io/johndoe/cluster-agent:21.12.0

事前作成された Splunk AppDynamics オペレータイメージの使用pre-built-image

また、事前作成された Alpine ベースまたは Rhel ベースの Splunk AppDynamics オペレータイメージを内部レジストリに使用することもできます。

Alpine オペレータイメージ

DockerHub アカウントから事前作成された Alpine ベースの Splunk AppDynamics オペレータイメージを使用できます。

  1. Docker Hub アカウントにログインします。
    $ docker login docker.io -u <your-username> -p <your-password>
  2. たとえば、Alpine ベースの Splunk AppDynamics オペレータ イメージ バージョン 21.12.0 をプルするには、次の手順を実行します。
    $ docker pull docker.io/appdynamics/cluster-agent-operator:<Operator_Version>
    $ docker pull docker.io/appdynamics/cluster-agent-operator:21.12.0
このイメージを内部レジストリまたはアカウントにプッシュするには、次の手順を実行します。
  1. イメージの名前を変更します。例:
    $ docker tag docker.io/appdynamics/cluster-agent-operator:<Operator_Version> <registryname>/<accountname>/cluster-agent-operator:<Operator_Version>
    $ docker tag docker.io/appdynamics/cluster-agent-operator:21.12.0 docker.io/johndoe/cluster-agent-operator:21.12.0
  2. たとえば、アカウント名 Johndoe の Docker Hub レジストリにイメージバージョン 21.12.0 をプッシュするには、次のようにします。
    $ docker push <registryname>/<accountname>/cluster-agent-operator:<Operator_Version>
    $ docker push docker.io/johndoe/cluster-agent-operator:21.12.0

    RHEL オペレータイメージ」を参照してください。

クラスタエージェントの YAML 仕様でのイメージの設定

でイメージを参照してください。

apiVersion: cluster.appdynamics.com/v1alpha1
kind: Clusteragent
metadata:
name: k8s-cluster-agent
namespace: appdynamics
spec:
controllerUrl: "http://<account>.saas.appdynamics.com"
account: "<account-name>"
appName: "Cluster1"
image: <registryname>/<username>/cluster-agent:<Agent-version>

サポートが必要な場合は、カスタマーサポートまでお問い合わせください。