アップグレード#

アプリケーションの新しいバージョンが利用可能になった場合、必要に応じてアプリケーションのアップグレードを行ってください。

各アプリケーションのバージョン番号はセマンティックバージョニングに準拠しており、以下の方針に従って付与されています。

バージョン

1.0.0の次のバージョンの例

互換

DBマイグレーション

説明

メジャーアップデート

2.0.0

X

必要

アプリケーションの後方互換が崩れる更新。バージョンごとのアップグレードガイドに従って更新する。

マイナーアップデート

1.1.0

O

場合により必要

機能追加が伴う更新。 基本アップグレード手順 にしたがって更新を行う。

パッチアップデート

1.0.1

O

不要

不具合修正の更新。 基本アップグレード手順 にしたがって更新を行う。

基本アップグレード手順#

  1. 使用するイメージのバージョンを上げます。( deployment.zip を使用している場合は、環境変数の IMAGE_REPOSITORY_BASE や各サービスのイメージタグの指定を変更します。)

  2. イメージをPullし起動します。

注釈

マイナーアップデートの場合はリポジトリが変わる可能性があります。必要に応じてイメージのURLも変更してください。

注釈

以下は概要です。 詳細については 特定バージョンへのアップグレード手順 を参照してください。

  1. 次のコマンドでRPMを更新します。

    dnf update \
      intdash-api-auth \
      intdash-api-auth-oauth2 \
      intdash-api-broker \
      intdash-api-converter \
      intdash-api-gateway \
      intdash-api-license \
      intdash-api-measurement \
      intdash-api-media \
      intdash-api-tenant \
      intdash-api-webhook \
      intdash-ffmpeg \
      intdash-nginx \
      intdash-web-admin-console \
      intdash-web-authentication \
      intdash-web-device-management-console \
      intdash-web-edge-finder \
      intdash-web-meas-converter \
      intdash-web-meas-hub \
      intdash-web-media-explorer \
      intdash-web-my-page \
      intdash-web-project-console \
      intdash-web-tenants \
      vm2m-data-viz \
      vm2m-data-viz-backend \
      vm2m-data-viz-plugins-core
    

    注釈

    メジャーアップデートまたはマイナーアップデートの場合はリポジトリが変わる可能性があります。必要に応じて /etc/yum.repos.d/intdash.repo の更新も行ってください。

  2. DBのマイグレーションを行います。

    sudo -u intdash intdashd db migrate -c /etc/intdash/intdashd.conf
    sudo -u intdash authd db migrate -c /etc/intdash/authd.conf
    sudo -u intdash brokerd db migrate -c /etc/intdash/brokerd.conf
    sudo -u intdash measurementd db migrate -c /etc/intdash/measurementd.conf
    sudo -u intdash mediad db migrate -c /etc/intdash/mediad.toml
    sudo -u intdash webhookd db migrate -c /etc/intdash/webhookd.conf
    sudo -u intdash licensed db migrate -c /etc/intdash/licensed.conf
    sudo -u intdash converterd db migrate -c /etc/intdash/converterd.conf
    sudo -u intdash datavizd db migrate -c /etc/vm2m-data-viz-backend/datavizd.conf
    

    エラーが発生した場合は DBマイグレーションに失敗した場合 を参照してください。

  3. サービスの再起動を行います。

    systemctl restart nginx.service
    systemctl restart intdash-api-auth-oauth2.service
    systemctl restart intdash-api-auth.service
    systemctl restart intdash-api-broker.service
    systemctl restart intdash-api-converter-worker.service
    systemctl restart intdash-api-converter.service
    systemctl restart intdash-api-gateway.service
    systemctl restart intdash-api-license.service
    systemctl restart intdash-api-measurement.service
    systemctl restart intdash-api-media.service
    systemctl restart intdash-api-tenant.service
    systemctl restart intdash-api-webhook.service
    systemctl restart intdash-web-meas-hub-cfgidxgen.service
    systemctl restart intdash-web-project-console-cfgidxgen.service
    systemctl restart intdash-web-tenants.service
    systemctl restart vm2m-data-viz-backend.service
    

最新版のHelmチャートの values.yaml を確認し、必要に応じて変更します。Helmチャートの values.yaml の出力方法については Kubernetes(Helm チャート) を参照してください。

次のコマンドを実行してHelmチャートを最新にします。

helm upgrade intdash oci://"<Helmチャートのレジストリ:例 000000000000.dkr.ecr.us-east-1.amazonaws.com>"/charts/intdash \
--version "<チャートのバージョン:例 v1.0.0>" \
-f <values.yamlのパス>

注釈

特定のイメージをパッチバージョンに変更したい場合などには、イメージの指定のみを変更することが可能です。 使用するイメージを変更する場合は values.yaml で、各サービスやアプリケーションの tag を変更します。

...

intdashApiGateway:
  image:
    tag: ""  <---- 任意のタグ:例 v2.5.0

Helmチャートによる更新の場合は、データベースのマイグレーションは、Pod起動時のinitContainerにより実行されます。 データベースのマイグレーションが成功しているかPodのログで確認してください。 もしエラーが出ている場合は DBマイグレーションに失敗した場合 を参照してください。

注釈

initContainerによるデータベースのマイグレーションは設定により変更が可能です。 詳細は Kubernetes環境でのデータベースマイグレーション設定 を確認してください。

特定バージョンへのアップグレード手順#

2025R1から2026R1へのアップグレード(RPM)#

アップグレードを適用する#

  1. テキストエディターでリポジトリ定義ファイルを開きます。

    vi /etc/yum.repos.d/intdash.repo
    
  2. baseurl を以下のように 202609 のものに変更し、リポジトリ定義ファイルを閉じます。

    [intdash]
    ...
    baseurl=https://repository.aptpod.jp/intdash/202609/linux/rpm
    ...
    
  3. パッケージ管理に関するメタデータを削除します。

    dnf clean metadata
    
  4. EPELリポジトリを設定します。2026R1の intdash-web-meas-hub と intdash-web-project-console は、EPELで提供される inotify-tools に依存します。すでに設定済みの場合、この手順は不要です。

    dnf install -y epel-release
    

    上記はRocky Linux 9の場合の例です。詳細は intdashサーバーの動作に必要なその他のソフトウェア を参照してください。

  5. ソフトウェアを更新します。

    dnf install \
      intdash-api-auth \
      intdash-api-auth-oauth2 \
      intdash-api-broker \
      intdash-api-converter \
      intdash-api-gateway \
      intdash-api-license \
      intdash-api-measurement \
      intdash-api-media \
      intdash-api-tenant \
      intdash-api-webhook \
      intdash-ffmpeg \
      intdash-nginx \
      intdash-web-admin-console \
      intdash-web-authentication \
      intdash-web-device-management-console \
      intdash-web-edge-finder \
      intdash-web-meas-converter \
      intdash-web-meas-hub \
      intdash-web-media-explorer \
      intdash-web-my-page \
      intdash-web-project-console \
      intdash-web-tenants \
      vm2m-data-viz \
      vm2m-data-viz-backend \
      vm2m-data-viz-plugins-core
    

    設定ファイルを更新する必要がある場合、既存の設定ファイルと同じ階層に .rpmnew という拡張子を持つ新しいデフォルトの設定ファイルが作成され、以下のように警告が表示されます。

    warning: /etc/intdash/example.conf created as /etc/intdash/example.conf.rpmnew
    

    これについては、この後の手順で対応します。

  6. 不要になったパッケージ、リポジトリ定義、設定ファイルを削除します。

    2026R1では、intdash Web ConsoleアプリケーションがNode.jsを使用しなくなりました。Node.jsをほかの用途で使用していない場合は、Node.jsとそのリポジトリ定義を削除します。

    dnf remove nodejs
    rm -i /etc/yum.repos.d/nodesource-*
    

    また、2026R1では各アプリケーションの /etc/sysconfig 配下の設定ファイルが使用されなくなりました。アップグレード時に .rpmsave として残った設定ファイルを削除します(ファイルが存在しない場合、削除は不要です)。

    rm -i /etc/sysconfig/intdash-web-admin-console.rpmsave
    rm -i /etc/sysconfig/intdash-web-authentication.rpmsave
    rm -i /etc/sysconfig/intdash-web-device-management-console.rpmsave
    rm -i /etc/sysconfig/intdash-web-edge-finder.rpmsave
    rm -i /etc/sysconfig/intdash-web-meas-converter.rpmsave
    rm -i /etc/sysconfig/intdash-web-meas-hub.rpmsave
    rm -i /etc/sysconfig/intdash-web-media-explorer.rpmsave
    rm -i /etc/sysconfig/intdash-web-my-page.rpmsave
    rm -i /etc/sysconfig/intdash-web-project-console.rpmsave
    
  7. 設定ファイルを更新します。

    • .rpmnew が作成された場合は、既存の設定ファイルの内容と .rpmnew の内容を比較し、既存の設定ファイルに新しい設定を反映してください。

    • 2026R1で追加された以下の設定については、環境ごとに値を生成して設定する必要があります。

      • Authentication Service ( /etc/intdash/authd.conf )

        [totp] の encryption-key 。多要素認証で認証アプリによるワンタイムパスワード(TOTP)を使用する場合に設定します。この値が空の場合、TOTPによる多要素認証は無効になります。設定方法はRPMによる構築手順 Authentication Service を参照してください。

      • Broker Service ( /etc/intdash/brokerd.conf )

        [iscp.resume-token] の secret-key 。この値が空の場合、Resume Tokenはメモリー上でのみ管理されるため、サービスを再起動するとすべてのResume Tokenが無効になります。設定方法はRPMによる構築手順 Broker Service を参照してください。

      • Measurement Service ( /etc/intdash/measurementd.conf )

        [persister-config] の encryption-key 。永続化モジュールの設定がBroker ServiceからMeasurement Serviceに移管されたことに伴い必要になります。この後の 永続化モジュールの設定を移行する を参照してください。

データベースのマイグレーション#

  1. データベーススキーマを更新します。

    sudo -u intdash intdashd db migrate -c /etc/intdash/intdashd.conf
    sudo -u intdash authd db migrate -c /etc/intdash/authd.conf
    sudo -u intdash brokerd db migrate -c /etc/intdash/brokerd.conf
    sudo -u intdash measurementd db migrate -c /etc/intdash/measurementd.conf
    sudo -u intdash mediad db migrate -c /etc/intdash/mediad.toml
    sudo -u intdash webhookd db migrate -c /etc/intdash/webhookd.conf
    sudo -u intdash licensed db migrate -c /etc/intdash/licensed.conf
    sudo -u intdash converterd db migrate -c /etc/intdash/converterd.conf
    sudo -u intdash datavizd db migrate -c /etc/vm2m-data-viz-backend/datavizd.conf
    

重要

Measurement Serviceのマイグレーションでは、 meas_serial_number 、 meas_sequence_chunk 、 trashed_meas_sequence_chunk の各テーブルのID列の型が変更されます( integer から bigint )。これらのテーブルのレコード数が多い環境では、マイグレーションに時間がかかり、その間テーブルがロックされます。アップグレードの停止時間を見積もる際は、事前に検証環境で所要時間を確認してください。

永続化モジュールの設定を移行する#

2026R1では、永続化モジュールの設定( persister_config )がBroker ServiceからMeasurement Serviceに移管されました。既存の設定は、Broker Serviceの起動時にMeasurement Serviceへ自動的に同期されます。

APIのパスは変更されていないため、永続化モジュールの設定を操作しているクライアントの変更は不要です。

  1. Measurement Serviceの設定ファイル ( /etc/intdash/measurementd.conf ) に、永続化モジュール用の暗号化キーを設定します。この値は32文字にする必要があります。Broker Serviceの値と同じにする必要はありません。

    ...
    [persister-config]
      encryption-key = '' <---- 新しいランダム文字列(32文字)
      ...
    
  2. Broker Serviceの設定ファイル ( /etc/intdash/brokerd.conf ) の [persister-config] は変更しません。

    重要

    Broker Serviceの [persister-config] の encryption-key を変更しないでください。Broker Serviceは、この値を使ってデータベースに保存されている認証情報を復号してからMeasurement Serviceへ送信します。値を変更すると復号に失敗し、移行が中断されます。

  3. Measurement ServiceとBroker Serviceを起動します。起動順序は問いません。Broker ServiceがMeasurement ServiceのAPIを使用して同期を行いますが、Broker Serviceが先に起動した場合も、同期が成功するまで5秒間隔で再試行されます。

  4. Broker Serviceのログで、同期が完了したことを確認します。

    Finished syncing persister configs to measurement service
    

    復号に失敗した場合は、以下のようなログが5秒間隔で繰り返し出力され、同期が完了しません。この場合は、Broker Serviceの encryption-key が移行前の値のままであることを確認してください。

    persister config sync failed, retrying: sync tenant 1: [tenant:1] all 3 DB records failed to decrypt, check encryption-key configuration
    

アップグレードに伴う作業を行う#

  1. 2026R1で追加されたサービスを有効化します。

    systemctl enable intdash-web-meas-hub-cfgidxgen.service
    systemctl enable intdash-web-project-console-cfgidxgen.service
    
  2. サービスを再起動します。

    systemctl restart nginx.service
    systemctl restart intdash-api-auth-oauth2.service
    systemctl restart intdash-api-auth.service
    systemctl restart intdash-api-broker.service
    systemctl restart intdash-api-converter-worker.service
    systemctl restart intdash-api-converter.service
    systemctl restart intdash-api-gateway.service
    systemctl restart intdash-api-license.service
    systemctl restart intdash-api-measurement.service
    systemctl restart intdash-api-media.service
    systemctl restart intdash-api-tenant.service
    systemctl restart intdash-api-webhook.service
    systemctl restart intdash-web-meas-hub-cfgidxgen.service
    systemctl restart intdash-web-project-console-cfgidxgen.service
    systemctl restart intdash-web-tenants.service
    systemctl restart vm2m-data-viz-backend.service
    

アップグレードに伴う変更点#

2026R1では、アップグレード後の動作が以下のように変わります。

対象

変更内容

Measurement Service

計測アップロードの同時実行数( [upload.pipeline] の max-concurrent-uploads )のデフォルト値が3から1に変更されました。設定ファイルでこの値を指定していない環境では、アップロードの同時実行数が減少します。従来と同じ同時実行数を維持する場合は、設定ファイルで明示的に指定してください。

Media Service

動画の変換に使用するffmpegのバージョンが更新されました( intdash-ffmpeg パッケージ)。

2025R1から2026R1へのアップグレード(Kubernetes)#

基本アップグレード手順 のKubernetesの手順に従ってHelmチャートを更新します。その際、2026R1で追加された以下の設定を確認してください。

設定

内容

intdashApiAuth.totpEncryptionKey

多要素認証で使用するTOTPシークレットの暗号化キー。指定しない場合は Secret リソースが自動的に作成されます。

intdashApiBroker.iscpResumeTokenSecretKey

Resume TokenのHMAC署名用シークレットキー。指定しない場合は Secret リソースが自動的に作成されます。

永続化モジュールの設定の移行については、上記 永続化モジュールの設定を移行する を参照してください。Podの起動順序は問いません。Broker ServiceのPodが先に起動した場合も、同期が成功するまで5秒間隔で再試行されます。

重要

フロントエンドアプリケーションの構成が変更され、各アプリケーションはGatewayのイメージに含まれるようになりました。これに伴い、Helmチャートではフロントエンドアプリケーションごとの Deployment が intdashWebGateway に統合されています。 values.yaml でフロントエンドアプリケーションごとの image や ingress を指定している場合は、設定を見直してください。

2024R1から2025R1へのアップグレード(RPM)#

アップグレードを適用する#

  1. テキストエディターでリポジトリ定義ファイルを開きます。

    vi /etc/yum.repos.d/intdash.repo
    
  2. baseurl を以下のように 202504 のものに変更し、リポジトリ定義ファイルを閉じます。

    [intdash]
    ...
    baseurl=https://repository.aptpod.jp/intdash/202504/linux/rpm
    ...
    
  3. パッケージ管理に関するメタデータを削除します。

    dnf clean metadata
    
  4. 新しいバージョンのソフトウェアと、新規で追加するソフトウェアをインストールします。

    dnf install \
      intdash-api-auth \
      intdash-api-auth-oauth2 \
      intdash-api-broker \
      intdash-api-converter \
      intdash-api-gateway \
      intdash-api-license \
      intdash-api-measurement \
      intdash-api-media \
      intdash-api-tenant \
      intdash-api-webhook \
      intdash-ffmpeg \
      intdash-nginx \
      intdash-web-admin-console \
      intdash-web-authentication \
      intdash-web-device-management-console \
      intdash-web-edge-finder \
      intdash-web-meas-converter \
      intdash-web-meas-hub \
      intdash-web-media-explorer \
      intdash-web-my-page \
      intdash-web-project-console \
      intdash-web-tenants \
      vm2m-data-viz \
      vm2m-data-viz-backend \
      vm2m-data-viz-plugins-core
    

    設定ファイルを更新する必要がある場合、既存の設定ファイルと同じ階層に .rpmnew という拡張子を持つ新しいデフォルトの設定ファイルが作成され、以下のように警告が表示されます。

    warning: /etc/intdash/example.conf created as /etc/intdash/example.conf.rpmnew
    

    これについては、次の手順で対応します。

  5. 設定ファイルを更新します。

    • 前の手順で .rpmnew が作成された場合は、既存の設定ファイルの内容と .rpmnew の内容を比較し、既存の設定ファイルに新しい設定を反映してください。

    • 新規で追加された以下のソフトウェアについては設定ファイルで設定を行ってください。

      • intdash-api-auth-oauth2

        /etc/intdash/oauth2-proxy.cfg および /etc/intdash/oauth2-proxy.yml (RPMによる構築手順 Authentication OAuth2 Service 参照)

      • intdash-api-converter

        /etc/intdash/converterd.conf (RPMによる構築手順 Converter Service 参照)

      • intdash-api-converter-worker

        /etc/intdash/converterd-worker.conf (RPMによる構築手順 Converter Worker Service 参照)

      • intdash-web-meas-converter

        /etc/sysconfig/intdash-web-meas-converter (設定リファレンス Meas Converterの設定 参照)

  6. 不要になったソフトウェアと設定ファイルを削除します。

    dnf remove \
      intdash-web-client-auth \
      intdash-web-client-auth-redirector
    
    rm -i /etc/sysconfig/intdash-web-client-auth*
    rm -i /etc/nginx/intdash.d/intdash-web-client-auth.conf*
    rm -i /etc/nginx/intdash.d/intdash-web-client-auth-redirector.conf*
    

データベースのマイグレーション#

  1. PostgreSQLの設定をするために psql コマンドで対話型シェルを起動します。

    sudo -u postgres psql -d template1
    
  2. データベースを追加します。

    CREATE DATABASE "intdash-api-converter" OWNER "intdash";
    
  3. \q を入力して psql コマンドを終了します。

  4. データベーススキーマを更新します。

    sudo -u intdash intdashd db migrate -c /etc/intdash/intdashd.conf
    sudo -u intdash authd db migrate -c /etc/intdash/authd.conf
    sudo -u intdash brokerd db migrate -c /etc/intdash/brokerd.conf
    sudo -u intdash measurementd db migrate -c /etc/intdash/measurementd.conf
    sudo -u intdash mediad db migrate -c /etc/intdash/mediad.toml
    sudo -u intdash webhookd db migrate -c /etc/intdash/webhookd.conf
    sudo -u intdash licensed db migrate -c /etc/intdash/licensed.conf
    sudo -u intdash converterd db migrate -c /etc/intdash/converterd.conf
    sudo -u intdash datavizd db migrate -c /etc/vm2m-data-viz-backend/datavizd.conf
    

アップグレードに伴う作業を行う#

  1. 追加されたサービスが自動起動するように設定します。

    systemctl enable intdash-api-auth-oauth2.service
    systemctl enable intdash-api-converter.service
    systemctl enable intdash-api-converter-worker.service
    systemctl enable intdash-web-meas-converter.service
    
  2. サービスを再起動します。

    systemctl restart intdash-api-auth-oauth2.service
    systemctl restart intdash-api-auth.service
    systemctl restart intdash-api-broker.service
    systemctl restart intdash-api-converter-worker.service
    systemctl restart intdash-api-converter.service
    systemctl restart intdash-api-gateway.service
    systemctl restart intdash-api-license.service
    systemctl restart intdash-api-measurement.service
    systemctl restart intdash-api-media.service
    systemctl restart intdash-api-tenant.service
    systemctl restart intdash-api-webhook.service
    systemctl restart intdash-web-admin-console.service
    systemctl restart intdash-web-authentication.service
    systemctl restart intdash-web-device-management-console.service
    systemctl restart intdash-web-edge-finder.service
    systemctl restart intdash-web-meas-converter.service
    systemctl restart intdash-web-meas-hub.service
    systemctl restart intdash-web-media-explorer.service
    systemctl restart intdash-web-my-page.service
    systemctl restart intdash-web-project-console.service
    systemctl restart intdash-web-tenants.service
    systemctl restart vm2m-data-viz-backend.service
    systemctl restart nginx.service
    
  3. 動画のサムネイル画像を生成します。

    sudo -u intdash mediad create_thumbnail -c /etc/intdash/mediad.toml
    
  4. NATSをセットアップします。

    sudo -u intdash converterd pubsub setup -c /etc/intdash/converterd.conf
    
  5. 2025R1のアクティベーションキーを、Authentication Serviceの設定ファイル (/etc/intdash/authd.conf) の以下の箇所に設定します。

    [license]
      ...
      [license.online]
        activation-key = ''    <---- 2025R1のアクティベーションキー
    
  6. (intdash-api-broker.serviceが起動しない場合のみ)NATSのストリームを作成し直します。

    まず、NATSのユーザー名とパスワードを変数に入れます。

    export NATS_USER=intdash
    read -s NATS_PASSWORD
    <-- ここで、NATSユーザー'intdash'に設定されたパスワード(Bcryptハッシュ化前のもの)を入力してEnterを押します。
    
    export NATS_PASSWORD
    

    次に、 nats コマンドでNATSのストリームを削除し[1]、Broker Serviceを再起動することでストリームを再作成します。

    nats stream rm iscp-reliable
    systemctl restart intdash-api-broker.service
    

以上で、2024R1から2025R1へのアップグレードの手順は完了です。

2023R2から2024R1へのアップグレード(RPM)#

アップグレードを適用する#

  1. テキストエディターでリポジトリ定義ファイルを開きます。

    vi /etc/yum.repos.d/intdash.repo
    
  2. 以下の個所を編集します。その後、設定ファイルを閉じます。

    • [intdash]セクション

      • baseurl を更新

      • username, password を削除

    [intdash]
    ...
    baseurl=https://repository.aptpod.jp/intdash/202404/linux/rpm
    #username=XXXXXXXX   <---- 削除
    #password=XXXXXXXX   <---- 削除
    ...
    
  3. パッケージ管理に関するメタデータを削除します。

    dnf clean metadata
    
  4. 新しいバージョンのソフトウェアと、新規で追加するソフトウェアをインストールします。

    dnf install \
      intdash-api-auth \
      intdash-api-broker \
      intdash-api-gateway \
      intdash-api-license \
      intdash-api-measurement \
      intdash-api-media \
      intdash-api-tenant \
      intdash-api-webhook \
      intdash-ffmpeg \
      intdash-nginx \
      intdash-web-admin-console \
      intdash-web-authentication \
      intdash-web-client-auth \
      intdash-web-client-auth-redirector \
      intdash-web-device-management-console \
      intdash-web-edge-finder \
      intdash-web-meas-hub \
      intdash-web-media-explorer \
      intdash-web-my-page \
      intdash-web-project-console \
      intdash-web-tenants \
      vm2m-data-viz \
      vm2m-data-viz-backend \
      vm2m-data-viz-plugins-core
    

    設定ファイルを更新する必要がある場合、このコマンドの出力に警告が表示されます。

  5. 設定ファイルを更新します。

    設定ファイルを更新する必要がある場合、既存の設定ファイルと同じ階層に、 .rpmnew という拡張子が付与された新しいデフォルトの設定ファイルが作成されます。 既存の設定ファイルの内容と .rpmnew の内容を比較し、設定ファイルに新しい設定を反映してください。

    新規で追加された下記のソフトウェアについては、設定を行ってください。

    • intdash-api-license

    • intdash-web-device-management-console

    設定については 設定リファレンス を参照してください。

アップグレードに伴う作業を行う#

  1. データベーススキーマを更新します。

    sudo -u intdash intdashd db migrate -c /etc/intdash/intdashd.conf
    sudo -u intdash authd db migrate -c /etc/intdash/authd.conf
    sudo -u intdash brokerd db migrate -c /etc/intdash/brokerd.conf
    sudo -u intdash measurementd db migrate -c /etc/intdash/measurementd.conf
    sudo -u intdash mediad db migrate -c /etc/intdash/mediad.toml
    sudo -u intdash webhookd db migrate -c /etc/intdash/webhookd.conf
    sudo -u intdash licensed db migrate -c /etc/intdash/licensed.conf
    sudo -u intdash datavizd db migrate -c /etc/vm2m-data-viz-backend/datavizd.conf
    
  2. 追加されたサービスが自動起動するように設定します。

    systemctl enable intdash-api-license.service
    systemctl enable intdash-web-device-management-console.service
    
  3. サービスを再起動します。

    systemctl restart intdash-api-auth.service
    systemctl restart intdash-api-broker.service
    systemctl restart intdash-api-gateway.service
    systemctl restart intdash-api-license.service
    systemctl restart intdash-api-measurement.service
    systemctl restart intdash-api-media.service
    systemctl restart intdash-api-tenant.service
    systemctl restart intdash-api-webhook.service
    systemctl restart intdash-web-admin-console.service
    systemctl restart intdash-web-authentication.service
    systemctl restart intdash-web-client-auth-redirector.service
    systemctl restart intdash-web-client-auth.service
    systemctl restart intdash-web-device-management-console.service
    systemctl restart intdash-web-edge-finder.service
    systemctl restart intdash-web-meas-hub.service
    systemctl restart intdash-web-media-explorer.service
    systemctl restart intdash-web-my-page.service
    systemctl restart intdash-web-project-console.service
    systemctl restart intdash-web-tenants.service
    systemctl restart vm2m-data-viz-backend.service
    systemctl restart nginx.service
    

2023R1から2023R2へのアップグレード(RPM)#

2023R2では推奨OSがAmazon Linux 2からRocky Linux 9へ変更されました。2023R1から2023R2への環境の移行は次のような手順で行います。

  1. 移行先の環境を準備します。移行先では2023R2の推奨構成に従い環境を構築します(RPMによるインストール手順 参照)。移行先のintdashやWebアプリケーションサービスはすべて止めておきます。

  2. 移行元の環境を停止します。

  3. ミドルウェアのデータの移行を行います。移行元のミドルウェアのバックアップを取ります。(特定ミドルウェアの論理バックアップとリストア 参照)

  4. 移行先のミドルウェアでリストアを行います。(特定ミドルウェアの論理バックアップとリストア 参照)

  5. APIのデータ移行を行います。移行元の各種サーバーの設定ファイルを移行先にコピーします (ファイルについては 設定リファレンス 参照)。2023R2向けに設定ファイルも修正します。

  6. 移行元のサーバー証明書を移行先へコピーします。

  7. (任意)ログをコピーします。ログの出力先は ログの確認 を参照してください。

  8. その他環境独自の設定などがあれば必要に応じて移行先へコピーします。

  9. 移行先のintdashやWebアプリケーションを起動します。

  10. DNSの設定を変更します。ドメインの向き先を移行先へ切り替えます。

    注釈

    ファイルの移動時には所有権にご注意ください。

移行後は移行先の環境において動作確認を行い、想定通りの挙動か、ログでエラーは出ていないかなどを確認します。

アップグレードTips#

Kubernetes環境でのデータベースマイグレーション設定#

Helmチャートによりインストールされた環境の場合、データベースのマイグレーションはデフォルトではPodの起動時のinitContainerにより実行されます。 この動作は values.yaml により変更が可能です。必要に応じて変更します。

バックエンドサービス全体の設定

intdashService:
  migration:
    job: false <---- trueの場合、Job でマイグレーションを実行する
    initContainer: true <---- trueの場合、Container でマイグレーションを実行する

個別のサービスの設定(Measurement Serviceの例)

intdashApiMeasurement:
  migration:
    job: false <---- trueの場合、Job でマイグレーションを実行する
    initContainer: true <---- trueの場合、Container でマイグレーションを実行する

DBマイグレーションに失敗した場合#

マイグレーションが失敗しているサービスのログを確認し、失敗した理由を調査します。 失敗した原因を解消できたら、以下の手順でマイグレーションを再実行してください。

マイグレーションの再実行には、対象のサービスの実行ファイル名が必要です。実行ファイル名の一覧は次の通りです。

サービス名

実行ファイル名

Kubernetes環境のPod内のパス

RPM環境でのパス

intdash APIサービス

intdashd

/srv/intdash-api

/usr/bin

Measurement Service

measurementd

/srv/measurement

/usr/bin

Authentication Service

authd

/srv/auth

/usr/bin

Broker Service

brokerd

/srv/broker

/usr/bin

Media Service

mediad

/srv/media

/usr/bin

Webhook Service

webhookd

/srv/webhook

/usr/bin

License Service

licensed

/srv/license

/usr/bin

Data Visualizer Backend Service

datavizd

/srv/dataviz

/usr/bin

また、実行には正しい設定ファイルを指定する必要があります。設定ファイルの場所については 設定リファレンス を参照してください。

警告

Kubernetes環境で本手順を実施する場合は、最初に データベースのマイグレーションを無効化してください。 values.yaml を次のように設定し、helm upgrade を実施します。

intdashService:
  migration:
    job: false <----
    initContainer: false <----
  1. アプリケーションが使用している現在のスキーマのバージョンを確認します。

    # 現在のDBのスキーマバージョンを確認
    <アプリケーションの実行ファイル> db -c <設定ファイルのパス> version
    

    注釈

    Kubernetesの場合は kubectl を使うことでコンテナ内でコマンドを実行することができます。 以下は、 measurementd コマンドを実行している例です。

    kubectl exec -it <サービスのPod> -- /srv/measurement/measurementd db -c <設定ファイルのパス> version
    

    以下のような結果が出力されます。

    # スキーマバージョンを23から24に変更するときの出力例
    ## 正常時
    {"level":"info","ts":"2023-04-24T23:37:01.122529969Z","caller":"db/version.go:23","msg":"current[24] latest[24]"}
    
    ## マイグレーション未実施
    {"level":"info","ts":"2023-04-24T23:39:08.566724316Z","caller":"db/version.go:23","msg":"current[23] latest[24]"}
    {"level":"error","ts":"2023-04-24T23:39:08.566756113Z","caller":"authd/main.go:40","msg":"unmatch latest version and current version ...省略
    
    
    ## マイグレーションが失敗
    {"level":"info","ts":"2023-04-24T23:40:36.388985155Z","caller":"db/version.go:23","msg":"current[24] latest[24]"}
    {"level":"error","ts":"2023-04-24T23:40:36.389022751Z","caller":"authd/main.go:40","msg":"unmatch latest version and current version:...省略
    
  2. マイグレーションに失敗している場合は、スキーマをマイグレーション実施前のバージョンに戻します。通常は1つ前のバージョンで問題ありません。

    # スキーマバージョンを23に強制的に戻す
    <アプリケーションの実行ファイル> db -c <設定ファイルのパス> set 23
    

    注釈

    set サブコマンドはバージョン管理テーブルのバージョンを更新します。アプリケーションデータの変更は実施されません。

  3. マイグレーションを再実行します。

    # 最新のバージョンまでマイグレート
    <アプリケーションの実行ファイル> db -c <設定ファイルのパス> migrate
    

成功すれば完了です。

アプリケーションが起動しない場合#

アプリケーションが起動しない理由はいくつか考えられますが、意図した設定になっていないケースがほとんどです。

どの設定に原因があるのか特定するために起動ログを確認してください。 起動ログから原因を調査し、設定を変更します。

設定変更後、アプリケーションを再起動してください。