> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-serverless-sft-revamp.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 をインストールした際と同じメソッドを使用して行います。以下の表は、デプロイメント方法に基づいたライセンスとバージョンの更新方法をまとめたものです。

| リリースタイプ                             | 説明                                                                                                                                                                                                                                                                                      |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [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 Chart](https://github.com/wandb/helm-charts) を使用して、既存の Kubernetes クラスターに W\&B をインストールできます。                                                                                                                                                                                        |

## Terraform を使用した更新

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

| クラウドプロバイダー   | Terraform モジュール                                                                                 |
| ------------ | ----------------------------------------------------------------------------------------------- |
| AWS          | [AWS Terraform モジュール](https://registry.terraform.io/modules/wandb/wandb/aws/latest)             |
| Google Cloud | [Google Cloud Terraform モジュール](https://registry.terraform.io/modules/wandb/wandb/google/latest) |
| Azure        | [Azure Terraform モジュール](https://registry.terraform.io/modules/wandb/wandb/azurerm/latest)       |

1. まず、お使いのクラウドプロバイダーに対応する W\&B 管理の Terraform モジュールを確認します。上の表を参照して、適切なモジュールを見つけてください。

2. 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 の ワークスペース ディレクトリーで以下を実行してください。

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

## Helm を使用した更新

### スペックによる W\&B の更新

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}
   ```

### ライセンスとバージョンを直接更新する

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) を参照してください。

## 管理 UI による更新

このメソッドは、W\&B サーバーコンテナの環境変数でライセンスが設定されていない場合にのみ機能します。通常、セルフマネージド Docker インストールが該当します。

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