Grafana OpenTelemetry,、 Prometheus のインストール

サービスダッシュボードを有効にする前に Grafana OpenTelemetry,、および Prometheus をインストールする必要があります。

手順

  1. Python。 サポートされている任意の 3.9 以降のバージョンの Python を使用できます。
  2. Ansible® をインストールし、以下のコマンドを使用してバージョンを確認します。
    python3 --version
    python3 -m pip install ansible junit_xml pymongo xmljson jmespath kubernetes==12.0.1 openshift==0.12.1
    ansible --version
    ansible-playbook --version
  3. Ansible コレクションをインストールします。 以下のコマンドを実行して、 ibm.mas_devops コレクションを Ansible Galaxy から直接インストールします。
    ansible-galaxy collection install ibm.mas_devops
  4. Red Hat® OpenShift® クラスターにログインします。 クラスターが IBM Cloud®内にある場合は、 IBM Cloud コマンド・ライン・インターフェースを使用して、 IBM Cloud Red Hat OpenShift Kubernetes Service の Red Hat OpenShift クラスターにログインします。 クラスターが IBM Cloud内にない場合は、oc コマンド・ライン・ツールを使用して Red Hat OpenShift クラスターにログインします。
  5. プレイブックを実行して Ansible cluster_monitoring ロールを実行します。 次のコマンドを使用します。
    ansible-playbook playbook.yml
    以下の例を使用して、 playbook.yml ファイルを作成できます。
    - hosts: localhost
      any_errors_fatal: true
      vars:
        prometheus_storage_class: "ibmc-block-gold"
        prometheus_alertmgr_storage_class: "ibmc-file-gold-gid"
        grafana_instance_storage_class: "ibmc-file-gold-gid"
        cluster_monitoring_include_opentelemetry: true
    
      roles:
        - ibm.mas_devops.cluster_monitoring