> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-docs-1917.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> さまざまなインストール方法で W&B のバージョンとライセンスを更新するためのガイド。

# W&B のライセンスとバージョンを更新する

W\&B Server のバージョンとライセンスは、W\&B Server のインストール時と同じ方法で更新してください。次の表は、デプロイ方法ごとにライセンスとバージョンを更新する方法を示しています。

| Release Type                        | Description                                                                                                                                                                                                                                                                           |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Terraform](#update-with-terraform) | W\&B は、クラウドデプロイ向けに 3 つの公開 Terraform モジュールをサポートしています。[AWS](https://registry.terraform.io/modules/wandb/wandb/aws/latest)、[Google Cloud](https://registry.terraform.io/modules/wandb/wandb/google/latest)、[Azure](https://registry.terraform.io/modules/wandb/wandb/azurerm/latest) です。 |
| [Helm](#update-with-helm)           | [Helm チャート](https://github.com/wandb/helm-charts) を使用して、既存の Kubernetes クラスターに W\&B をインストールできます。                                                                                                                                                                                       |

<div id="update-with-terraform">
  ## Terraform を使用して更新する
</div>

Terraform を使用して、ライセンスとバージョンを更新します。次の表は、クラウドプラットフォーム別の W\&B 管理 Terraform モジュールを示します。

| Cloud provider | Terraform module                                                                                 |
| -------------- | ------------------------------------------------------------------------------------------------ |
| AWS            | [AWS Terraform module](https://registry.terraform.io/modules/wandb/wandb/aws/latest)             |
| Google Cloud   | [Google Cloud Terraform module](https://registry.terraform.io/modules/wandb/wandb/google/latest) |
| Azure          | [Azure Terraform module](https://registry.terraform.io/modules/wandb/wandb/azurerm/latest)       |

1. まず、利用しているクラウドプロバイダに対応する、W\&B が管理する Terraform モジュールにアクセスします。前の表を参照して、使用しているクラウドプロバイダに対応する適切な Terraform モジュールを検索してください。

2. Terraform の設定で、Terraform の `wandb_app` モジュール設定にある `wandb_version` と `license` を更新します。

   ```hcl theme={null}
   module "wandb_app" {
       source  = "wandb/wandb/<cloud-specific-module>"
       version = "new_version"
       license       = "new_license_key" # 新しいライセンスキー
       wandb_version = "new_wandb_version" # 使用する W&B バージョン
       ...
   }
   ```

3. `terraform plan` と `terraform apply` を使用して Terraform の設定を適用します。
   ```bash theme={null}
   terraform init
   terraform apply
   ```

4. (任意) `terraform.tfvars` またはその他の `.tfvars` ファイルを使用している場合。

   新しい W\&B バージョンとライセンスキーを含む `terraform.tfvars` ファイルを更新するか、新規作成します。

   ```bash theme={null}
   terraform plan -var-file="terraform.tfvars"
   ```

   設定を適用します。Terraform Workspace ディレクトリで次を実行します。

   ```bash theme={null}
   terraform apply -var-file="terraform.tfvars"
   ```

<div id="update-with-helm">
  ## Helm を使用して更新
</div>

<Warning>
  `wandb` Helm チャートは非推奨であり、サポートが終了しました。このチャートは単一の pod をデプロイするものでしたが、現在は [W\&B Kubernetes Operator](/ja/platform/hosting/self-managed/operator) に置き換えられています。現在もこのチャートを使用している場合は、[移行ガイド](/ja/platform/hosting/self-managed/operator#migrate-self-managed-instances-to-wb-operator) に従って Operator へ移行してください。
</Warning>

<div id="update-wb-with-spec">
  ### spec を使って W\&B を更新
</div>

1. Helm チャートの `*.yaml` 設定ファイルで、`image.tag` および/または `license` の値を変更して、新しいバージョンを指定します。

   ```yaml theme={null}
   license: 'new_license'
   image:
     repository: wandb/local
     tag: 'new_version'
   ```

2. 次のコマンドを実行して Helm をアップグレードします。

   ```bash theme={null}
   helm repo update
   helm upgrade --namespace=wandb --create-namespace \
     --install wandb wandb/wandb --version ${chart_version} \
     -f ${wandb_install_spec.yaml}
   ```

<div id="update-license-and-version-directly">
  ### ライセンスとバージョンを直接更新する
</div>

1. 新しいライセンスキーとイメージタグを環境変数に設定します。

   ```bash theme={null}
   export LICENSE='new_license'
   export TAG='new_version'
   ```

2. 以下のコマンドで Helm リリースをアップグレードし、新しい値を既存の設定にマージします。

   ```bash theme={null}
   helm repo update
   helm upgrade --namespace=wandb --create-namespace \
     --install wandb wandb/wandb --version ${chart_version} \
     --reuse-values --set license=$LICENSE --set image.tag=$TAG
   ```

詳細については、パブリックリポジトリの[アップグレードガイド](https://github.com/wandb/helm-charts/blob/main/upgrade)を参照してください。

<div id="update-with-admin-ui">
  ## 管理者 UI で更新
</div>

この方法は、W\&B Server コンテナーで環境変数を使って設定されていないライセンスを更新する場合にのみ利用できます。通常は、セルフマネージドの Docker インストールが該当します。

1. [W\&B Deployment Page](https://deploy.wandb.ai/) から新しいライセンスを取得し、アップグレード対象のデプロイに対応する正しい組織とデプロイ ID に一致していることを確認します。
2. W\&B App の **License** ページにアクセスします。**Settings** > **License** をクリックするか、`<host-url>/console/settings/license` にアクセスします。
3. ライセンス管理セクションに移動します。
4. 新しいライセンスキーを入力し、変更を保存します。
