メインコンテンツへスキップ

はじめに

このガイドでは、エアギャップ(オフライン)環境のカスタマー管理環境に W&B プラットフォームをデプロイするための手順を詳しく説明します。 Helm チャートやコンテナイメージをホストするために、内部のリポジトリまたはレジストリを使用してください。すべてのコマンドは、Kubernetes クラスターへの適切なアクセス権限を持つシェルコンソールで実行してください。 Kubernetes アプリケーションのデプロイに使用している継続的デリバリー(CD)ツールでも、同様のコマンドを利用できます。

ステップ 1: 前提条件

開始する前に、環境が以下の要件を満たしていることを確認してください。

バージョン要件

SoftwareMinimum version
Kubernetesv1.32 or newer (Supported Kubernetes versions)
Helmv3.x
MySQLv8.0.x is required, v8.0.32 or newer; v8.0.44 or newer is recommended.
Aurora MySQL 3.x releases, must be v3.05.2 or newer
Redisv7.x

SSL/TLS 要件

W&B requires a valid signed SSL/TLS certificate for secure communication between clients and the server. SSL/TLS termination must occur on the ingress/load balancer. The W&B Server application does not terminate SSL or TLS connections. Important: W&B does not support self-signed certificates and custom CAs. Using self-signed certificates will cause challenges for users and is not supported. If possible, using a service like Let’s Encrypt is a great way to provide trusted certificates to your load balancer. Services like Caddy and Cloudflare manage SSL for you. If your security policies require SSL communication within your trusted networks, consider using a tool like Istio and side car containers.

ハードウェア要件

CPU Architecture: W&B runs on Intel (x86) CPU architecture only. ARM is not supported. Sizing: For CPU, memory, and disk sizing recommendations for Kubernetes nodes and MySQL, see the Sizing section in the reference architecture. Requirements vary based on whether you’re running Models, Weave, or both.

MySQL データベース

W&B requires an external MySQL database. For production, W&B strongly recommends using managed database services: Managed database services provide automated backups, monitoring, high availability, patching, and reduce operational overhead. See the reference architecture for complete MySQL requirements, including sizing recommendations and configuration parameters. For database creation SQL, see the bare-metal guide. For questions about your deployment’s database configuration, contact support or your AISE.

Redis

W&B depends on a single-node Redis 7.x deployment used by W&B’s components for job queuing and data caching. For convenience during testing and development of proofs of concept, W&B Self-Managed includes a local Redis deployment that is not appropriate for production deployments. For production deployments, W&B can connect to a Redis instance in the following environments:

オブジェクトストレージ

W&B requires object storage with pre-signed URL and CORS support. For production deployments, W&B recommends using managed object storage services:
  • Amazon S3: Object storage service offering industry-leading scalability, data availability, security, and performance.
  • Google Cloud Storage: Managed service for storing unstructured data at scale.
  • Azure Blob Storage: Cloud-based object storage solution for storing massive amounts of unstructured data.
  • CoreWeave AI Object Storage: High-performance, S3-compatible object storage service optimized for AI workloads.
For self-hosted object storage options, see the bare-metal guide object storage section for detailed setup instructions including CORS configuration and enterprise alternatives.
MinIO Open Source is in maintenance mode with no active development or pre-compiled binaries. For production deployments, W&B recommends using managed object storage services or enterprise-grade S3-compatible solutions.
See the reference architecture object storage section for complete requirements.

追加要件

  • 必要な W&B イメージが含まれる内部コンテナレジストリへのアクセス
  • W&B Helm チャート用の内部 Helm リポジトリへのアクセス
ネットワークやロードバランサーの設定を含むインフラストラクチャーの完全な要件については、リファレンスアーキテクチャーを参照してください。
W&B はエアギャップ環境の OpenShift Kubernetes クラスターにデプロイ可能です。詳細は リファレンスアーキテクチャー を参照し、エアギャップ環境の OpenShift デプロイに適応可能な具体的な設定手順については、Operator ガイドの OpenShift セクション を確認してください。

ステップ 2: 内部コンテナレジストリの準備

エアギャップ環境へのデプロイを成功させるには、以下のコンテナイメージが内部コンテナレジストリで利用可能である必要があります。 W&B Operator の要件を追跡し、コンテナレジストリを最新のイメージで定期的に維持する責任はユーザーにあります。必要なコンテナイメージとバージョンの最新リストについては、Helm チャートを参照するか、サポート または担当の AISE にお問い合わせください。

W&B コアコンポーネントコンテナ

依存関係

  • docker.io/bitnamilegacy/redis: テストおよび開発中のローカル Redis デプロイに必要です。ローカル Redis デプロイを使用する場合は、このイメージがコンテナレジストリで利用可能であることを確認してください。プロダクション環境の Redis 要件については、前提条件の Redis セクション を参照してください。
  • docker.io/otel/opentelemetry-collector-contrib: W&B は、Kubernetes レイヤーのリソースからメトリクスとログを収集し、W&B 上で表示するために OpenTelemetry エージェントに依存しています。
  • quay.io/prometheus/prometheus: W&B は、さまざまなコンポーネントからメトリクスをキャプチャし、W&B 上で表示するために Prometheus に依存しています。
  • quay.io/prometheus-operator/prometheus-config-reloader: Prometheus の必須の依存関係です。

必要なイメージの取得

Helm チャートの値から必要なイメージとバージョンの完全なリストを抽出するには:
  1. W&B Helm チャートリポジトリから、W&B Operator および Platform の Helm チャートをダウンロードします。
  2. values.yaml ファイルを調査して、すべてのコンテナイメージとそのバージョンを特定します。
    # Helm チャートからイメージ参照を抽出
    helm show values wandb/operator \
      | awk -F': *' '/^[[:space:]]*repository:/{print $2}' \
      | grep -E '^wandb/' \
      | sort -u
    
    リストは以下のようになります。イメージのバージョンは異なる場合があります。
    wandb/anaconda2
    wandb/console
    wandb/frontend-nginx
    wandb/local
    wandb/megabinary
    wandb/weave-python
    wandb/weave-trace
    

ステップ 3: 内部 Helm チャートリポジトリの準備

コンテナイメージに加えて、以下の Helm チャートが内部 Helm チャートリポジトリで利用可能であることを確認する必要があります。以下からダウンロードしてください。 operator チャートは、コントローラーマネージャーとも呼ばれる W&B Operator をデプロイするために使用されます。platform チャートは、カスタムリソース定義(CRD)で設定された値を使用して W&B プラットフォームをデプロイするために使用されます。

ステップ 4: Helm リポジトリのセットアップ

次に、内部リポジトリから W&B Helm チャートをプルするように Helm リポジトリを設定します。以下のコマンドを実行して、Helm リポジトリを追加し更新します。
helm repo add local-repo https://charts.yourdomain.com
helm repo update

ステップ 5: Kubernetes Operator のインストール

コントローラーマネージャーとしても知られる W&B Kubernetes Operator は、W&B プラットフォームコンポーネントの管理を担当します。エアギャップ環境にインストールするには、内部コンテナレジストリを使用するように設定する必要があります。 そのためには、デフォルトのイメージ設定を上書きして内部コンテナレジストリを使用するようにし、キー airgapped: true を設定して想定されるデプロイタイプを示します。以下のように values.yaml ファイルを更新してください。
image:
  repository: registry.yourdomain.com/library/controller
  tag: 1.13.3
airgapped: true
タグは内部レジストリで利用可能なバージョンに置き換えてください。 Operator と CRD をインストールします。
helm upgrade --install operator local-repo/operator -n wandb --create-namespace -f values.yaml
サポートされている値の詳細については、Kubernetes Operator の GitHub リポジトリを参照してください。

ステップ 6: MySQL データベースのセットアップ

W&B カスタムリソースを設定する前に、外部 MySQL データベースをセットアップする必要があります。プロダクション環境のデプロイでは、W&B はマネージドデータベースサービスの使用を強く推奨します。ただし、独自の MySQL インスタンスを実行している場合は、データベースとユーザーを作成してください。 Create a database and a user with the following SQL commands. Replace SOME_PASSWORD with a secure password of your choice:
CREATE USER 'wandb_local'@'%' IDENTIFIED BY 'SOME_PASSWORD';
CREATE DATABASE wandb_local CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL ON wandb_local.* TO 'wandb_local'@'%' WITH GRANT OPTION;
MySQL の設定パラメータについては、リファレンスアーキテクチャーの MySQL 設定セクションを参照してください。

ステップ 7: W&B カスタムリソースの設定

W&B Kubernetes Operator をインストールした後、内部 Helm リポジトリとコンテナレジストリを指すようにカスタムリソース(CR)を設定する必要があります。 この設定により、W&B プラットフォームの必要なコンポーネントをデプロイする際に、Kubernetes Operator が内部のレジストリとリポジトリを使用するようになります。 この CR の例を wandb.yaml という名前の新しいファイルにコピーします。
apiVersion: apps.wandb.com/v1
kind: WeightsAndBiases
metadata:
  labels:
    app.kubernetes.io/instance: wandb
    app.kubernetes.io/name: weightsandbiases
  name: wandb
  namespace: default

spec:
  chart:
    url: http://charts.yourdomain.com
    name: operator-wandb
    version: 0.18.0

  values:
    global:
      host: https://wandb.yourdomain.com
      license: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      bucket:
        accessKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        secretKey: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        name: s3.yourdomain.com:port #例: s3.yourdomain.com:9000
        path: bucket_name
        provider: s3
        region: us-east-1
      mysql:
        database: wandb
        host: mysql.home.lab
        password: password
        port: 3306
        user: wandb
      redis:
        host: redis.yourdomain.com
        port: 6379
        password: password
      api:
        enabled: true
      glue:
        enabled: true
      executor:
        enabled: true
      extraEnv:
        ENABLE_REGISTRY_UI: 'true'

    app:
      image:
        repository: registry.yourdomain.com/local
        tag: 0.59.2

    console:
      image:
        repository: registry.yourdomain.com/console
        tag: 2.12.2

    api:
      image:
        repository: registry.yourdomain.com/megabinary
        tag: 0.59.2

    executor:
      image:
        repository: registry.yourdomain.com/megabinary
        tag: 0.59.2

    glue:
      image:
        repository: registry.yourdomain.com/megabinary
        tag: 0.59.2

    parquet:
      image:
        repository: registry.yourdomain.com/megabinary
        tag: 0.59.2

    weave:
      image:
        repository: registry.yourdomain.com/weave-python
        tag: 0.59.2

    otel:
      image:
        repository: registry.yourdomain.com/otel/opentelemetry-collector-contrib
        tag: 0.97.0

    prometheus:
      server:
        image:
          repository: registry.yourdomain.com/prometheus/prometheus
          tag: v2.47.0
      configmapReload:
        prometheus:
          image:
            repository: registry.yourdomain.com/prometheus-operator/prometheus-config-reloader
            tag: v0.67.0

    ingress:
      annotations:
        nginx.ingress.kubernetes.io/proxy-body-size: 0
      class: nginx

    
W&B プラットフォームをデプロイするために、Kubernetes Operator は CR からの値を使用して、内部リポジトリにある operator-wandb Helm チャートを設定します。 すべてのタグとバージョンを内部レジストリで利用可能なバージョンに置き換えてください。上記の例は、最も一般的に使用されるコンポーネントを示しています。デプロイのニーズに応じて、settingsMigrationJobweave-tracefilestream などの追加コンポーネントのイメージレジストリを設定する必要がある場合もあります。設定可能なコンポーネントの完全なリストについては、W&B Helm リポジトリの values ファイルを参照してください。

ステップ 8: W&B プラットフォームのデプロイ

Kubernetes Operator と CR が設定されたので、wandb.yaml 設定を適用して W&B プラットフォームをデプロイします。
kubectl apply -f wandb.yaml

ステップ 9: インストールの確認

To verify the installation, W&B recommends using the W&B CLI. The verify command executes several tests that verify all components and configurations.
This step assumes that the first admin user account is created with the browser.
Follow these steps to verify the installation:
  1. Install the W&B CLI:
pip install wandb
  1. Log in to W&B:
wandb login --host=https://YOUR_DNS_DOMAIN
For example:
wandb login --host=https://wandb.company-name.com
  1. Verify the installation:
wandb verify
A successful installation and fully working W&B deployment shows the following output:
Default host selected:  https://wandb.company-name.com
Find detailed logs for this test at: /var/folders/pn/b3g3gnc11_sbsykqkm3tx5rh0000gp/T/tmpdtdjbxua/wandb
Checking if logged in...................................................✅
Checking signed URL upload..............................................✅
Checking ability to send large payloads through proxy...................✅
Checking requests to base url...........................................✅
Checking requests made over signed URLs.................................✅
Checking CORs configuration of the bucket...............................✅
Checking wandb package version is up to date............................✅
Checking logged metrics, saving and downloading a file..................✅
Checking artifact save and download workflows...........................✅
Contact W&B Support if you encounter errors.

FAQ

デプロイプロセス中のよくある質問(FAQ)とトラブルシューティングのヒントについては、以下を参照してください。

別の ingress クラスがあります。そのクラスを使用できますか?

はい、values.yaml の ingress 設定を変更することで、独自の ingress クラスを設定できます。

証明書バンドルに複数の証明書が含まれています。動作しますか?

values.yamlcustomCACerts セクションで、証明書を複数のエントリに分割する必要があります。

Kubernetes Operator による意図しないアップデートを防ぐにはどうすればよいですか?可能ですか?

W&B コンソールから自動アップデートをオフにすることができます。サポートされているバージョンに関する質問については、W&B チームにお問い合わせください。W&B は、主要な W&B Server リリースを最初のリリース日から 12 か月間サポートします。Self-Managed インスタンスをご利用のお客様は、サポートを維持するために期限内にアップグレードする責任があります。サポートされていないバージョンのままにしないようにしてください。リリースに関するポリシーとプロセスを参照してください。
W&B は、サポートを維持し、最新の機能、パフォーマンスの向上、および修正を適用するために、Self-Managed インスタンスをご利用のお客様が少なくとも四半期に一度はデプロイを最新リリースにアップデートすることを強く推奨します。

環境がパブリックリポジトリに接続されていない場合でもデプロイは機能しますか?

設定で airgappedtrue に設定している場合、Kubernetes Operator は内部リソースのみを使用し、パブリックリポジトリへの接続を試みません。