4.3. 管理 CLI の移行操作

管理 CLI を使用して、JBoss EAP 7 上で実行するよう JBoss EAP 6 のサーバー設定ファイルを更新することができます。管理 CLI では、jacorbmessaging、および web サブシステムを以前のリリースから新しい設定へ自動的に更新する migrate 操作を実行できます。また、 jacorbmessaging、および web サブシステムに describe-migration 操作を実行すると、移行を行う前に提案された移行設定の変更を確認することもできます。cmpjaxr、および threads サブシステムの代替はないため、これらのサブシステムをサーバー設定から削除する必要があります。

重要

サーバー設定移行オプション」で migrate 操作の制限を確認してください。既存の設定を保持しながら、設定を更新して JBoss EAP 7 の新機能および設定を追加する場合は、JBoss Server Migration Tool を使用することが推奨されます。このツールの設定および実行方法に関する詳細は、『Using the JBoss Server Migration Tool』を参照してください。

表4.1 サブシステムの移行および管理 CLI 操作

JBoss EAP 6 サブシステムJBoss EAP 7 サブシステム管理 CLI 操作

cmp

代替なし

remove

jacorb

iiop-openjdk

migrate

jaxr

代替なし

remove

messaging

messaging-activemq

migrate

threads

代替なし

remove

web

undertow

migrate

サーバーおよび管理 CLI の起動

以下の手順に従って、JBoss EAP 7 上で実行されるよう JBoss EAP 6 のサーバー設定を更新します。

  1. 移行を始める前に、「重要データのバックアップおよびサーバー状態の確認」の内容を見直してください。ここには、サーバーを良好な状態にし、適切なファイルをバックアップするための重要な情報が記載されています。
  2. JBoss EAP 6 の設定で JBoss EAP 7 のサーバーを起動します。

    1. JBoss EAP 7 サーバー設定ファイルをバックアップします。
    2. 以前のリリースの設定ファイルを JBoss EAP 7 ディレクトリーにコピーします。

      $ cp EAP6_HOME/standalone/configuration/standalone-full.xml EAP7_HOME/standalone/configuration
    3. JBoss EAP 7 のインストールディレクトリーへ移動し、--start-mode=admin-only 引数を使用してサーバーを起動します。

      $ bin/standalone.sh -c standalone-full.xml --start-mode=admin-only
      注記

      サーバーを起動すると、以下の org.jboss.as.controller.management-operation エラーがサーバーログに記録されます。これらのエラーは予期されたエラーで、レガシーサブシステムの設定を削除するか JBoss EAP 7 に移行する必要があることを示しています。

      • WFLYCTL0402: Subsystems [cmp] provided by legacy extension 'org.jboss.as.cmp' are not supported on servers running this version.Both the subsystem and the extension must be removed or migrated before the server will function.
      • WFLYCTL0402: Subsystems [jacorb] provided by legacy extension 'org.jboss.as.jacorb' are not supported on servers running this version.Both the subsystem and the extension must be removed or migrated before the server will function.
      • WFLYCTL0402: Subsystems [jaxr] provided by legacy extension 'org.jboss.as.jaxr' are not supported on servers running this version.Both the subsystem and the extension must be removed or migrated before the server will function.
      • WFLYCTL0402: Subsystems [messaging] provided by legacy extension 'org.jboss.as.messaging' are not supported on servers running this version.Both the subsystem and the extension must be removed or migrated before the server will function.
      • WFLYCTL0402: Subsystems [threads] provided by legacy extension 'org.jboss.as.threads' are not supported on servers running this version.Both the subsystem and the extension must be removed or migrated before the server will function.
      • WFLYCTL0402: Subsystems [web] provided by legacy extension 'org.jboss.as.web' are not supported on servers running this version.Both the subsystem and the extension must be removed or migrated before the server will function.
  3. 新しいターミナルを開いて、JBoss EAP 7 のインストールディレクトリーへ移動し、--controller=remote://localhost:9990 引数を使用して管理 CLI を開始します。

    $ bin/jboss-cli.sh --connect --controller=remote://localhost:9990

JacORB、Messaging、および Web サブシステムの移行

  1. 移行を行う前にサブシステムに追加した設定変更を確認するには、describe-migration 操作を実行します。

    describe-migration 操作では以下の構文を使用します。

    /subsystem=SUBSYSTEM_NAME:describe-migration

    以下の例は、JBoss EAP 7 への移行時に JBoss EAP 6.4 の standalone-full.xml 設定ファイルに加えられる設定の変更を示しています。見やすくするため、エントリーは出力から削除されています。

    例: describe-migration 操作

    /subsystem=messaging:describe-migration
    {
        "outcome" => "success",
        "result" => {
            "migration-warnings" => [],
            "migration-operations" => [
                {
                    "operation" => "add",
                    "address" => [("extension" => "org.wildfly.extension.messaging-activemq")],
                    "module" => "org.wildfly.extension.messaging-activemq"
                },
                {
                    "operation" => "add",
                    "address" => [("subsystem" => "messaging-activemq")]
                },
                <!-- *** Entries removed for readability *** -->
                {
                    "operation" => "remove",
                    "address" => [("subsystem" => "messaging")]
                },
                {
                    "operation" => "remove",
                    "address" => [("extension" => "org.jboss.as.messaging")]
                }
            ]
        }
    }

  2. migrate 操作を実行し、サブシステムの設定を JBoss EAP 7 の代替サブシステムに移行します。この操作では以下の構文を使用します。

    /subsystem=SUBSYSTEM_NAME:migrate
    注記

    messaging サブシステムの describe-migration および migrate 操作を使用すると、引数を渡してレガシークライアントによるアクセスを設定することができます。コマンド構文の詳細は、「Messaging サブシステムの移行および前方互換性」を参照してください。

  3. このコマンドの結果を確認します。必ず、操作が正常に完了し、"migration-warning" エントリーがないことを確認してください。これは、サブシステムの移行設定が完了したことを意味します。

    例: 警告のない成功した migrate 操作

    /subsystem=messaging:migrate
    {
        "outcome" => "success",
        "result" => {"migration-warnings" => []}
    }

    サーバー設定の移行が正常に完了したにも関わらず、すべての要素と属性を移行できなかった場合、ログに "migration-warnings" エントリーが表示されます。"migration-warnings" が示す提案に従い、追加の管理 CLI コマンドを実行してこれらの設定を編集する必要があります。"migration-warnings" を返す migrate 操作の例を以下に示します。

    例: 警告のある migrate 操作

    /subsystem=messaging:migrate
    {
        "outcome" => "success",
        "result" => {"migration-warnings" => [
            "WFLYMSG0080: Could not migrate attribute group-address from resource [
        (\"subsystem\" => \"messaging-activemq\"),
        (\"server\" => \"default\"),
        (\"broadcast-group\" => \"groupB\")
    ]. Use instead the socket-binding attribute to configure this broadcast-group.",
            "WFLYMSG0080: Could not migrate attribute group-port from resource [
        (\"subsystem\" => \"messaging-activemq\"),
        (\"server\" => \"default\"),
        (\"broadcast-group\" => \"groupB\")
    ]. Use instead the socket-binding attribute to configure this broadcast-group.",
            "WFLYMSG0080: Could not migrate attribute local-bind-address from resource [
        (\"subsystem\" => \"messaging-activemq\"),
        (\"server\" => \"default\"),
        (\"broadcast-group\" => \"groupA\")
    ]. Use instead the socket-binding attribute to configure this broadcast-group.",
            "WFLYMSG0080: Could not migrate attribute local-bind-port from resource [
        (\"subsystem\" => \"messaging-activemq\"),
        (\"server\" => \"default\"),
        (\"broadcast-group\" => \"groupA\")
    ]. Use instead the socket-binding attribute to configure this broadcast-group.",
            "WFLYMSG0080: Could not migrate attribute group-address from resource [
        (\"subsystem\" => \"messaging-activemq\"),
        (\"server\" => \"default\"),
        (\"broadcast-group\" => \"groupA\")
    ]. Use instead the socket-binding attribute to configure this broadcast-group.",
            "WFLYMSG0080: Could not migrate attribute group-port from resource [
        (\"subsystem\" => \"messaging-activemq\"),
        (\"server\" => \"default\"),
        (\"broadcast-group\" => \"groupA\")
    ]. Use instead the socket-binding attribute to configure this broadcast-group."
        ]}
    }

    注記

    各サブシステムの migrate および describe-migration 警告のリストは、本ガイドの最後にあるリファレンス資料 に記載されています。

  4. サーバー設定ファイルを確認し、拡張、サブシステム、および名前空間が更新され、既存のサブシステム設定が JBoss EAP 7 に移行されたことを確認します。

    注記

    この手順は、以下のコマンドを使用して jacorbmessaging、および web の各サブシステムに対して繰り返す必要があります。

    /subsystem=jacorb:migrate
    /subsystem=messaging:migrate
    /subsystem=web:migrate
  5. cmpjaxr、および threads サブシステムおよび拡張をサーバー設定から削除します。

    管理 CLI プロンプトで以下のコマンドを実行し、廃止された cmpjaxr、および threads サブシステムを削除します。

    /subsystem=cmp:remove
    /extension=org.jboss.as.cmp:remove
    /subsystem=jaxr:remove
    /extension=org.jboss.as.jaxr:remove
    /subsystem=threads:remove
    /extension=org.jboss.as.threads:remove
重要

サーバーを再起動して通常操作を行う前に messagingjacorb、および web サブシステムを移行し、cmpjaxr、および threads 拡張およびサブシステムを削除する必要があります。この作業の完了前にサーバーを再起動する必要がある場合は、サーバー起動のコマンドラインで --start-mode=admin-only 引数を使用するようにしてください。これにより、サーバーの変更を継続できます。