使用 JBoss 服务器迁移工具


Red Hat JBoss Enterprise Application Platform 8.0

将服务器配置迁移到 Red Hat JBoss Enterprise Application Platform 8.0

Red Hat Customer Content Services

摘要

本指南介绍了如何使用 JBoss 服务器迁移工具将您的应用服务器配置从以前的 JBoss EAP 版本迁移到 JBoss EAP 8.0。

提供有关 JBoss EAP 文档的反馈

要报告错误或改进文档,请登录到 Red Hat JIRA 帐户并提交问题。如果您没有 Red Hat Jira 帐户,则会提示您创建一个帐户。

流程

  1. 单击以下链接 以创建 ticket
  2. Summary 中输入问题的简短描述。
  3. Description 中提供问题或功能增强的详细描述。包括一个指向文档中问题的 URL。
  4. Submit 创建问题,并将问题路由到适当的文档团队。

使开源包含更多

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。我们从这四个术语开始:master、slave、黑名单和白名单。由于这一努力的精力,这些更改将在即将发布的版本中逐渐实施。有关让我们的语言更加包含的更多详情,请参阅我们的CTO Chris Wright 信息

第 1 章 JBoss 服务器迁移工具简介

1.1. 关于 Red Hat JBoss Enterprise Application Platform

Red Hat JBoss Enterprise Application Platform (JBoss EAP)是一个基于开放标准构建的中间件平台,与 Jakarta Enterprise Edition 10 规范兼容。

JBoss EAP 的 8.0 发行版本是适用于 Web Profile、Core Profile 和 Full Platform 规范的 Jakarta EE Jakarta Enterprise Edition 兼容实现。8.0 发行版本也是一个经过认证的 Jakarta EE Jakarta Enterprise Edition Web Profile、Core Profile 和 Full Platform 规格的实现。

JBoss EAP 为服务器实例提供两种操作模式。

独立服务器

单机服务器工作模式表示将 JBoss EAP 作为单一服务器实例运行。

受管域

受管域工作模式允许从单一控制点管理多个 JBoss EAP 实例。

JBoss EAP 包括 API 和开发框架,可快速开发安全、可扩展的 Jakarta EE 应用程序。公开给 JBoss EAP 服务器的应用的许多 API 和功能都组织到服务器配置文件中配置的子系统中。例如,您可以在 datasources 子系统中配置数据库访问信息,使它可以被部署到 JBoss EAP 单机服务器或受管域的应用访问。引入其他功能的新功能和弃用可能需要将服务器配置从一个 JBoss EAP 分成另一个版本。

有关 Red Hat JBoss Enterprise Application Platform 的更多信息,请参阅红帽客户门户网站上的 JBoss EAP 产品文档。

在本文档中,变量 EAP_PREVIOUS_HOME 用于表示 源服务器 安装的路径。使用 源服务器 安装的实际路径替换此变量。此外,变量 EAP_NEW_HOME 用于表示 目标服务器 安装的路径。将这个变量替换为 目标服务器 安装的实际路径。另外,变量 MIGRATION_TOOL_HOME 会显示安装迁移工具的目录。

1.2.1. JBoss EAP 安装路径

  • 如果您使用 .zip 文件安装方法安装 JBoss EAP,则安装目录是您提取 .zip 文件的 jboss-eap-8.0 目录。
  • 如果您使用 RPM 安装方法安装 JBoss EAP,安装目录为 /opt/rh/eap8/root/usr/share/wildfly/
  • 如果您使用安装程序安装 JBoss EAP,EAP _NEW_HOME 的默认路径${user.home}/EAP-8.0.0

    • 对于 Red Hat Enterprise Linux、Solaris 和 HP-UX: /home/USER_NAME/EAP-8.0.0/
    • 对于 Microsoft Windows: C:\Users\USER_NAME\EAP-8.0.0\
  • 如果您使用 JBoss Developer Studio 安装程序安装和配置 JBoss EAP 服务器,EAP_NEW_HOME 的默认路径为 ${user.home}/jbdevstudio/runtimes/jboss-eap:

    • 对于 Red Hat Enterprise Linux: /home/USER_NAME/jbdevstudio/runtimes/jboss-eap/
    • 对于 Microsoft Windows: C:\Users\USER_NAME\jbdevstudio\runtimes\jboss-eapC:\Documents and Settings\USER_NAME\jbdevstudio\runtimes\jboss-eap\

第 2 章 开始前

2.1. 使用干净的目标服务器安装运行

由于 JBoss 服务器迁移工具根据上一发行版本的配置创建配置文件,因此它旨在在干净和未配置的目标服务器安装上运行。JBoss 服务器迁移工具通过将 .beforeMigration 附加到文件名来创建目标服务器配置文件的备份。然后,它会使用源服务器的配置文件为目标服务器创建全部新配置文件,并迁移配置以在目标服务器配置中运行。

警告

当您运行 JBoss 服务器迁移工具时,安装和运行迁移工具的目标服务器上所做的所有更改都将丢失。

另外,请注意,如果您对目标服务器目录多次运行该工具,后续运行将覆盖工具第一次运行时备份的原始目标配置文件。这是因为,每次运行工具都会通过附加 .beforeMigration 来备份配置文件,从而导致任何现有的备份配置文件丢失。

2.2. 自定义迁移

JBoss 服务器迁移工具提供了配置日志、报告和执行迁移任务的功能。默认情况下,当您以非交互模式运行 JBoss 服务器迁移工具时,它会迁移整个服务器配置。您可以配置 JBoss 服务器迁移工具来自定义日志记录和报告输出。您还可以将其配置为跳过您不想迁移的配置的任何部分。

第 3 章 运行 JBoss 服务器迁移工具

您可以通过以下任一方式运行 JBoss 服务器迁移工具:

重要

在运行 JBoss 服务器迁移工具前,您必须停止源和目标 JBoss EAP 服务器。

3.1. 以互动模式运行 JBoss 服务器迁移工具

默认情况下,JBoss 服务器迁移工具以交互方式运行。此模式允许您准确选择要迁移的服务器配置。

注意

交互模式不允许选择要迁移的子系统。有关如何在子系统或任务级别配置工具的详情,请参考 配置 JBoss 服务器迁移工具 执行的迁移任务

以下是为最小迁移执行的基本步骤。如果您要迁移的服务器包含自定义配置,如部署,或者缺少默认资源,则工具会提供额外的提示。

流程

  1. 要以交互模式运行该工具,请导航到目标服务器安装目录并运行以下命令,提供 source 参数作为源服务器安装的路径。

    $ MIGRATION_TOOL_HOME/bin/jboss-server-migration.sh --source EAP_PREVIOUS_HOME --target EAP_NEW_HOME
    Copy to Clipboard Toggle word wrap
  2. 系统将提示您确定您要将源服务器的独立配置(位于 EAP_PREVIOUS_HOME/standalone/configuration/ 目录中)迁移到目标服务器的独立配置,这些配置位于 EAP_NEW_HOME/standalone/configuration/ 目录中。

    Migrate the source's standalone server?
    yes/no? yes
    Copy to Clipboard Toggle word wrap

    如果没有 响应,则会跳过独立服务器迁移,且不会迁移独立服务器配置文件。

    如果使用 yes 响应,您会看到以下提示。

    Migrate all configurations?
    yes/no? yes
    Copy to Clipboard Toggle word wrap

    使用 yes 响应,以迁移所有源服务器的单机服务器配置文件。

    在没有响应时,为每个单独的 standalone*.xml 配置文件收到提示。

  3. 接下来,系统会提示您确定您要将源服务器的受管域配置(位于 EAP_PREVIOUS_HOME/domain/configuration/ 目录中)迁移到目标服务器的受管域配置(位于 EAP_NEW_HOME/configuration/ 目录中)。

    Migrate the source's managed domain?
    yes/no? yes
    Copy to Clipboard Toggle word wrap

    如果没有 响应,则会跳过受管域迁移,且不会迁移受管域配置文件。

    如果您使用 yes 响应,工具将开始迁移源服务器的受管域内容。密码的存储库用于存储由源服务器的受管域和主机配置引用的数据,如部署和部署覆盖。由于源和目标服务器使用类似的内容存储库,因此工具只是将数据从源服务器复制到目标服务器,并将结果输出到控制台和服务器日志中。

    INFO  [ServerMigrationTask#397] Migrating domain content found:  [22/caa450a9ba3b84eaf5a15b6da418b92ce6c98e/content, 23/b62a37ba8a4830622bfcdb960280577cc6796e/content]
    INFO  [ServerMigrationTask#398] Resource with path /EAP_NEW_HOME/domain/data/content/22/caa450a9ba3b84eaf5a15b6da418b92ce6c98e/content migrated.
    INFO  [ServerMigrationTask#399] Resource with path /EAP_NEW_HOME/domain/data/content/23/b62a37ba8a4830622bfcdb960280577cc6796e/content migrated.
    Copy to Clipboard Toggle word wrap
  4. 接下来,迁移工具会为受管域配置文件扫描源服务器,将结果输出到控制台,并提供以下提示:

    Migrate all configurations?
    yes/no? yes
    Copy to Clipboard Toggle word wrap

    使用 yes 响应,以迁移所有源服务器的受管域配置文件。

    没有响应以接收每个单独受管域配置文件的提示。

  5. 接下来,迁移工具扫描源服务器以获取主机配置文件,将结果输出到控制台,并提供以下提示:

    INFO  [ServerMigrationTask#457] Retrieving source's host configurations...
    INFO  [ServerMigrationTask#457] /jboss-eap-8.0/domain/configuration/host-master.xml
    INFO  [ServerMigrationTask#457] /jboss-eap-8.0/domain/configuration/host-slave.xml
    INFO  [ServerMigrationTask#457] /jboss-eap-8.0/domain/configuration/host.xml
    
    Migrate all configurations?
    yes/no? yes
    Copy to Clipboard Toggle word wrap

    使用 yes 响应,以迁移所有源服务器的主机配置文件。

    在没有响应以为每个单独的主机配置文件接收提示。

  6. 完成后,您应该在服务器控制台中看到以下信息:

     Migration Result: SUCCESS
    Copy to Clipboard Toggle word wrap

您可以在非互动模式下运行 JBoss 服务器迁移工具。此模式允许其在没有提示的情况下运行。

注意

JBoss 服务器迁移工具自动迁移所有服务器配置文件的所有子系统配置。有关如何在子系统或任务级别配置工具的详情,请参考 配置 JBoss 服务器迁移工具 执行的迁移任务

流程

  1. 要以非交互模式运行该工具,请导航到目标服务器安装目录并运行以下命令,提供 source 参数作为源服务器安装的路径,并将 --interactive-i 参数设置为 false

    $ MIGRATION_TOOL_HOME/bin/jboss-server-migration.sh --source EAP_PREVIOUS_HOME --target EAP_NEW_HOME --interactive false
    Copy to Clipboard Toggle word wrap
  2. 默认情况下,该工具会自动迁移所有源服务器的独立和受管域配置文件。但是,您可以配置工具的属性来跳过特定配置的迁移。完成后,您应该在服务器控制台中看到以下信息:

     Migration Result: SUCCESS
    Copy to Clipboard Toggle word wrap

4.1. 检查迁移的配置文件

迁移完成后,检查EAP_NEW_ HOME /standalone/configuration/ 和 EAP_NEW_HOME/ domain/configuration/目录中的迁移服务器配置文件。

  • 请注意,为迁移选择的任何原始 EAP_NEW_HOME 目标服务器配置文件名称都会被备份,且现在附加了 .beforeMigration
  • EAP_NEW_HOME 目标服务器配置文件名称未附加 .beforeMigration,现在使用从 EAP_PREVIOUS_HOME 源服务器配置迁移的内容进行更新。
  • 位于 EAP_PREVIOUS_HOME 源服务器配置目录中的原始配置文件保持不变。
  • 目标配置目录中的 logging.propertiesstandalone-load-balancer.xml 文件保持不变。

如果您选择迁移所有可用配置,您应该在目标服务器目录中看到以下配置文件。

示例:目标服务器上的配置文件列表

$ ls EAP_NEW_HOME/standalone/configuration/
application-roles.properties
application-roles.properties.beforeMigration
application-users.properties
application-users.properties.beforeMigration
logging.properties
mgmt-groups.properties
mgmt-groups.properties.beforeMigration
mgmt-users.properties
mgmt-users.properties.beforeMigration
standalone-full-ha.xml
standalone-full-ha.xml.beforeMigration
standalone-full.xml
standalone-full.xml.beforeMigration
standalone-ha.xml
standalone-ha.xml.beforeMigration
standalone-load-balancer.xml
standalone-osgi.xml
standalone-osgi.xml.beforeMigration
standalone.xml
standalone.xml.beforeMigration

$ ls EAP_NEW_HOME/domain/configuration/
application-roles.properties
application-roles.properties.beforeMigration
application-users.properties
application-users.properties.beforeMigration
domain.xml
domain.xml.beforeMigration
host-master.xml
host-master.xml.beforeMigration
host-slave.xml
host-slave.xml.beforeMigration
host.xml
host.xml.beforeMigration
logging.properties
mgmt-groups.properties
mgmt-groups.properties.beforeMigration
mgmt-users.properties
mgmt-users.properties.beforeMigration
Copy to Clipboard Toggle word wrap

4.2. 跟踪迁移任务执行

JBoss 服务器迁移工具通过执行根任务开始每个目标服务器迁移,然后可以执行子任务。然后,这些子任务也可以执行额外的任务和子任务。在执行时,工具会跟踪每个迁移任务以及任何子任务,并将结果保存在稍后用于构建报告的树形结构中。

每个迁移任务都被赋予一个名称,它由一个任务名称组成,它通过以下语法与可选属性连接:

TASK_NAME(ATTRIBUTE_1_NAME=ATTRIBUTE_1_VALUE,ATTRIBUTE_2_NAME=ATTRIBUTE_2_VALUE, ...​)
Copy to Clipboard Toggle word wrap

name 定义任务主题或类型,属性用于区分子任务和同级任务。例如,以下所有名称是可区分 Jakarta Enterprise Beans 子系统更新任务的名称。

subsystem.ejb3.update
subsystem.ejb3.update.activate-ejb3-remoting-http-connector(resource=/subsystem=ejb3)
subsystem.ejb3.update.setup-default-sfsb-passivation-disabled-cache(resource=/subsystem=ejb3)
subsystem.ejb3.update.add-infinispan-passivation-store-and-distributable-cache(resource=/subsystem=ejb3)
Copy to Clipboard Toggle word wrap

由于迁移任务可以在不同的父任务下多次执行,因此每个任务都存储在树中,使用其每个父任务名称,以 root 开头,并用 > 字符分隔。任务执行树用于构建迁移报告。

任务执行可能会导致以下状态之一:

Expand
表 4.1. 服务器迁移任务执行状态
Status描述

成功

任务已成功执行。

跳过

任务跳过了执行,要么是因为不需要,或者因为它已配置为跳过。

Fail

任务执行失败。

4.3. 查看任务概述日志

任务摘要生成并打印到迁移控制台以及 JBoss 服务器迁移工具日志文件中。它通过组件和子任务作为分级列表提供迁移结果的高级概述。

4.4. 查看 JBoss 服务器迁移工具报告

JBoss 服务器迁移工具在 MIGRATION_TOOL_HOME/reports/ 目录中生成良好的 HTML 和 XML 报告。这些报告提供了对迁移过程的详细分析,以及在迁移过程中配置目标服务器的方式。这些报告的默认名称为 migration-report.htmlmigration-report.xml。这些名称各自可配置。

本节概述了这些报告的内容。

4.4.1. JBoss 服务器迁移工具 HTML 报告

HTML 报告由三个部分组成。

概述

本节提供执行开始时间、源和目标服务器的信息以及迁移的结果。

环境

本节列出了用于迁移的环境属性。

任务

本节包括 collapsible 子部分,提供已执行迁移任务的统计信息和映射。每个任务按名称列出,并根据任务完成的状态进行颜色编码:

  • 如果成功,则绿色。
  • 如果失败,红帽。
  • 如果被跳过,则灰色。

4.4.2. JBoss 服务器迁移工具 XML 报告

XML 报告是低级报告,提供工具收集的所有迁移数据。它的格式是导入并由第三方电子表格或其他数据操作工具进行导入和操作的方法。

第 5 章 配置 JBoss 服务器迁移工具

5.1. 配置 JBoss 服务器迁移工具属性

您可以使用属性配置 JBoss 服务器迁移工具日志记录和报告输出,并确定您要迁移的组件和配置。您可以使用以下方法的组合配置这些属性。

5.1.1. 使用工具属性配置 JBoss 服务器迁移工具

您可以使用位于 MIGRATION_TOOL_HOME/configuration/ 目录中的 environment.properties 文件来配置 JBoss 服务器迁移工具。此标准 Java 属性文件为迁移到目标服务器时可以配置的所有有效属性提供默认值。要更改默认值,请删除在属性前面加上的 # 注释字符,并将其设置为您需要的值。

5.1.2. 使用用户属性配置 JBoss 服务器迁移工具

如果您愿意,您可以创建一个标准 Java 属性文件来定义 JBoss 服务器迁移工具配置属性,并使用 --environment-e 参数在命令行上传递其路径。此路径可以是绝对路径,也可以是相对于当前目录的路径。

$ MIGRATION_TOOL_HOME/bin/jboss-server-migration.sh --source EAP_PREVIOUS_HOME --target EAP_NEW_HOME --environment path/to/my-server-migration.properties
Copy to Clipboard Toggle word wrap

使用 --environment-e 参数在命令行上传递的文件中定义的属性将覆盖 MIGRATION_TOOL_HOME/migration/configuration/environment.properties 文件中定义的文件。

5.1.3. 使用系统属性配置 JBoss 服务器迁移工具

您可以使用以下语法在命令行中传递系统属性来配置 JBoss 服务器迁移工具。

$ MIGRATION_TOOL_HOME/bin/jboss-server-migration.sh --source EAP_PREVIOUS_HOME --target EAP_NEW_HOME -Djboss.server.migration.PROPERTY_NAME=PROPERTY_VALUE
Copy to Clipboard Toggle word wrap

系统属性名称应指定为 jboss.server.migration。 与环境属性名称串联。以下示例演示了如何在启动 JBoss 服务器迁移工具时将 XML 报告的名称指定为 migration-report.xml

$ MIGRATION_TOOL_HOME/bin/jboss-server-migration.sh --source EAP_PREVIOUS_HOME --target EAP_NEW_HOME -Djboss.server.migration.report.xml.fileName=migration-report.xml
Copy to Clipboard Toggle word wrap

命令行中指定的环境属性会覆盖用户配置属性和工具配置属性。

5.2. 为 JBoss 服务器迁移工具配置日志记录

JBoss 服务器迁移工具使用 JBoss 日志框架来记录迁移的进度。结果会写入控制台以及名为 migration.log 的文件,该文件位于 MIGRATION_TOOL_HOME/migration/logs/ 目录中。如果不存在,则会创建此日志文件,并且每次后续执行工具时会覆盖其内容。

日志记录配置由 MIGRATION_TOOL_HOME/migration/logging.properties 文件提供。您可以修改此配置文件,或者在命令行中使用 logging.configuration 系统属性指定替代的日志记录配置文件。

$ MIGRATION_TOOL_HOME/bin/jboss-server-migration.sh --source EAP_PREVIOUS_HOME --target EAP_NEW_HOME -Dlogging.configuration=file:EAP_PREVIOUS_HOME/migration/configuration/my-alternate-logging.properties
Copy to Clipboard Toggle word wrap

5.3. 配置模块迁移

JBoss 服务器迁移工具可以迁移源服务器上安装的任何模块,只要该模块尚未安装在目标服务器上。模块迁移可以通过请求显式完成,或者隐式完成,因为其他模块或迁移的服务器配置取决于它。

5.3.1. 模块环境属性

您可以使用 modules.includesmodules.excludes 环境属性来控制是否应迁移模块。模块 ID 的语法是 name:slot:slot 是可选的,如果未指定,则默认为

  • 从不迁移其 ID 由 modules.excludes 环境属性引用的模块。
  • modules.includes 环境属性引用其 ID 的模块始终会被迁移,除非它被 modules.excludes 环境属性引用。

5.3.2. 配置模块属性

用于迁移模块的环境属性可以使用以下方法之一配置:

  • 您可以在工具的 MIGRATION_TOOL_HOME/migration/configuration/environment.properties 文件中配置属性。

    modules.includes=com.example.moduleA,com.example.moduleB
    modules.excludes=com.example.moduleC
    Copy to Clipboard Toggle word wrap
  • 您可以在您自己的自定义属性文件中包括上述属性,然后使用 --environment 参数在命令行上传递属性文件名。

    $ MIGRATION_TOOL_HOME/bin/jboss-server-migration.sh --source EAP_PREVIOUS_HOME --target EAP_NEW_HOME --environment PATH_TO_MY_PROPERTIES_FILE
    Copy to Clipboard Toggle word wrap
  • 您可以使用系统属性在命令行上传递信息。环境属性名称必须前缀为 jboss.server.migration.,例如:

    $ MIGRATION_TOOL_HOME/bin/jboss-server-migration.sh --source EAP_PREVIOUS_HOME --target EAP_NEW_HOME -Djboss.server.migration.modules.includes="com.example.moduleA" -Djboss.server.migration.modules.excludes="com.example.moduleC,com.example.moduleD"
    Copy to Clipboard Toggle word wrap
警告

JBoss 服务器迁移工具不会验证源模块是否与目标服务器兼容。不兼容的迁移模块可能会导致目标服务器出现故障或根本不工作。模块可能会因为在源和目标服务器上安装的模块依赖而不兼容,但在每个服务器上包括或公开不同的资源。

5.4. 为 JBoss 服务器迁移工具配置报告

您可以为 JBoss 服务器迁移工具配置以下报告:

  • 任务摘要日志
  • HTML 报告
  • XML 报告

5.4.1. 配置任务概述日志

您可以使用以下 environment 属性自定义 Task Summary 的生成。

Expand
表 5.1. 任务摘要环境属性
属性名称类型属性描述和默认值

report.summary.maxTaskPathSizeToDisplaySubtasks

整数

在级别小于或等于指定整数的摘要中包含迁移的子任务。

默认值为 5

5.4.2. 配置 HTML 报告

您可以使用以下环境属性自定义 HTML 报告。

Expand
表 5.2. HTML 报告环境属性
属性名称类型属性描述和默认值

report.html.fileName

字符串

HTML 报告文件的名称。如果没有设置,则不会生成报告。

默认为 MIGRATION_TOOL_HOME/reports/migration-report.html

report.html.maxTaskPathSizeToDisplaySubtasks

整数

在级别小于或等于指定整数的摘要中包含迁移的子任务。

默认值为 4

report.html.templateFileName

字符串

HTML 报告模板文件名。

默认为 migration-report-template.html

5.4.3. 配置 XML 报告

您可以使用以下环境属性自定义 XML 报告。

Expand
表 5.3. XML 报告环境属性
属性名称类型属性描述和默认值

report.xml.fileName

字符串

XML 报告文件的名称。如果没有设置,则不会生成报告。

默认为 MIGRATION_TOOL_HOME/reports/migration-report.xml

5.5. 为独立服务器配置配置迁移

您可以配置 JBoss 服务器迁移工具以完全跳过单机服务器的迁移,以提供要迁移的配置文件名称,或者为源服务器的基本和配置目录提供备用路径。

您可以使用以下环境属性自定义独立服务器配置迁移。

Expand
表 5.4. 独立服务器迁移环境属性
属性名称属性描述

standalone.skip

如果设置为 true,则工具会跳过整个单机服务器迁移。

server.source.standalone.serverDir

定义源服务器独立目录的替代路径,默认为源服务器的 EAP_NEW_HOME/standalone/ 目录。

server.source.standalone.configDir

定义源服务器独立配置目录的替代路径,默认为源服务器的 EAP_NEW_HOME/standalone/configuration/ 目录。

server.source.standalone.configFiles

要迁移的源服务器独立配置的逗号分隔列表。

server.target.standalone.serverDir

定义目标服务器独立目录的替代路径,默认为目标服务器的 EAP_NEW_HOME/standalone/ 目录。

server.target.standalone.configDir

定义目标服务器独立配置目录的替代路径,默认为目标服务器的 EAP_NEW_HOME/standalone/configuration/ 目录。

5.6. 配置受管域配置的迁移

您可以配置 JBoss 服务器迁移工具以完全跳过受管域的迁移,以提供要迁移的配置文件名称,或者为源服务器的基本和配置目录提供备用路径。

您可以使用以下环境属性自定义受管域配置的迁移。

Expand
表 5.5. 受管域迁移环境属性
属性名称属性描述

domain.skip

如果设置为 true,工具将跳过整个受管域迁移。

server.source.domain.domainDir

定义源服务器的受管域目录的替代路径,默认为源服务器的 EAP_NEW_HOME/domain/ 目录。

server.source.domain.configDir

定义源服务器的受管域配置目录的替代路径,默认为源服务器的 EAP_NEW_HOME/domain/configuration/ 目录。

server.source.domain.domainConfigFiles

要迁移的源服务器的受管域配置的逗号分隔列表。

server.source.domain.hostConfigFiles

要迁移的源服务器主机配置文件的逗号分隔列表。

server.target.domain.domainDir

定义目标服务器的受管域目录的替代路径,默认为目标服务器的 EAP_NEW_HOME/domain/configuration/ 目录。

server.target.domain.configDir

定义目标服务器的受管域配置目录的替代路径,默认为目标服务器的 EAP_NEW_HOME/domain/configuration/ 目录。

默认情况下,JBoss 服务器迁移工具将自动迁移每个单机服务器、受管域和主机配置的所有组件和子系统。您可以使用环境属性自定义由工具执行的特定任务和子任务的执行。例如,您可以配置工具来跳过删除不支持的子系统,或跳过部署的迁移。工具执行的任务取决于服务器配置的类型以及您要从中迁移的源服务器版本。

有关如何配置环境属性以自定义 JBoss 服务器迁移工具执行的任务的信息,请参考以下部分。

第 6 章 将 JBoss EAP 6.4 配置迁移到 JBoss EAP 8.0

将 JBoss EAP 6.4 配置迁移到 JBoss EAP 8.0 的步骤已更新。您必须首先将您的 JBoss EAP 6.4 配置迁移到 JBoss EAP 7.4 的最新 CP 版本,然后将它进一步迁移到 JBoss EAP 8.0。

第 7 章 将 JBoss EAP 7.x 配置迁移到 JBoss EAP 8.0

默认情况下,JBoss 服务器迁移工具在将单机服务器配置从 JBoss EAP x 迁移到 JBoss EAP 8.0 时执行以下任务。

7.1.1. 迁移 JBoss 域属性

域相关属性名称中的 masterslave 词语被 'primary' 和 'secondary' 替换,迁移会自动修复旧属性名称的任何使用。

控制台会记录迁移重命名的任何属性。

  INFO JBoss domain property jboss.domain.master.address migrated to jboss.domain.primary.address
  INFO JBoss domain property jboss.domain.master.port migrated to jboss.domain.primary.port
  INFO JBoss domain property jboss.domain.master.protocol migrated to jboss.domain.primary.protocol
Copy to Clipboard Toggle word wrap

如果属性被成功重命名,则会显示以下信息:

  INFO JBoss domain properties migrated.
Copy to Clipboard Toggle word wrap

7.1.2. 删除不支持的子系统

JBoss 服务器迁移工具从迁移的服务器配置中删除所有不支持的子系统配置和扩展。工具会记录每个子系统,并在其日志文件删除时将其扩展记录到控制台。

注意

JBoss EAP 7.x 不支持的任何子系统,但由管理员添加到该服务器时也不支持 JBoss EAP 8.0,并将被删除。

要跳过删除不支持的子系统,请将 subsystem .remove-unsupported-subsystems.skip environment 属性设置为 true

您可以覆盖 JBoss 服务器迁移工具的默认行为,并使用以下环境属性指定迁移期间应包含或排除哪些子系统和扩展。

Expand
表 7.1. 服务器迁移环境属性
属性名称属性描述

extensions.excludes

不应迁移的模块名称列表,如 com.example.extension1, com.example.extension3

extensions.includes

应该始终迁移的模块名称列表,如 com.example.extension2,com.example.extension4

subsystems.excludes

子系统命名空间列表,从未迁移的版本,例如: urn:jboss:domain:logging,urn:jboss:domain:ejb3

subsystems.includes

子系统命名空间列表,剥离应始终迁移的版本,例如: urn:jboss:domain:security,urn:jboss:domain:ee

7.1.3. 为独立服务器迁移引用的模块

从源服务器迁移到目标服务器的配置可能会引用或依赖于目标服务器上没有安装的模块。JBoss 服务器迁移工具检测到这一点,并自动将引用的模块及其依赖模块从源服务器迁移到目标服务器。

单机服务器配置引用的模块通过以下过程迁移:

  • 数据源子系统配置引用 的模块 被迁移为数据源驱动程序模块。
  • ee 子系统配置引用的模块被迁移为全局模块。
  • 命名 子系统配置引用的模块作为对象工厂模块迁移。
  • 消息传递子系统配置引用的模块被迁移为 Jakarta Messaging bridge 模块。
  • 目标配置中没有安装的任何扩展都会迁移到目标服务器配置。

控制台会记录一个消息,而不是迁移的任何模块 ID。通过在 modules.excludes 环境属性中指定模块 ID,可以排除特定模块的迁移。

7.1.4. 为独立服务器迁移引用的路径

从源服务器迁移到目标服务器的配置可能会引用或依赖于还必须迁移到目标服务器的文件路径和目录。JBoss 服务器迁移工具不会迁移绝对路径参考。它仅迁移配置为相对于源配置的文件或目录。控制台会记录一个信息,而不是迁移的每个路径。

7.1.5. 迁移旧的 Security Realms

JBoss EAP 8 不支持传统的 Security Realms 框架。JBoss 服务器迁移工具将配置迁移到使用默认 JBoss EAP 8 Elytron 替换。

如果没有使用默认的传统安全域,您可能需要手动配置 Elytron。

控制台日志配置资源迁移到默认的 JBoss EAP 8 Elytron 替换。

 INFO  Legacy security XML configuration retrieved.
 WARN  Migrated Remoting subsystem's http connector resource /subsystem/remoting/http-connector/http-remoting-connector using a legacy security-realm, to Elytron's default application SASL Authentication Factory migration-defaultApplicationSaslAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem https-listener resource /subsystem/undertow/server/default-server/https-listener/https using a legacy security-realm, to Elytron's default TLS ServerSSLContext migration-defaultTLSServerSSLContext. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem http-invoker resource /subsystem/undertow/server/default-server/host/default-host/setting/http-invoker using a legacy security-realm, to Elytron's default Application HTTP AuthenticationFactory migration-defaultApplicationHttpAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 INFO  Legacy security realms migrated to Elytron.
Copy to Clipboard Toggle word wrap

7.1.6. 迁移旧的安全域

JBoss EAP 8 不支持传统的安全域框架。JBoss 服务器迁移工具将配置迁移到使用默认 JBoss EAP 8 Elytron 替换。

如果没有使用默认的传统安全域,您可能需要手动配置 Elytron。

控制台会记录迁移到默认 JBoss EAP 8 Elytron 替换的所有配置资源。

 WARN  Migrated ejb3 subsystem resource /subsystem/ejb3/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated undertow subsystem resource /subsystem/undertow/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
Copy to Clipboard Toggle word wrap

7.1.7. 迁移 keycloak 子系统

JBoss EAP 8 不支持 keycloak 子系统,它被 elytron-oidc-client 子系统替代。

默认情况下,JBoss 服务器迁移工具会自动迁移任何传统的子系统配置。要跳过此迁移任务,请将 subsystem.keycloak.migrate.skip 环境属性值设为 true

传统子系统迁移无需用户的任何交互即可执行。

当旧的 keycloak 子系统迁移完成后,迁移控制台中会显示以下信息:

INFO  Subsystem keycloak migrated.
Copy to Clipboard Toggle word wrap

迁移过程中遇到的任何问题都会写入日志文件,并显示在迁移控制台中。

7.1.9. 更新 jgroups 子系统配置

JBoss 服务器迁移工具不会自动迁移 jgroups 子系统配置。JBoss 服务器迁移工具将配置恢复到默认的 JBoss EAP 8 jgroups 配置。

如果没有使用默认的 JBoss EAP 8 jgroups 子系统配置,您可能需要手动配置 jgroups 子系统配置。

jgroups 子系统配置被更新时,控制台会记录一条消息:

 WARN  Configuration of JGroups protocols has been changed to match the default protocols of the target server. Please note that further manual configuration may be needed if the legacy configuration being used was not the source server's default configuration!
Copy to Clipboard Toggle word wrap

7.1.10. 为独立服务器添加健康子系统

JBoss EAP 8.0 健康 子系统支持服务器的健康状况功能。JBoss 服务器迁移工具会自动将默认 健康 子系统配置添加到迁移的配置文件。

要跳过添加健康子系统配置,请将 subsystem.health.add.skip 环境属性设为 true

健康 子系统添加到 JBoss EAP 8.0 后,您将在 web 控制台中看到以下信息:

INFO  Subsystem health added.
Copy to Clipboard Toggle word wrap

7.1.11. 为独立服务器添加日志记录子系统

JBoss EAP 8.0 日志记录子系统提供对服务器的指标功能的支持。JBoss 服务器迁移工具会自动将默认 日志记录子系统 配置添加到迁移的配置文件。

要跳过添加的子系统配置,请将 subsystem. metrics.add.skip 环境属性设为 true

metrics 子系统添加到 JBoss EAP 8.0 后,您将在 web 控制台中看到以下信息:

INFO  Subsystem metrics added.
Copy to Clipboard Toggle word wrap

7.1.12. 为独立服务器迁移部署

JBoss 服务器迁移工具 可以迁移以下类型的单机服务器部署配置:

  • 它引用的部署,也称为 持久部署
  • 在由部署扫描器监控的目录中 的部署
  • 部署覆盖它 引用。

部署的迁移包括在目标服务器上安装相关的文件资源,并可能会更新迁移的配置。

JBoss 服务器迁移工具已预先配置为在非交互模式运行时跳过部署。要启用部署迁移,请将 deployments.migrate-deployments.skip 环境属性设置为 false

重要

请注意,当您以交互模式运行 JBoss 服务器迁移工具并进入无效输入时,生成的行为取决于 deployments.migrate-deployments 环境属性值。

  • 如果 deployments.migrate-deployments.skip 设为 false,并且输入无效的输入,则工具将尝试迁移部署。
  • 如果 deployments.migrate-deployments.skip 设为 true,并且输入无效的输入,则工具将跳过部署迁移。
警告

JBoss 服务器迁移工具并不决定部署的资源是否与目标服务器兼容。这意味着应用程序或资源可能无法部署,可能无法按预期工作,或者可能根本不工作。另请注意,JBoss EAP 7.3 *-jms.xml 配置文件等工件在没有修改的情况下被复制,并可能导致 JBoss EAP 服务器使用错误引导。

红帽建议您使用 Migration Toolkit for Runtimes (MTR)分析部署,以确定不同 JBoss EAP 服务器间的兼容性。如需更多信息,请参阅 Migration Toolkit for Runtimes 产品文档

7.1.12.1. 为独立服务器迁移持久性部署

要在非交互模式运行时启用持久部署迁移,请将 deployments.migrate-persistent-deployments.skip 环境属性设置为 false

JBoss 服务器迁移工具搜索任何持久性部署引用,并将它们列出到控制台。

INFO  [ServerMigrationTask#67] Persistent deployments found: [cmtool-helloworld3.war, cmtool-helloworld4.war, cmtool-helloworld2.war, cmtool-helloworld1.war]
Copy to Clipboard Toggle word wrap

然后,处理工作流取决于您是否在 交互模式或非互动 模式运行工具,如下所述。

以非互动模式迁移持久性部署

如果您以非交互模式运行该工具,该工具将使用预配置的属性来确定是否迁移持久部署。只有在 deployments.migrate-deployments.skipdeployments.migrate-persistent-deployments.skip 属性都设置为 false 时,才会迁移持久性部署。

以互动模式迁移持久性部署

如果您以交互模式运行该工具,JBoss 服务器迁移工具会提示您每个部署使用以下工作流。

  1. 打印到控制台的持久部署后,您会看到以下提示。

    This tool is not able to assert if persistent deployments found are compatible with the target server, skip persistent deployments migration?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应以跳过持久部署的迁移。所有部署引用都会从迁移的配置中删除,并结束迁移过程的一部分。
    • 无需进行相应 响应以继续迁移。
  2. 如果您选择继续,您会看到以下提示。

    Migrate all persistent deployments found?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应,以自动迁移所有部署,并最终迁移迁移过程的一部分。
    • 无需进行相应 响应以继续迁移。
  3. 如果您选择继续,您会收到提示要求确认每个引用部署的迁移。

    Migrate persistent deployment 'helloworld01.war'?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应以迁移部署。
    • 在没有响应的情况下,从迁移的配置中删除部署。

      INFO  [ServerMigrationTask#68] Removed persistent deployment from configuration /deployment=helloworld01.war
      Copy to Clipboard Toggle word wrap
7.1.12.2. 为独立服务器迁移部署扫描程序

部署扫描程序,它们仅用于独立服务器配置,监控新文件的目录,并自动或通过特殊部署标记文件管理其部署。

要在非交互模式运行时,启用由部署扫描程序监控的目录迁移,请将 deployment .migrate-deployment-scanner-deployments.skip 环境属性设置为 false

迁移独立服务器配置时,JBoss 服务器迁移工具首先搜索任何配置的部署扫描程序。对于找到的每个扫描程序,它会搜索其被监控的目录以获取标记为 deployed 的部署,并将结果输出到控制台。

然后,处理工作流取决于您是否在交互模式或非互动模式运行工具,如下所述。

以非互动模式迁移部署扫描程序

如果您以非交互模式运行该工具,该工具将使用预配置的属性来确定是否迁移部署扫描程序部署。只有在 deployments.migrate-deployments.skipdeployments.migrate-deployment-scanner-deployments.skip 属性都设置为 false 时,才会迁移部署扫描程序部署。

以交互模式迁移部署扫描程序

如果您以交互模式运行该工具,JBoss 服务器迁移工具会提示您每个部署使用以下工作流。

  1. 在打印到控制台的部署扫描程序部署后,您会看到以下提示:

    This tool is not able to assert if the scanner's deployments found are compatible with the target server, skip scanner's deployments migration?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应以跳过部署扫描程序部署的迁移。所有部署引用都会从迁移的配置中删除,并结束迁移过程的一部分。
    • 无需进行相应 响应以继续迁移。
  2. 如果您选择继续,您会看到以下提示。

    Migrate all scanner's deployments found?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应,以自动迁移所有部署,并最终迁移迁移过程的一部分。
    • 无需进行相应 响应以继续迁移。
  3. 如果您选择继续,您会收到提示要求确认每个引用部署的迁移。

    Migrate scanner's deployment 'helloworld02.war'?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应以迁移部署。
    • 在没有响应的情况下,从迁移的配置中删除部署。

      INFO  [ServerMigrationTask#69] Resource with path EAP_NEW_HOME/standalone/deployments/helloworld02.war migrated.
      Copy to Clipboard Toggle word wrap
7.1.12.3. 为独立服务器迁移部署覆盖

部署覆盖的迁移是一个完全自动化的过程。如果您已通过将 deployments.migrate-deployments.skip 环境属性设置为 false 来实现部署迁移,JBoss 服务器迁移工具会搜索链接到迁移部署的单机服务器配置中引用的部署覆盖。它会自动迁移找到的、删除没有引用的内容,并将结果记录到其日志文件和控制台中。

7.2. 将 JBoss EAP 7.x 受管域迁移到 JBoss EAP 8.0

警告

使用 JBoss 服务器迁移工具时,在迁移主机前迁移域控制器,以确保您的域控制器在与主机使用的版本相比必须使用较新版本。例如,在 JBoss EAP 7 上运行的域控制器无法处理在 JBoss EAP 8.0 上运行的主机。

默认情况下,JBoss 服务器迁移工具在将受管域配置从 JBoss EAP 7 迁移到 JBoss EAP 8.0 时执行以下任务。

7.2.1. 迁移 JBoss 域属性

域相关属性名称中的 masterslave 词语被 'primary' 和 'secondary' 替换,迁移会自动修复旧属性名称的任何使用。

控制台会记录迁移重命名的任何属性。

  INFO JBoss domain property jboss.domain.master.address migrated to jboss.domain.primary.address
  INFO JBoss domain property jboss.domain.master.port migrated to jboss.domain.primary.port
  INFO JBoss domain property jboss.domain.master.protocol migrated to jboss.domain.primary.protocol
Copy to Clipboard Toggle word wrap

如果属性被成功重命名,则会显示以下信息:

  INFO JBoss domain properties migrated.
Copy to Clipboard Toggle word wrap

7.2.2. 删除不支持的子系统

JBoss 服务器迁移工具从迁移的服务器配置中删除所有不支持的子系统配置和扩展。工具会记录每个子系统,并在其日志文件删除时将其扩展记录到控制台。

注意

JBoss EAP 7.x 不支持的任何子系统,但由管理员添加到该服务器时也不支持 JBoss EAP 8.0,并将被删除。

要跳过删除不支持的子系统,请将 subsystem .remove-unsupported-subsystems.skip environment 属性设置为 true

您可以覆盖 JBoss 服务器迁移工具的默认行为,并使用以下环境属性指定迁移期间应包含或排除哪些子系统和扩展。

Expand
表 7.2. 服务器迁移环境属性
属性名称属性描述

extensions.excludes

不应迁移的模块名称列表,如 com.example.extension1, com.example.extension3

extensions.includes

应该始终迁移的模块名称列表,如 com.example.extension2,com.example.extension4

subsystems.excludes

子系统命名空间列表,从未迁移的版本,例如: urn:jboss:domain:logging,urn:jboss:domain:ejb3

subsystems.includes

子系统命名空间列表,剥离应始终迁移的版本,例如: urn:jboss:domain:security,urn:jboss:domain:ee

7.2.3. 为受管域迁移引用的模块

从源服务器迁移到目标服务器的配置可能会引用或依赖于目标服务器上没有安装的模块。JBoss 服务器迁移工具检测到这一点,并自动将引用的模块及其依赖模块从源服务器迁移到目标服务器。

通过以下过程迁移受管域配置引用的模块:

  • 数据源子系统配置引用 的模块 被迁移为数据源驱动程序模块。
  • ee 子系统配置引用的模块被迁移为全局模块。
  • 命名 子系统配置引用的模块作为对象工厂模块迁移。
  • 消息传递子系统配置引用的模块被迁移为 Jakarta Messaging bridge 模块。
  • 目标配置中没有安装的任何扩展都会迁移到目标服务器配置。

控制台会记录一个消息,而不是迁移的任何模块 ID。通过在 modules.excludes 环境属性中指定模块 ID,可以排除特定模块的迁移。

7.2.4. 为受管域迁移引用的路径

从源服务器迁移到目标服务器的配置可能会引用或依赖于还必须迁移到目标服务器的文件路径和目录。JBoss 服务器迁移工具不会迁移绝对路径参考。它仅迁移配置为相对于源配置的文件或目录。控制台会记录一个信息,而不是迁移的每个路径。

7.2.5. 迁移旧的 Security Realms

JBoss EAP 8 不支持传统的 Security Realms 框架。JBoss 服务器迁移工具将配置迁移到使用默认 JBoss EAP 8 Elytron 替换。

如果没有使用默认的传统安全域,您可能需要手动配置 Elytron。

控制台日志配置资源迁移到默认的 JBoss EAP 8 Elytron 替换。

 INFO  Legacy security XML configuration retrieved.
 WARN  Migrated Remoting subsystem's http connector resource /profile/full-ha/subsystem/remoting/http-connector/http-remoting-connector using a legacy security-realm, to Elytron's default application SASL Authentication Factory migration-defaultApplicationSaslAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem https-listener resource /profile/full-ha/subsystem/undertow/server/default-server/https-listener/https using a legacy security-realm, to Elytron's default TLS ServerSSLContext migration-defaultTLSServerSSLContext. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem http-invoker resource /profile/full-ha/subsystem/undertow/server/default-server/host/default-host/setting/http-invoker using a legacy security-realm, to Elytron's default Application HTTP AuthenticationFactory migration-defaultApplicationHttpAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 INFO  Legacy security realms migrated to Elytron.
 WARN  Migrated Remoting subsystem's http connector resource /profile/full/subsystem/remoting/http-connector/http-remoting-connector using a legacy security-realm, to Elytron's default application SASL Authentication Factory migration-defaultApplicationSaslAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem https-listener resource /profile/full/subsystem/undertow/server/default-server/https-listener/https using a legacy security-realm, to Elytron's default TLS ServerSSLContext migration-defaultTLSServerSSLContext. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem http-invoker resource /profile/full/subsystem/undertow/server/default-server/host/default-host/setting/http-invoker using a legacy security-realm, to Elytron's default Application HTTP AuthenticationFactory migration-defaultApplicationHttpAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 INFO  Legacy security realms migrated to Elytron.
 WARN  Migrated Remoting subsystem's http connector resource /profile/ha/subsystem/remoting/http-connector/http-remoting-connector using a legacy security-realm, to Elytron's default application SASL Authentication Factory migration-defaultApplicationSaslAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem https-listener resource /profile/ha/subsystem/undertow/server/default-server/https-listener/https using a legacy security-realm, to Elytron's default TLS ServerSSLContext migration-defaultTLSServerSSLContext. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem http-invoker resource /profile/ha/subsystem/undertow/server/default-server/host/default-host/setting/http-invoker using a legacy security-realm, to Elytron's default Application HTTP AuthenticationFactory migration-defaultApplicationHttpAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 INFO  Legacy security realms migrated to Elytron.
 WARN  Migrated Remoting subsystem's http connector resource /profile/default/subsystem/remoting/http-connector/http-remoting-connector using a legacy security-realm, to Elytron's default application SASL Authentication Factory migration-defaultApplicationSaslAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem https-listener resource /profile/default/subsystem/undertow/server/default-server/https-listener/https using a legacy security-realm, to Elytron's default TLS ServerSSLContext migration-defaultTLSServerSSLContext. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 WARN  Migrated Undertow subsystem http-invoker resource /profile/default/subsystem/undertow/server/default-server/host/default-host/setting/http-invoker using a legacy security-realm, to Elytron's default Application HTTP AuthenticationFactory migration-defaultApplicationHttpAuthenticationFactory. Please note that further manual Elytron configuration may be needed if the legacy security realm being used was not the source server's default Application Realm configuration!
 INFO  Legacy security realms migrated to Elytron.
Copy to Clipboard Toggle word wrap

7.2.6. 迁移旧的安全域

JBoss EAP 8 不支持传统的安全域框架。JBoss 服务器迁移工具将配置迁移到使用默认 JBoss EAP 8 Elytron 替换。

如果没有使用默认的传统安全域,您可能需要手动配置 Elytron。

控制台会记录迁移到默认 JBoss EAP 8 Elytron 替换的所有配置资源。

 WARN  Migrated ejb3 subsystem resource /profile/default/subsystem/ejb3/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated undertow subsystem resource /profile/default/subsystem/undertow/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated ejb3 subsystem resource /profile/full/subsystem/ejb3/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated undertow subsystem resource /profile/full/subsystem/undertow/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated messaging-activemq subsystem server resource /profile/full/subsystem/messaging-activemq/server/default, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated iiop-openjdk subsystem resource using legacy security domain to Elytron defaults. Please note that further manual Elytron configuration should be needed!
 WARN  Migrated ejb3 subsystem resource /profile/ha/subsystem/ejb3/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated undertow subsystem resource /profile/ha/subsystem/undertow/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated ejb3 subsystem resource /profile/full-ha/subsystem/ejb3/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated undertow subsystem resource /profile/full-ha/subsystem/undertow/application-security-domain/other using legacy security domain other, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated messaging-activemq subsystem server resource /profile/full-ha/subsystem/messaging-activemq/server/default, to Elytron's default application Security Domain. Please note that further manual Elytron configuration may be needed if the legacy security domain being used was not the source server's default Application Domain configuration!
 WARN  Migrated iiop-openjdk subsystem resource using legacy security domain to Elytron defaults. Please note that further manual Elytron configuration should be needed!
Copy to Clipboard Toggle word wrap

7.2.7. 迁移 keycloak 子系统

JBoss EAP 8 不支持 keycloak 子系统,它被 elytron-oidc-client 子系统替代。

默认情况下,JBoss 服务器迁移工具会自动迁移任何传统的子系统配置。要跳过此迁移任务,请将 subsystem.keycloak.migrate.skip 环境属性值设为 true

传统子系统迁移无需用户的任何交互即可执行。

当旧的 keycloak 子系统迁移完成后,迁移控制台中会显示以下信息:

INFO  Subsystem keycloak migrated.
Copy to Clipboard Toggle word wrap

迁移过程中遇到的任何问题都会写入日志文件,并显示在迁移控制台中。

7.2.9. 更新 jgroups 子系统配置

JBoss 服务器迁移工具不会自动迁移 jgroups 子系统配置。JBoss 服务器迁移工具将配置恢复到默认的 JBoss EAP 8 jgroups 配置。

如果没有使用默认的 JBoss EAP 8 jgroups 子系统配置,您可能需要手动配置 jgroups 子系统配置。

jgroups 子系统配置被更新时,控制台会记录一条消息:

 WARN  Configuration of JGroups protocols has been changed to match the default protocols of the target server. Please note that further manual configuration may be needed if the legacy configuration being used was not the source server's default configuration!
Copy to Clipboard Toggle word wrap

7.2.10. 为受管域迁移添加主机排除

JBoss EAP 8.0 域控制器可能包含在旧版服务器上运行的主机不支持的功能。host-exclude 配置指定那些旧版本中应隐藏的资源。

迁移域控制器配置时,JBoss 服务器迁移工具会将源服务器的 host-exclude 配置添加到或替换目标 JBoss EAP 8.0 服务器的配置。

JBoss 服务器迁移工具会自动更新 host-exclude 配置,并将结果记录到其日志文件和控制台中。

  INFO  Host-excludes configuration added.
Copy to Clipboard Toggle word wrap

7.2.11. 为受管域迁移部署

JBoss 服务器迁移工具 可以迁移以下类型的受管域部署配置:

  • 它引用的部署,也称为 持久部署
  • 部署覆盖它 引用。

部署的迁移包括在目标服务器上安装相关的文件资源,并可能会更新迁移的配置。

JBoss 服务器迁移工具已预先配置为在非交互模式运行时跳过部署。要启用部署迁移,请将 deployments.migrate-deployments.skip 环境属性设置为 false

重要

请注意,当您以交互模式运行 JBoss 服务器迁移工具并进入无效输入时,生成的行为取决于 deployments.migrate-deployments 环境属性值。

  • 如果 deployments.migrate-deployments.skip 设为 false,并且输入无效的输入,则工具将尝试迁移部署。
  • 如果 deployments.migrate-deployments.skip 设为 true,并且输入无效的输入,则工具将跳过部署迁移。
警告

JBoss 服务器迁移工具并不决定部署的资源是否与目标服务器兼容。这意味着应用程序或资源可能无法部署,可能无法按预期工作,或者可能根本不工作。另请注意,JBoss EAP 7.3 *-jms.xml 配置文件等工件在没有修改的情况下被复制,并可能导致 JBoss EAP 服务器使用错误引导。

红帽建议您使用 Migration Toolkit for Runtimes (MTR)分析部署,以确定不同 JBoss EAP 服务器间的兼容性。如需更多信息,请参阅 Migration Toolkit for Runtimes 产品文档

7.2.11.1. 为受管域迁移持久性部署

要在非交互模式运行时启用持久部署迁移,请将 deployments.migrate-persistent-deployments.skip 环境属性设置为 false

JBoss 服务器迁移工具搜索任何持久性部署引用,并将它们列出到控制台。

INFO  [ServerMigrationTask#67] Persistent deployments found: [cmtool-helloworld3.war, cmtool-helloworld4.war, cmtool-helloworld2.war, cmtool-helloworld1.war]
Copy to Clipboard Toggle word wrap

然后,处理工作流取决于您是否在 交互模式或非互动 模式运行工具,如下所述。

以非互动模式迁移持久性部署

如果您以非交互模式运行该工具,该工具将使用预配置的属性来确定是否迁移持久部署。只有在 deployments.migrate-deployments.skipdeployments.migrate-persistent-deployments.skip 属性都设置为 false 时,才会迁移持久性部署。

以互动模式迁移持久性部署

如果您以交互模式运行该工具,JBoss 服务器迁移工具会提示您每个部署使用以下工作流。

  1. 打印到控制台的持久部署后,您会看到以下提示。

    This tool is not able to assert if persistent deployments found are compatible with the target server, skip persistent deployments migration?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应以跳过持久部署的迁移。所有部署引用都会从迁移的配置中删除,并结束迁移过程的一部分。
    • 无需进行相应 响应以继续迁移。
  2. 如果您选择继续,您会看到以下提示。

    Migrate all persistent deployments found?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应,以自动迁移所有部署,并最终迁移迁移过程的一部分。
    • 无需进行相应 响应以继续迁移。
  3. 如果您选择继续,您会收到提示要求确认每个引用部署的迁移。

    Migrate persistent deployment 'helloworld01.war'?
    yes/no?
    Copy to Clipboard Toggle word wrap
    • 使用 yes 响应以迁移部署。
    • 在没有响应的情况下,从迁移的配置中删除部署。

      INFO  [ServerMigrationTask#68] Removed persistent deployment from configuration /deployment=helloworld01.war
      Copy to Clipboard Toggle word wrap
7.2.11.2. 为受管域迁移部署覆盖

部署覆盖的迁移是一个完全自动化的过程。如果您已通过将 deployments.migrate-deployments.skip 环境属性设置为 false 来实现部署迁移,JBoss 服务器迁移工具会搜索链接到迁移部署的单机服务器配置中引用的部署覆盖。它会自动迁移找到的、删除没有引用的内容,并将结果记录到其日志文件和控制台中。

7.3. 将 JBoss EAP 7.x 主机配置迁移到 JBoss EAP 8.0

默认情况下,JBoss 服务器迁移工具在将主机服务器配置从 JBoss EAP 7.x 迁移到 JBoss EAP 8.0 时执行以下任务。

7.3.1. 迁移 JBoss 域属性

域相关属性名称中的 masterslave 词语被 'primary' 和 'secondary' 替换,迁移会自动修复旧属性名称的任何使用。

控制台会记录迁移重命名的任何属性。

  INFO JBoss domain property jboss.domain.master.address migrated to jboss.domain.primary.address
  INFO JBoss domain property jboss.domain.master.port migrated to jboss.domain.primary.port
  INFO JBoss domain property jboss.domain.master.protocol migrated to jboss.domain.primary.protocol
Copy to Clipboard Toggle word wrap

如果属性被成功重命名,则会显示以下信息:

  INFO JBoss domain properties migrated.
Copy to Clipboard Toggle word wrap

7.3.2. 为主机配置迁移引用的模块

从源服务器迁移到目标服务器的配置可能会引用或依赖于目标服务器上没有安装的模块。JBoss 服务器迁移工具检测到这一点,并自动将引用的模块及其依赖模块从源服务器迁移到目标服务器。

使用以下流程迁移主机服务器配置引用的模块。

  • 安全域配置引用的模块被迁移为插件模块。

控制台会记录一个消息,而不是迁移的任何模块 ID。通过在 modules.excludes 环境属性中指定模块 ID,可以排除特定模块的迁移。

7.3.3. 为主机配置迁移引用的路径

从源服务器迁移到目标服务器的配置可能会引用或依赖于还必须迁移到目标服务器的文件路径和目录。JBoss 服务器迁移工具不会迁移绝对路径参考。它仅迁移配置为相对于源配置的文件或目录。控制台会记录一个信息,而不是迁移的每个路径。

附录 A. 参考材料

A.1. 任务摘要报告示例

以下是 Task Summary 报告的示例。

-------------
 Task Summary
-------------

 server ............................................................................................................ SUCCESS
  standalone ....................................................................................................... SUCCESS
   standalone-configurations ....................................................................................... SUCCESS
    standalone-configuration(source=/home/username/jboss-eap-8.0/standalone/configuration/standalone-full-ha.xml) .. SUCCESS
    standalone-configuration(source=/home/username/jboss-eap-8.0/standalone/configuration/standalone-full.xml) ..... SUCCESS
    standalone-configuration(source=/home/username/jboss-eap-8.0/standalone/configuration/standalone-ha.xml) ....... SUCCESS
    standalone-configuration(source=/home/username/jboss-eap-8.0/standalone/configuration/standalone-osgi.xml) ..... SUCCESS
    standalone-configuration(source=/home/username/jboss-eap-8.0/standalone/configuration/standalone.xml) .......... SUCCESS
  domain ........................................................................................................... SUCCESS
   domain-configurations ........................................................................................... SUCCESS
    domain-configuration(source=/home/username/jboss-eap-8.0/domain/configuration/domain.xml) ...................... SUCCESS
   host-configurations ............................................................................................. SUCCESS
    host-configuration(source=/home/username/jboss-eap-8.0/domain/configuration/host-master.xml) ................... SUCCESS
    host-configuration(source=/home/username/jboss-eap-8.0/domain/configuration/host-slave.xml) .................... SUCCESS
    host-configuration(source=/home/username/jboss-eap-8.0/domain/configuration/host.xml) .......................... SUCCESS

--------------------------
 Migration Result: SUCCESS
--------------------------
Copy to Clipboard Toggle word wrap

A.2. HTML 报告示例

以下是 JBoss 服务器迁移 HTML 报告的示例。

图 A.1. 示例:部分概述

HTML 报告部分概述

图 A.2. 示例:任务详情页面

HTML 报告任务

A.3. XML 报告示例

以下是 JBoss 服务器迁移 XML 报告的示例。

<?xml version="1.0" ?>

<server-migration-report xmlns="urn:jboss:server-migration:1.0" start-time="Mon, 30 Oct 2023 16:13:30 UTC">
  <servers>
    <source name="EAP" version="7.4.0.GA" base-dir="/home/username/tools/jboss-eap-7.4"/>
    <target name="JBoss EAP" version="8.0.0.GA" base-dir="/home/username/tools/jboss-eap-8.0"/>
  </servers>
  <environment>
    <property name="baseDir" value="/home/username/tools/jboss-eap-8.0/migration"/>
    <property name="deployments.migrate-deployment-scanner-deployments.processedDeploymentScannerDirs" value="/home/username/tools/jboss-eap-7.4/standalone/deployments"/>
    <property name="report.html.fileName" value="migration-report.html"/>
    <property name="report.html.maxTaskPathSizeToDisplaySubtasks" value="4"/>
    <property name="report.html.templateFileName" value="migration-report-template.html"/>
    <property name="report.summary.maxTaskPathSizeToDisplaySubtasks" value="3"/>
    <property name="report.xml.fileName" value="migration-report.xml"/>
    <property name="subsystem.ee.update.setup-javaee7-default-bindings.defaultDataSourceName" value="ExampleDS"/>
    <property name="subsystem.ee.update.setup-javaee7-default-bindings.defaultJmsConnectionFactoryName" value="hornetq-ra"/>
    <property name="subsystem.logging.update.remove-console-handler.skip" value="true"/>
  </environment>
  <task number="1" name="server">
    <logger logger="org.jboss.migration.core.task.ServerMigrationTask#1"/>
    <result status="SUCCESS"/>
    <subtasks>
      <task number="2" name="modules.migrate-modules-requested-by-user">
        <logger logger="org.jboss.migration.core.task.ServerMigrationTask#2"/>
        <result status="SKIPPED"/>
      </task>
      <task number="3" name="standalone">
        <logger logger="org.jboss.migration.core.task.ServerMigrationTask#3"/>
        <result status="SUCCESS"/>
        <subtasks>
          <task number="4" name="contents.standalone.migrate-content-dir">
            <logger logger="org.jboss.migration.core.task.ServerMigrationTask#4"/>
            <result status="SKIPPED"/>
          </task>
          <task number="5" name="standalone-configurations">
            <logger logger="org.jboss.migration.core.task.ServerMigrationTask#5"/>
            <result status="SUCCESS"/>
            <subtasks>
              <task number="6" name="standalone-configuration(source=/home/username/tools/jboss-eap-6.4/standalone/configuration/standalone-full-ha.xml)">
                <logger logger="org.jboss.migration.core.task.ServerMigrationTask#6"/>
                <result status="SUCCESS"/>
                <subtasks>
                  <task number="7" name="subsystems.remove-unsupported-subsystems">
                    <logger logger="org.jboss.migration.core.task.ServerMigrationTask#7"/>
                    <result status="SUCCESS"/>
                    <subtasks>
                      <task number="8" name="subsystems.remove-unsupported-subsystems.remove-unsupported-extension(module=org.jboss.as.cmp)">
                        <logger logger="org.jboss.migration.core.task.ServerMigrationTask#8"/>
                        <result status="SUCCESS"/>
                      </task>
                    </substasks>
                  </task>
                  ...
                  <task number="644" name="hosts">
                    <logger logger="org.jboss.migration.core.task.ServerMigrationTask#644"/>
                    <result status="SUCCESS"/>
                    ...
                    <subtasks>
                      ...
                      <task number="645" name="host(name=master)">
                        <logger logger="org.jboss.migration.core.task.ServerMigrationTask#645"/>
                        <result status="SUCCESS"/>
                        <subtasks>
                          ...
                          <task number="661" name="security-realms.migrate-properties">
                            <logger logger="org.jboss.migration.core.task.ServerMigrationTask#661"/>
                            <result status="SUCCESS"/>
                            <subtasks>
                              <task number="662" name="security-realm.ManagementRealm.migrate-properties">
                                <logger logger="org.jboss.migration.core.task.ServerMigrationTask#662"/>
                                <result status="SUCCESS"/>
                              </task>
                              <task number="663" name="security-realm.ApplicationRealm.migrate-properties">
                                <logger logger="org.jboss.migration.core.task.ServerMigrationTask#663"/>
                                <result status="SUCCESS"/>
                              </task>
                            </subtasks>
                          </task>
                          <task number="664" name="security-realm.ApplicationRealm.add-ssl-server-identity">
                            <logger logger="org.jboss.migration.core.task.ServerMigrationTask#664"/>
                            <result status="SUCCESS"/>
                          </task>
                        </subtasks>
                      </task>
                    </subtasks>
                  </task>
                </subtasks>
              </task>
            </subtasks>
          </task>
        </subtasks>
      </task>
    </subtasks>
  </task>
</server-migration-report>
Copy to Clipboard Toggle word wrap





更新于 2024-02-08

法律通告

Copyright © 2024 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部