当您准备生成映射文件时,请遵循准备映射文件中的指示信息。
此映射文件中包含 Jazz Team Server 及其已注册的应用程序的“源/目标 URL”对,还包含这些应用程序提供的其他 URL。URL 分为以下两种类型:
作为重命名的一部分的 URL 对包括 Jazz Team Server 的域中的所有内容。这些内容包括 Jazz Team Server 公用 URL、应用程序公用 URL 以及应用程序所提供的其他 URL。
受影响的 URL 包括与此拓扑进行交互、但是不在此 Jazz Team Server 的域中的任何其他系统。已向另外的 Jazz Team Server 注册、但是与此 Jazz Team Server 为好友的 Rational® Engineering Lifecycle Manager 应用程序表示受影响的 URL。外部集成(例如,Rational ClearQuest®)也表示受影响的 URL。
# JTS
source=https://relmhost.example.org:9443/jts
target=https://relmhost2.example.org:9443/jts
#Additional Urls included in rename by relmhost.example.org:9443/jts
# ADMIN
source=https://relmhost.example.org:9443/admin
target=https://relmhost2.example.org:9443/admin
#(relm Help URL)
source=https://relmhost.example.org:9443/relmhelp
target=https://relmhost2.example.org:9443/relmhelp
# RELM
source=https://relmhost.example.org:9443/relm
target=https://relmhost2.example.org:9443/relm
# Jazz Reporting Servicesource=https://relmhost.example.org:9443/sparql
target=https://relmhost2.example.org:9443/sparql
#The following list of URLs represent external servers that integrate
with this Jazz Team Server or with applications registered to it.
#Do not uncomment these lines as they are for reference purposes only.
# Friend Entry
#source=https://friend1.example.org:9443/jts/rootservices
#target=https://friend1.example.org:9443/jts/rootservices
#source=https://cqconnector.example.org:9084/cqconnector/gateway
#target=https://cqconnector.example.org:9084/cqconnector/gateway
所生成的映射文件是一个模板,在运行 importURLMappings 之前必须编辑此模板。请了解此映射文件中的所有内容,这一点很重要,以确保对拓扑中的所有系统都正确进行了重命名。此文件的上半部分包括作为重命名一部分的 URL 对。在此示例中,您可以查看 Jazz Team Server 及其所有已注册的应用程序的公用 URL 的 URL 对;您还可以查看由应用程序提供的 URL 对。
请查看这些 URL 中的每个 URL,并确定哪些 URL 在改变。请更新将使用其新值来重命名的任何源 URL 的目标。如果未对所给定的源 URL 进行重命名,请使用“#”将此 URL 对注释掉。
# JTS
#source=https://relmhost.example.org:9443/jts
#target=https://relmhost2.example.org:9443/jts
此映射文件的底部包含已注释掉的受影响 URL 的列表。这些 URL 不是此重命名的一部分,但是它们受到不断变化的 URL 的影响。除非需要屏蔽生产 URL,否则您应当保持这些 URL 处于已注释掉状态,因为它们仅供参考。
如果您处于登台环境,那么您应当始终屏蔽受影响的 URL,以确保登台服务器与生产服务器之间不存在交叉链接。请参阅以下内容以了解详细信息。
如果需要屏蔽受影响的 URL,那么必须对源/目标对取消注释并提供伪目标。
设置登台环境时,您需要为映射文件中任何受影响的 URL 创建伪映射。受影响的 URL 可以包括与此部署为好友的其他 relm 应用程序或者外部服务器。对于好友条目,请为此好友的公用 URL 创建伪映射。
例如,如果您的好友条目 URL 为 https://friendhost.example.org:9443/jts/rootservices,那么公用 URL 通常为 https://friendhost.example.org:9443/jts。在映射文件底部添加一个 URL 对,以通过将目标设置为假主机名来屏蔽此 URL。在选择伪目标主机名之前,请确认无法访问此目标主机名。
# Friend
source=https://friendhost.example.org:9443/jts
target=https://dummyfriendhost.example.org:9443/jts
对于任何受影响且不是好友条目的 URL,请在映射文件底部添加以下 URL 对:
source=https://externalserver.example.org:9555/
target=https://dummyhost.example.org:9555/
不允许多次使用同一目标。如果您有多个好友条目,那么使用 dummyhost2 和 dummyhost3 等等。如果您有单台服务器部署,Jazz Team Server 和应用程序全部都位于同一主机和端口,那么您可以按如下所述使用简化映射。
如果您具有简单的拓扑,所有 URL 具有公用的协议、主机、域和端口,那么可以将映射文件简化为只包含一个“源/目标”条目。例如,如果您在 relmhost.example.org 具有一体式部署,并且您想要将所有对象重命名以使用 newhost.example.org,那么您可以编辑所生成的映射文件,使其只包括下列 URL:
source=https://relmhost.example.org:9443
target=https://newhost.example.org:9443
如果任何源 URL 都使用缺省端口,然而未明确包括缺省端口号,那么需要两组映射:一组具有缺省端口,另一组没有缺省端口。generateURLMappings 命令会为您自动生成附加映射。对于 https,缺省端口为 443;对于 http,缺省端口为 80。
例如,Rational Engineering Lifecycle Manager 在 https://relmhost.example.org/relm 中运行。在这种情况下,Rational Engineering Lifecycle Manager 部署在使用缺省端口的服务器上(通过为应用程序服务器配置此端口,或者通过使用在缺省端口上运行的逆向代理 http 服务器来实现)。在 Rational Engineering Lifecycle Manager 中,可能还存储了资源的 URL 的链接,端口显式包含在 URL 中,例如:
https://relmhost.example.org:443/resource/...
由于可能可以采用两种形式来存储 URL,因此每个 URL 都需要映射。例如,假定 relmhost.example.org 重命名为 newhost.example.org。在这种情况下,下列映射将需要执行重命名。将由 generateURLMappings 自动生成 URL 对。
source=https://relmhost.example.org/relm
target=https://newhost.example.org/relm
source=https://relmhost.example.org:443/relm
target=https://newhost.example.org:443/relm
建议使用全大写字母指定 URL。URL 区分大小写。
由于涉及到的处理量,可能会发生错误。某些错误会明确指出,例如,如果您试图在启动服务器之前生成映射文件,或者您使用错误的登录凭证。其他错误不太明显。有关服务器重命名错误的详细信息,请参阅对服务器重命名进行故障诊断。
生成并编辑映射文件之后,请确保运行 repotools-jts -verifyURLMappings 命令以检查缺失的映射并执行一些其他验证。在某些情况下,如果您不需要映射该 URL,那么可以忽略找到的缺失映射。有关更多详细信息,请参阅用于验证映射文件的存储库工具命令。