Linux on Power ( ppc64le ) で Elasticsearch データストアを作成する

Elasticsearch オペレーターをインストールし、データ・ストアをセットアップします。

Elasticsearch オペレーターのバージョンとイメージタグ

ピン留めされた Helm チャートまたはオペレーターのバージョンには、以下のイメージが必要です。

表 1. デプロイ用のオペレーターバージョンとイメージタグ
プラットフォーム オペレーターのバージョン 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 データ・ストアをインストールするには、以下の手順を実行します。

  1. instana-elastic 名前空間を作成します。

    kubectl create namespace instana-elastic
     
  2. サービス elasticsearch アカウントを作成します。

    kubectl create serviceaccount elasticsearch -n instana-elastic
     
  3. instana-elastic名前空間の画像プルシークレットを作成します。 <download_key>の値を、あなた自身のダウンロードキーで更新してください。

    kubectl create secret docker-registry instana-registry --namespace instana-elastic \
    --docker-username=_ \
    --docker-password=<download_key> \
    --docker-server=artifact-public.instana.io
     
  4. Elasticsearch オペレーターをインストールします。

    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"
     
  5. 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
     
  6. 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 ホストで、以下の手順を実行してください。

  1. イメージを内部イメージ・レジストリーに再タグ付けします。

    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
                   
  2. イメージを要塞ホスト上の内部イメージ・レジストリーにプッシュします。

    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.0
                   
  3. Elasticsearch インスタンスの instana-elastic 名前空間を作成します。

    kubectl create namespace instana-elastic
     
  4. サービス elasticsearch アカウントを作成します。

    kubectl create serviceaccount elasticsearch -n instana-elastic
     
  5. オプション:内部イメージ・レジストリの認証が必要な場合は、イメージ・プル・シークレットを作成します。

    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>
     
  6. 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.0
                   
  7. YAML ファイルを作成します。例えば 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
     
  8. Elasticsearch (オンラインおよびオフライン)」のステップを実行します。

Elasticsearch の展開と検証(オンラインおよびオフライン)

Elasticsearch インスタンスをデプロイしてデータ・ストアを作成するには、以下の手順を実行します。

  1. Elasticsearchをデプロイします。 デフォルトでは、 elastic という名前のユーザーは、ランダムに生成されたパスワードを使用して作成されます。

    kubectl apply -f elastic.yaml -n instana-elastic
    kubectl wait elasticsearch/instana --for=condition=ReconciliationComplete --timeout=300s -n instana-elastic
     
  2. パスワードを取得します。

    kubectl get secret instana-es-elastic-user -n instana-elastic -o go-template='{{.data.elastic | base64decode}}' && echo
     
  3. 以下のコード部分に示すように、取得したパスワードを config.yaml に保管します。 < RETRIEVED_FROM_SECRET> を、前のステップで取得したパスワードに置き換えます。

    datastoreConfigs:
      ...
      elasticsearchConfig:
        adminUser: elastic
        adminPassword: <RETRIEVED_FROM_SECRET>
        user: elastic
        password: <RETRIEVED_FROM_SECRET>
      ...
     
  4. Elasticsearch オペレーターのデプロイメントを確認します。

     kubectl get all -n instana-elastic
     

    Elasticsearch オペレーターが正常にデプロイされた場合、コマンド出力には、以下の例に示すように、オペレーターの状況が 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