當您準備要產生對映檔時,請遵循準備對映檔中的指示。
對映檔包含 Jazz Team Server、其登錄的應用程式,以及應用程式所提供之其他 URL 的 source-target URL 配對。URL 分成兩種類型:
URL 配對是重新命名的一部分,它含有 Jazz Team Server 網域之下的一切。這些包括:Jazz Team Server 公用 URL、應用程式公用 URL,以及應用程式所提供的其他 URL。
受影響的 URL 包含其他任何系統,這些系統會與這個拓蹼互動,但不在這個 Jazz Team Server 網域之下。如果 Rational® Engineering Lifecycle Manager 應用程式向不同 Jazz Team Server 登錄,但該應用程式是這個 Jazz Team Server 的夥伴,就代表受影響的 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 Service
source=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 不重新命名,請用 ' #' 來註銷配對。
# 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 皆共用通訊協定、主機、網域和埠,則可以縮減對映檔,使其只包含一個 source-target 項目。舉例來說,如果您在 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 會部署在使用預設埠的伺服器上(為應用程式伺服器配置埠,或使用正在預設埠上執行的反向 Proxy HTTP 伺服器)。在 Rational Engineering Lifecycle Manager 中,也會儲存資源 URL 的鏈結,其中,會將埠明確包含在 URL 中,例如:
https://relmhost.example.org:443/resource/...
由於 URL 有可能儲存成這兩種格式,因此每一個 URL 各需要一項對映。舉例來說,假設將 relmhost.example.org 重新命名為 newhost.example.org。在此情況下,在執行重新命名時,需要下列對映。generateURLMappings 會自動產生配對。
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,您可以忽略找到的遺漏對映。如需進一步詳細資料,請參閱用來驗證對映檔的儲存庫工具指令。