第 5 章 从 Red Hat OpenShift Container Platform 3 上的部署迁移信息
如果您之前在 Red Hat OpenShift Container Platform 3 上部署了 Red Hat Process Automation Manager,您可以将该部署中的信息迁移到 Red Hat OpenShift Container Platform 4 上的新部署。
在迁移信息前,您必须使用 Operator 在 Red Hat OpenShift Container Platform 4 上部署新的 Red Hat Process Automation Manager 基础架构。在新基础架构中包括与旧部署中存在的相同元素。例如:
- 对于任何现有编写部署,创建一个新的编写基础架构,包括 Business Central 和至少一个 KIE Server。
- 对于任何现有不可变 KIE 服务器,请使用相同的工件部署一个新的不可变 KIE 服务器。
- 对于具有 MySQL 或 PostgreSQL 数据库 pod 的任何现有 KIE 服务器,请部署具有相同数据库 pod 类型的新 KIE 服务器。
- 对于使用外部数据库服务器的任何现有 KIE 服务器,请部署一个新的 KIE 服务器,该服务器使用相同的外部数据库服务器,并具有相同的凭证。服务器连接到同一数据库,因此可以读取进程上下文状态。
如果 KIE 服务器使用 H2 内置数据库,则不支持进程上下文状态的迁移。
智能路由器不需要迁移。智能路由器的新部署会自动用于新 KIE 服务器上的服务。
5.1. 在 Business Central 中迁移信息
如果您在 Red Hat OpenShift Container Platform 3 中有一个现有的编写环境,您可以在 Red Hat OpenShift Container Platform 4 的新部署中将 .niogit
存储库和 Maven 存储库从这个环境中的 Business Central 复制到 Business Central。此操作使所有相同的项目和工件在新部署中可用。
先决条件
- 您必须有一个可以访问 Red Hat OpenShift Container Platform 3 和 Red Hat OpenShift Container Platform 4 基础架构的机器。
-
机器上必须安装来自 Red Hat OpenShift Container Platform 4 的
oc
命令行客户端。有关安装命令行客户端的说明,请参阅 Red Hat OpenShift Container Platform 文档中的 CLI 工具。
流程
- 确保没有 Web 客户端,且没有客户端应用程序连接到旧和新部署的任何元素,包括 Business Central 和 KIE 服务器。
- 创建一个空的临时目录并进到其中。
-
使用
oc
命令,登录到 Red Hat OpenShift Container Platform 3 基础架构,并切换到包含旧部署的项目。 要查看旧部署中的 pod 名称,请运行以下命令:
oc get pods
查找 Business Central pod。此 pod 的名称包括
rhpamcentr
。在高可用性部署中,您可以使用任何 Business Central pod。使用
oc
命令将.niogit
存储库和 Maven 存储库从 pod 复制到本地机器,例如:oc cp myapp-rhpamcentr-5-689mw:/opt/kie/data/.niogit .niogit oc cp myapp-rhpamcentr-5-689mw:/opt/kie/data/maven-repository maven-repository
-
使用
oc
命令,登录到 Red Hat OpenShift Container Platform 4 基础架构,并切换到包含新部署的项目。 要查看新部署中的 pod 名称,请运行以下命令:
oc get pods
查找 Business Central pod。此 pod 的名称包括
rhpamcentr
。在高可用性部署中,您可以使用任何 Business Central pod。使用
oc
命令将.niogit
存储库和 Maven 存储库从本地机器复制到 pod,例如:oc cp .niogit myappnew-rhpamcentr-abd24:/opt/kie/data/.niogit oc cp maven-repository myappnew-rhpamcentr-abd24:/opt/kie/data/maven-repository