Download PDF
Download page AppDynamics オペレータコンテナイメージ.
AppDynamics オペレータコンテナイメージ
このページでは、カスタム AppDynamics オペレータコンテナイメージを作成する方法、または事前作成されたイメージを使用して内部レジストリに保存する方法について説明します。
この手順は、次の場合に必要です。
- カスタム AppDynamics オペレータコンテナイメージを作成する必要がある
- DockerHub または RedHat Registry で、事前作成された AppDynamics オペレータイメージを使用し、内部レジストリに保存する必要がある
それ以外の場合は、デフォルトで、AppDynamics オペレータポッドは AppDynamics DockerHub リポジトリまたは AppDynamics RedHat Registry にある最新の事前作成された AppDynamics オペレータコンテナイメージを直接プルして使用できます。
カスタム AppDynamics オペレータイメージの作成
AppDynamics ダウンロードポータルのダウンロードパッケージには、AppDynamics オペレータのコンテナイメージを作成および展開する必要があるファイルが含まれています。
AppDynamics オペレータイメージを作成するために使用されるベースイメージに応じて、ポータルで使用できるパッケージには次の 2 つのタイプがあります。
- Alpine Linux ベース
- Rhel Linux ベース(Openshift クラスタにのみ推奨)
Alpine および Rhel Linux のダウンロードパッケージのディレクトリ構造は次のとおりです。
cluster-agent
├── cluster-agent-operator.yaml
├── appdynamics-operator-alpine-linux-amd64-21.12.0-88
├── bin
├── appdynamics-operator
├── Dockerfile
├── LICENSE
└── scripts
├── ensure-user.sh
├── start-operator.sh
├── 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
└── helm-charts
├── Chart.yaml
├── README.md
├── crds
├── templates
└── values.yaml
cluster-agent
├── cluster-agent-operator.yaml
├── appdynamics-operator-alpine-linux-arm64-21.12.0-88
├── bin
├── appdynamics-operator
├── Dockerfile
├── LICENSE
└── scripts
├── ensure-user.sh
├── start-operator.sh
├── 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
└── helm-charts
├── Chart.yaml
├── README.md
├── crds
├── templates
└── values.yaml
cluster-agent
├── cluster-agent-operator.yaml
├── appdynamics-operator-rhel-linux-amd64-21.12.0-88
├── bin
├── appdynamics-operator
├── Dockerfile-rhel
├── LICENSE
└── scripts
├── ensure-user.sh
├── start-operator.sh
├── 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
└── helm-charts
├── Chart.yaml
├── README.md
├── crds
├── templates
└── values.yaml
カスタム AppDynamics オペレータイメージの作成
ディレクトリを Operator ディレクトリに変更します。
$ cd appdynamics-operator-alpine-linux-amd64-21.12.0-88/
CODE次の構文を使用して
docker
イメージを構築し、タグを付けます。$ docker build -t <registryname>/<accountname>/cluster-agent-operator:<Operator_Version> .
CODE$ docker build -t <registryname>/<accountname>/cluster-agent-operator:<Operator_Version> -f Dockerfile-rhel .
CODEたとえば、アカウント名
johndoe:
の Docker Hub レジストリで、最新の Alpine バージョンを使用してイメージバージョン 21.12.0 を作成し、タグ付けするには、次のようにします。$ docker build -t docker.io/johndoe/cluster-agent-operator:21.12.0 .
CODE$ docker build -t docker.io/johndoe/cluster-agent-operator:21.12.0 -f Dockerfile-rhel .
CODE次のようにしてイメージをプッシュします。
$ docker push <registryname>/<accountname>/cluster-agent-operator:<Operator_Version>
BASHたとえば、アカウント名 Johndoe の Docker Hub レジストリにイメージバージョン 21.12.0 をプッシュします
:
$ docker push docker.io/johndoe/cluster-agent-operator:21.12.0
BASH
事前作成された AppDynamics オペレータイメージの使用
また、事前作成された Alpine ベースまたは Rhel ベースの AppDynamics オペレータイメージを内部レジストリに使用することもできます。
Alpine AppDynamics オペレータイメージ
AppDynamics DockerHub アカウントから事前作成された Alpine ベースの AppDynamics オペレータイメージを使用できます。
Docker Hub アカウントにログインします。
$ docker login docker.io -u <your-username> -p <your-password>
CODE次のようにして、イメージをプルします。
$ docker pull docker.io/appdynamics/cluster-agent-operator:<Operator_Version>
CODEたとえば、Alpine ベースの AppDynamics オペレータ イメージ バージョン 21.12.0 をプルするには、次の手順を実行します。
$ docker pull docker.io/appdynamics/cluster-agent-operator:21.12.0
CODE
このイメージを内部レジストリまたはアカウントにプッシュするには、次の手順を実行します。
イメージの名前を変更します。
$ docker tag docker.io/appdynamics/cluster-agent-operator:<Operator_Version> <registryname>/<accountname>/cluster-agent-operator:<Operator_Version>
CODE次に例を示します。
$ docker tag docker.io/appdynamics/cluster-agent-operator:21.12.0 docker.io/johndoe/cluster-agent-operator:21.12.0
CODE次のようにしてイメージをプッシュします。
$ docker push <registryname>/<accountname>/cluster-agent-operator:<Operator_Version>
CODEたとえば、アカウント名 Johndoe の Docker Hub レジストリにイメージバージョン 21.12.0 をプッシュするには、次のようにします。
$ docker push docker.io/johndoe/cluster-agent-operator:21.12.0
CODE
Rhel AppDynamics オペレータイメージ
または、AppDynamics Redhat Container Registry アカウントから事前作成された Rhel ベースの AppDynamics オペレータイメージを使用することもできます。
Redhat ベースの AppDynamics オペレータを使用するために、Redhat の推奨に従ってファイアウォール設定を調整する必要がある場合があります。そのため、次のホスト名へのアウトバウンド接続を有効にする必要があります。
- cdn.quay.io
- cdn01.quay.io
- cdn02.quay.io
- cdn03.quay.io
カスタマーポータルのログイン情報を使用して Red Hat Registry にログインします。
$ docker login registry.connect.redhat.com -u <your-username> -p <your-password>
CODE次のようにして、イメージをプルします。
$ docker pull registry.connect.redhat.com/appdynamics/cluster-agent-operator:<Operator_Version>
CODEたとえば、Rhel ベースの AppDynamics オペレータバージョン 21.12.0 をプルするには、次の手順を実行します。
$ docker pull registry.connect.redhat.com/appdynamics/cluster-agent-operator:21.12.0
CODE
AppDynamics オペレータイメージを使用できるようになりました。
このイメージを内部レジストリまたは別のアカウントにプッシュするには、次の手順を実行します。
イメージの名前を変更します。
$ docker tag registry.connect.redhat.com/appdynamics/cluster-agent-operator:<Operator_Version> <registryname>/<accountname>/cluster-agent-operator:<Operator_Version>
CODE次に例を示します。
$ docker tag registry.connect.redhat.com/appdynamics/cluster-agent-operator:21.12.0 scan.connect.redhat.com/johndoe/cluster-agent-operator:21.12.0
CODE次のようにしてイメージをプッシュします。
$ docker push <registryname>/<accountname>/cluster-agent-operator:<Operator_Version>
CODEたとえば、アカウント名
johndoe
の Redhat Registry にイメージバージョン 21.12.0 をプッシュするには、次の手順を実行します。$ docker push scan.connect.redhat.com/johndoe/cluster-agent-operator:21.12.0
CODE
AppDynamics オペレータの YAML 仕様でのイメージの設定
cluster-agent-operator.yaml
または cluster-agent-operator-
openshift.yaml spec:
でイメージを参照してください。
apiVersion: cluster.appdynamics.com/v1alpha1
apiversion: apps/v1
kind: Deployment
metadata:
name: appdynamics-operator
namespace: appdynamics
spec:
replicas: 1
selector
matchLabels:
name: appdynamics-operator
template:
metadata:
labels:
name: appdynamics-operator
spec:
serviceAccountName: appdynamics-operator
containers:
- name: appdynamics-operator
image: <registryname>/<username>/cluster-agent-operator:<Operator_Version>
ports:
-containerPort: 60000
name: metrics
command:
-appdynamics-operator
imagePullPolicy: Always
resources:
limits:
cpu: 200m
memory: 128N1
requests:
cpu: 100m
memory: 64M1
env:
-name: WATCH NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata, namespace
-name: POD_NAME
valueFrom:
fieldRef:
fieldPath:-metadata.name
-name: OPERATOR_NAME
value: appoynamics-operator
詳細については、AppDynamics サポートにお問い合わせください。