From f8adbfdec124e9aca5e50e632f9bde2287b9cf88 Mon Sep 17 00:00:00 2001 From: Msksgm Date: Tue, 28 Jan 2025 22:14:47 +0900 Subject: [PATCH] docs: translated demo/docker-deployment into ja --- content/ja/docs/demo/docker-deployment.md | 138 ++++++++++++++++++++++ hugo.yaml | 4 + 2 files changed, 142 insertions(+) create mode 100644 content/ja/docs/demo/docker-deployment.md diff --git a/content/ja/docs/demo/docker-deployment.md b/content/ja/docs/demo/docker-deployment.md new file mode 100644 index 000000000000..3a7b05e910ce --- /dev/null +++ b/content/ja/docs/demo/docker-deployment.md @@ -0,0 +1,138 @@ +--- +title: Docker デプロイ +linkTitle: Docker +aliases: [docker_deployment] +cSpell:ignore: otelcollector otlphttp spanmetrics tracetest tracetesting +default_lang_commit: 60a361a052deab00f74492096f9ce598d84b1b4a +--- + + + +## 前提条件 + +- Docker +- [Docker Compose](https://docs.docker.com/compose/install/#install-compose) + v2.0.0+ +- Make (オプション) +- アプリケーション用に 6 GB の RAM + +## デモの取得と実行 + +1. デモリポジトリをクローン: + + ```shell + git clone https://github.com/open-telemetry/opentelemetry-demo.git + ``` + +2. デモフォルダに移動: + + ```shell + cd opentelemetry-demo/ + ``` + +3. デモを起動[^1]: + + {{< tabpane text=true >}} {{% tab Make %}} + +```shell +make start +``` + + {{% /tab %}} {{% tab Docker %}} + +```shell +docker compose up --force-recreate --remove-orphans --detach +``` + + {{% /tab %}} {{< /tabpane >}} + +4. (オプション) API オブザーバビリティ駆動テストの有効化[^1]: + + {{< tabpane text=true >}} {{% tab Make %}} + +```shell +make run-tracetesting +``` + + {{% /tab %}} {{% tab Docker %}} + +```shell +docker compose -f docker-compose-tests.yml run traceBasedTests +``` + + {{% /tab %}} {{< /tabpane >}} + +## ウェブストアとテレメトリーの確認 + +イメージがビルドされ、コンテナが開始されるとアクセスできるようになります: + +- Web store: +- Grafana: +- Load Generator UI: +- Jaeger UI: +- Tracetest UI: 、`make run-tracetesting` の使用時のみ +- Flagd configurator UI: + +## デモのプライマリーポート番号の変更 + +デフォルトでは、デモアプリケーションは 8080 ポートにバウンドされたすべてのブラウザのトラフィックに対してプロキシを開始します。 +ポート番号を変更するには、デモを開始する前に環境変数 `ENVOY_PORT` を設定してください。 + +- 例、8081 ポートを利用する場合[^1]: + + {{< tabpane text=true >}} {{% tab Make %}} + +```shell +ENVOY_PORT=8081 make start +``` + + {{% /tab %}} {{% tab Docker %}} + +```shell +ENVOY_PORT=8081 docker compose up --force-recreate --remove-orphans --detach +``` + + {{% /tab %}} {{< /tabpane >}} + +## 独自のバックエンドを導入する + +おそらく、あなたがすでに所持しているオブザーバビリティバックエンド(たとえば、Jaeger、Zipkin、または[選択したベンダー](/ecosystem/vendors/)のいずれかの既存インスタンス)のデモアプリケーションとしてウェブストアを利用したいでしょう。 + +OpenTelemetry コレクターはテレメトリーデータを複数のバックエンドに送信するのに利用可能です。 +デフォルトで、デモアプリケーションのコレクターは 2 つのファイルから設定をマージします: + +- `otelcol-config.yml` +- `otelcol-config-extras.yml` + +あなたのバックエンドに追加するために、エディターで[src/otelcollector/otelcol-config-extras.yml](https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config-extras.yml)ファイルを開いてください。 + +- 新しいエクスポーターを追加することで始めます。例えば、もしあなたのバックエンドが OTLP over HTTP をサポートしているのであれば、以下を追加してください: + + ```yaml + exporters: + otlphttp/example: + endpoint: + ``` + +- そして、`exporters` をあなたのバックエンドに使いたいテレメトリーパイプラインに上書きしてください。 + + ```yaml + service: + pipelines: + traces: + exporters: [spanmetrics, otlphttp/example] + ``` + +{{% alert title="Note" color="info" %}} +YAML の値をコレクターとマージすると、オブジェクトはマージされて、配列は置き換えられます。 +`spanmetrics` エクスポーターを上書きする場合は、`traces` パイプラインのエクスポーターの配列に含める必要があります。 +このエクスポーターを含めないとエラーが発生します。 +{{% /alert %}} + +ベンダーのバックエンドは認証のために追加のパラメーターを必要とするかもしれません。ドキュメントを確認してください。 +一部のバックエンドは異なるエクスポーターが必要です。それらのエクスポーターとドキュメントについて[opentelemetry-collector-contrib/exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter) で入手できます。 + +`otelcol-config-extras.yml` を更新した後に、`make start` を実行してデモを開始してください。 +しばらくして、あなたのバックエンドにトレースが流れるのも確認できるはずです。 + +[^1]: {{% param notes.docker-compose-v2 %}} diff --git a/hugo.yaml b/hugo.yaml index c85798d47564..3e6a046bfd13 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -28,6 +28,10 @@ languages: languageName: 日本語 (Japanese) params: description: OpenTelemetryプロジェクト公式サイト + notes: + docker-compose-v2: | + `docker-compose` は非推奨です. 詳細は、 + [Migrate to Compose V2](https://docs.docker.com/compose/migrate/) を確認してください。 pt: # cSpell:ignore Português Projeto languageName: Português languageCode: pt-BR