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

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

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

  • カスタム クラスタ エージェント コンテナ イメージを作成する必要がある
  • 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

Build the Custom Cluster Agent Image

The download packages from the Download Portal include files you need to build and deploy the Cluster Agent container image.

Depending on the base Image that was used to build the Cluster Agent Image, there are two package types available on the portal:

  • scratch-based
  • Rhel Linux-based (recommended for OpenShift cluster only)

The directory structure of the download packages for the Alpine and Rhel Linux is:

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
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

Build the Custom Cluster Agent Image

  1. Change directories into the docker

    $ cd docker
  2. Build and tag a docker

    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 .
    Note: To use a specific Alpine Image version, specify the version using --build-arg version=<alpine-version>. If you do not specify an image version, then the build command takes the latest Alpine image version automatically.

    For example, to build and tag the image version 21.12.0 using the latest alpine version on Docker Hub registry for the account name johndoe:

    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. When the build is successful, verify that the image appears in your local Docker repository.

  4. Push the image:

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

    For example, pushing the image version 21.12.0 to Docker Hub registry for the account name Johndoe :

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

Use Pre-Built Splunk AppDynamics Operator Image

You can also use pre-built Alpine-based or Rhel-based Splunk AppDynamics Operator images to an internal registry.

Operator Image

You can use the pre-built Alpine-based Splunk AppDynamics Operator image from the DockerHub account.

  1. Log in to your Docker Hub account:
    $ docker login docker.io -u <your-username> -p <your-password>
  2. Pull the image:For example, to pull the scratch-based Splunk AppDynamics Operator image version 21.12.0:
    $ docker pull docker.io/appdynamics/cluster-agent-operator:<Operator_Version>
    $ docker pull docker.io/appdynamics/cluster-agent-operator:21.12.0
To push this image to the internal registry or accounts:
  1. Rename the image:For example:
    $ 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. Push the image:For example, to push the image version 21.12.0 to the Docker Hub registry for the account name Johndoe:
    $ docker push <registryname>/<accountname>/cluster-agent-operator:<Operator_Version>
    $ docker push docker.io/johndoe/cluster-agent-operator:21.12.0

    See RHELOperator Image

クラスタエージェントの 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>

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