Linux on Power ( ppc64le ) で Elasticsearch データストアを作成する
Elasticsearch オペレーターをインストールし、データ・ストアをセットアップします。
準備
外部リポジトリーからイメージをプルするために、オンラインおよびオフラインのホストが準備されていることを確認します。 また、 Helm リポジトリーが追加されていることを確認します。
詳細については、 「データストア・オペレーターのインストール準備」 を参照してください。
Elasticsearch オペレーターのバージョンとイメージタグ
ピン留めされた Helm チャートまたはオペレーターのバージョンには、以下のイメージが必要です。
| プラットフォーム | オペレーターのバージョン | Helm チャートのバージョン | タグ付きのイメージ |
|---|---|---|---|
| Linux® on Power® (ppc64le) | 3.4.1 | 3.4.1 | artifact-public.instana.io/self-hosted-images/3rd-party/operator/elasticsearch: 3.4.1_v0.34.0 artifact-public.instana.io/self-hosted-images/3rd-party/datastore/elasticsearch: 8.19.13_v0.35.0 |
Elasticsearch のオンラインインストール
Elasticsearch データ・ストアをインストールするには、以下の手順を実行します。
instana-elastic名前空間を作成します。kubectl create namespace instana-elasticサービス
elasticsearchアカウントを作成します。kubectl create serviceaccount elasticsearch -n instana-elasticinstana-elastic名前空間の画像プルシークレットを作成します。<download_key>の値を、あなた自身のダウンロードキーで更新してください。kubectl create secret docker-registry instana-registry --namespace instana-elastic \ --docker-username=_ \ --docker-password=<download_key> \ --docker-server=artifact-public.instana.ioElasticsearch オペレーターをインストールします。
helm install elastic-operator instana/eck-operator -n instana-elastic --version=3.4.1 --set image.repository=artifact-public.instana.io/self-hosted-images/3rd-party/operator/elasticsearch --set image.tag=3.4.1_v0.34.0 --set imagePullSecrets[0].name="instana-registry"YAML ファイルを作成します。例えば
elastic.yaml、 Elasticsearch の設定を記述したファイルを作成します。apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: name: instana spec: image: artifact-public.instana.io/self-hosted-images/3rd-party/datastore/elasticsearch:8.19.13_v0.35.0 version: 8.19.13 nodeSets: - name: default count: 3 podTemplate: spec: serviceAccountName: elasticsearch imagePullSecrets: - name: instana-registry config: node.roles: ["master", "data", "ingest"] node.store.allow_mmap: false xpack.ml.enabled: false volumeClaimTemplates: - metadata: name: elasticsearch-data # Do not change this name unless you set up a volume mount for the data path. spec: accessModes: - ReadWriteOnce resources: requests: storage: 20Gi http: tls: selfSignedCertificate: disabled: true「 Elasticsearch (オンラインおよびオフライン)」のステップを実行します。
Elasticsearch のオフラインインストール
インストールの準備時に外部レジストリーから Elasticsearch イメージをまだプルしていない場合は、ここでプルできます。 要塞ホストで以下のコマンドを実行します。 次に、それらの画像を、エアギャップ環境にある Instana ホストにコピーします。
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/operator/elasticsearch:3.4.1_v0.34.0
docker pull artifact-public.instana.io/self-hosted-images/3rd-party/datastore/elasticsearch:8.19.13_v0.35.0
Instana ホストで、以下の手順を実行してください。
イメージを内部イメージ・レジストリーに再タグ付けします。
docker tag artifact-public.instana.io/self-hosted-images/3rd-party/operator/elasticsearch:3.4.1_v0.34.0 <internal-image-registry>/ppc64le-oss/eck-operator-ppc64le:3.4.1_v0.34.0 docker tag artifact-public.instana.io/self-hosted-images/3rd-party/datastore/elasticsearch:8.19.13_v0.35.0 <internal-image-registry>/ppc64le-oss/elasticsearch-ppc64le:8.19.13_v0.35.0イメージを要塞ホスト上の内部イメージ・レジストリーにプッシュします。
docker push <internal-image-registry>/self-hosted-images/3rd-party/operator/elasticsearch:3.4.1_v0.34.0 docker push <internal-image-registry>/ppc64le-oss/elasticsearch-ppc64le:8.19.13_v0.35.0Elasticsearch インスタンスの
instana-elastic名前空間を作成します。kubectl create namespace instana-elasticサービス
elasticsearchアカウントを作成します。kubectl create serviceaccount elasticsearch -n instana-elasticオプション:内部イメージ・レジストリの認証が必要な場合は、イメージ・プル・シークレットを作成します。
kubectl create secret docker-registry <secret_name> --namespace instana-elastic \ --docker-username=<registry_username> \ --docker-password=<registry_password> \ --docker-server=<internal-image-registry>:<internal-image-registry-port> \ --docker-email=<registry_email>Elasticsearch オペレーターをインストールします。 前のステップでイメージ・プル・シークレットを作成した場合は、次のコマンドに
--set imagePullSecrets[0].name="<internal-image-registry-pull-secret>"を追加する。helm install elastic-operator eck-operator-3.4.1.tgz -n instana-elastic --create-namespace --version=3.4.1 --set image.repository=<internal-image-registry>/self-hosted-images/3rd-party/operator/elasticsearch --set image.tag=3.4.1_v0.34.0YAML ファイルを作成します。例えば
elasticsearch.yaml、 Elasticsearch の設定を記述したファイルを作成します。apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: name: instana spec: image: <internal-image-registry>/self-hosted-images/3rd-party/datastore/elasticsearch:8.19.13_v0.35.0 version: 7.17.14 nodeSets: - name: default count: 3 podTemplate: spec: serviceAccountName: elasticsearch config: node.master: true node.data: true node.ingest: true node.store.allow_mmap: false xpack.ml.enabled: false volumeClaimTemplates: - metadata: name: elasticsearch-data # Do not change this name unless you set up a volume mount for the data path. spec: accessModes: - ReadWriteOnce resources: requests: storage: 20Gi http: tls: selfSignedCertificate: disabled: true「 Elasticsearch (オンラインおよびオフライン)」のステップを実行します。
Elasticsearch の展開と検証(オンラインおよびオフライン)
Elasticsearch インスタンスをデプロイしてデータ・ストアを作成するには、以下の手順を実行します。
Elasticsearchをデプロイします。 デフォルトでは、
elasticという名前のユーザーは、ランダムに生成されたパスワードを使用して作成されます。kubectl apply -f elastic.yaml -n instana-elastic kubectl wait elasticsearch/instana --for=condition=ReconciliationComplete --timeout=300s -n instana-elasticパスワードを取得します。
kubectl get secret instana-es-elastic-user -n instana-elastic -o go-template='{{.data.elastic | base64decode}}' && echo以下のコード部分に示すように、取得したパスワードを
config.yamlに保管します。 < RETRIEVED_FROM_SECRET> を、前のステップで取得したパスワードに置き換えます。datastoreConfigs: ... elasticsearchConfig: adminUser: elastic adminPassword: <RETRIEVED_FROM_SECRET> user: elastic password: <RETRIEVED_FROM_SECRET> ...Elasticsearch オペレーターのデプロイメントを確認します。
kubectl get all -n instana-elasticElasticsearch オペレーターが正常にデプロイされた場合、コマンド出力には、以下の例に示すように、オペレーターの状況が
Runningと表示されます。NAME READY STATUS RESTARTS AGE pod/elastic-operator-0 1/1 Running 1 (10m ago) 10m pod/instana-es-default-0 1/1 Running 0 6m44s pod/instana-es-default-1 1/1 Running 0 6m44s pod/instana-es-default-2 1/1 Running 0 6m44s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/elastic-operator-webhook ClusterIP 192.168.1.41 <none> 443/TCP 10m service/instana-es-default ClusterIP None <none> 9200/TCP 6m46s service/instana-es-http ClusterIP 192.168.1.111 <none> 9200/TCP 6m48s service/instana-es-internal-http ClusterIP 192.168.1.196 <none> 9200/TCP 6m48s service/instana-es-transport ClusterIP None <none> 9300/TCP 6m48s NAME READY AGE statefulset.apps/elastic-operator 1/1 10m statefulset.apps/instana-es-default 3/3 6m48s