設定測試暫置環境時使用的拓蹼和對映檔

這個主題顯示拓蹼圖和對映檔範例,其中顯示使用伺服器重新命名,來設定含有實際正式作業資料的測試暫置環境。暫置環境是一個測試沙盤推演,它含有與正式作業環境隔離的正式作業資料 Snapshot。

規劃測試暫置環境時,您需要特別小心不要污染正式作業資料,反之亦然。 作法是在對映檔中遮蔽正式作業伺服器。請務必考量其他任何可能連接到正式作業伺服器的 CLM 伺服器或任何整合伺服器。

起點 1 - 單一伺服器 CLM 正式作業部署

下列拓蹼圖顯示重新命名之前的非分散式 CLM 部署。在本例中,Jazz™ Team Server 和三個 CLM 應用程式都位於相同的主機系統上。

單一伺服器 CLM 正式作業部署

複製正式作業環境

如果要將正式作業部署複製到暫置環境,以便執行伺服器重新命名和評估結果,請遵循使用正式作業資料來設定測試暫置環境中的指示。下圖顯示重新命名之後的拓蹼樣貌,其中,CLM 應用程式全都位於相同的暫置伺服器 staging.example.org 上。

複製正式作業環境

這項實務符合簡化對映檔的需求。所準備的對映檔只需包含一項對映。不需要虛擬對映,因為簡化對映涵蓋這個拓蹼中的所有 URL。如需進一步詳細資料,請參閱使用簡化對映檔。

# Simplified mapping
source=https://production.example.org:9443
target=https://staging.example.org:9443

建議您編輯主機檔,以便將正式作業 URL 重新導向至虛假的 IP 位址,請見如下所示:

# 10.10.10.10 refers to an IP address that does not host a clm application.
10.10.10.10   production.example.org

起點 2 - 含有兩項鏈結的 CLM 部署的正式作業環境

下列拓蹼圖顯示兩項鏈結的 CLM 部署。每一項 CLM 部署都是分散式,Jazz Team Server 和每一個應用程式在個別的主機上執行。這兩項部署都整合了 Rational Report 伺服器,其中一項部署還整合了 Rational ClearQuest 和 Rational ClearCase。

含有兩項鏈結的 CLM 部署的正式作業環境

將單一分散式部署複製到暫置環境

如果要將正式作業部署複製到暫置環境,以便執行伺服器重新命名和評估結果,請遵循使用正式作業資料來設定測試暫置環境中的指示。在這項實務中,我們只要將其中一項部署帶到暫置區。下圖顯示在暫置環境中重新命名之後的拓蹼樣貌。請注意,暫置環境中不支援 Rational ClearQuest 和 Rational ClearCase,因此第二項部署會變成灰色。

在其中一項部署重新命名之後的兩項鏈結的 CLM 部署

產生和編輯對映檔之後,檔案應該類似如下。為了避免暫置環境與正式作業環境之間遭到污染,已將虛擬對映新增至未暫置的正式作業伺服器 URL 的對映檔中。

#/jts
source=https://jts1.production.example.org:9443/jts
target=https://jts1.staging.example.org:9443/jts
#Additional Urls included in rename by /jts
#(CLM Help URL)
source=https://jts1.production.example.org:9443/clmhelp
target=https://jts1.staging.example.org:9443/clmhelp

#/admin
source=https://jts1.production.example.org:9443/admin
target=https://jts1.staging.example.org:9443/admin

#/ccm
source=https://ccm1.production.example.org:9443/ccm
target=https://ccm1.staging.example.org:9443/ccm

#/qm
source=https://qm1.production.example.org:9443/qm
target=https://qm1.staging.example.org:9443/qm

#/rm
source=https://rm1.production.example.org:9443/rm
target=https://rm1.staging.example.org:9443/rm
#Additional Urls included in rename by /rm
#(The address of the application used to generate images for graphical artifacts.)
source=https://rm1.production.example.org:9443/converter/htmlgen
target=https://rm1.staging.example.org:9443/converter/htmlgen

# RRDI
source=https://rrdi.production.example.org:9082/reporting
target=https://rrdi.staging.example.org:9082/reporting

# Affected URLs
# https://cqwebhost.production.example.org:9443/cqweb/oslc
# https://cqsynchhost.production.example.org:8444/cqconnector/gateway

# Dummy mappings for affected URLs
source=https://cqwebhost.production.example.org:9443
target=https://dummyhost1.example.org:9443
source=https://cqsynchhost.production.example.org:8444
target=https://dummyhost2.example.org:8444

# Dummy mappings for the second CLM deployment
#/jts
source=https://jts2.production.example.org:9443/jts
target=https://jts2.dummyhost.example.org:9443/jts
#Additional Urls included in rename by /jts
#(CLM Help URL)
source=https://jts2.production.example.org:9443/clmhelp
target=https://jts2.dummyhost.example.org:9443/clmhelp

#/admin
source=https://jts2.production.example.org:9443/admin
target=https://jts2.dummyhost.example.org:9443/admin

#/ccm
source=https://ccm2.production.example.org:9443/ccm
target=https://ccm2.dummyhost.example.org:9443/ccm

#/qm
source=https://qm2.production.example.org:9443/qm
target=https://qm2.dummyhost.example.org:9443/qm

#/rm
source=https://rm2.production.example.org:9443/rm
target=https://rm2.dummyhost.example.org:9443/rm
#Additional Urls included in rename by /rm
#(The address of the application used to generate images for graphical artifacts.)
source=https://rm2.production.example.org:9443/converter/htmlgen
target=https://rm2.dummyhost.example.org:9443/converter/htmlgen

建議您編輯主機檔,以便將所有正式作業 URL 重新導向至虛假的 IP 位址。

# 10.10.10.10 refers to an IP address that does not host a clm application.
10.10.10.10   cqwebhost.production.example.org
10.10.10.10   cqsynchhost.production.example.org
10.10.10.10   jts2.production.example.org
10.10.10.10   ccm2.production.example.org
10.10.10.10   qm2.production.example.org
10.10.10.10   rm2.production.example.org

將兩種分散式部署都複製到暫置環境

如果要將正式作業部署複製到暫置環境,以便執行伺服器重新命名和評估結果,請遵循使用正式作業資料來設定測試暫置環境中的指示。由於部署彼此鏈結,這兩項部署的 URL 位於各自的資料庫中。在這個範例中,為兩種 CLM 部署分別準備了個別的對映檔。 必須在每一部 Jazz Team Server 上各執行兩次 importURLMappings 指令 - 其中一次用於 Jazz Team Server 對映檔,另一次用於另一個 Jazz Team Server 產生的對映檔。下圖顯示在暫置環境中重新命名之後的拓蹼樣貌。請注意,暫置環境中不支援 ClearQuest 和 ClearCase。

在兩項部署都重新命名之後的兩項鏈結的 CLM 部署

產生和編輯第一項部署的對映檔之後,檔案應該類似如下。已將虛擬對映新增至對映檔,以避免暫置和正式作業環境之間的污染。

#/jts
source=https://jts1.production.example.org:9443/jts
target=https://jts1.staging.example.org:9443/jts
#Additional Urls included in rename by /jts
#(CLM Help URL)
source=https://jts1.production.example.org:9443/clmhelp
target=https://jts1.staging.example.org:9443/clmhelp

#/admin
source=https://jts1.production.example.org:9443/admin
target=https://jts1.staging.example.org:9443/admin

#/ccm
source=https://ccm1.production.example.org:9443/ccm
target=https://ccm1.staging.example.org:9443/ccm

#/qm
source=https://qm1.production.example.org:9443/qm
target=https://qm1.staging.example.org:9443/qm

#/rm
source=https://rm1.production.example.org:9443/rm
target=https://rm1.staging.example.org:9443/rm
#Additional Urls included in rename by /rm
#(The address of the application used to generate images for graphical artifacts.)
source=https://rm1.production.example.org:9443/converter/htmlgen
target=https://rm1.staging.example.org:9443/converter/htmlgen

# RRDI
source=https://rrdi.production.example.org:9082/reporting
target=https://rrdi.staging.example.org:9082/reporting

# Affected URLs
# https://cqwebhost.production.example.org:9443/cqweb/oslc
# https://cqsynchhost.production.example.org:8444/cqconnector/gateway

# Dummy mappings
source=https://cqwebhost.example.org:9443
target=https://dummyhost1.example.org:9443
source=https://cqsynchhost.production.example.org:8444
target=https://dummyhost2.example.org:9443

產生和編輯第二項部署的對映檔之後,檔案應該類似如下。已將虛擬對映新增至對映檔,以避免暫置和正式作業環境之間的污染。請注意,第一個和第二個對映檔包含相同的 RRDI 對映。importURLMappings 指令會偵測到它們相同,因此同樣的作業不會執行二次。

#/jts
source=https://jts2.production.example.org:9443/jts
target=https://jts2.staging.example.org:9443/jts
#Additional Urls included in rename by /jts
#(CLM Help URL)
source=https://jts2.production.example.org:9443/clmhelp
target=https://jts2.staging.example.org:9443/clmhelp

#/admin
source=https://jts2.production.example.org:9443/admin
target=https://jts2.staging.example.org:9443/admin

#/ccm
source=https://ccm2.production.example.org:9443/ccm
target=https://ccm2.staging.example.org:9443/ccm

#/qm
source=https://qm2.production.example.org:9443/qm
target=https://qm2.staging.example.org:9443/qm

#/rm
source=https://rm2.production.example.org:9443/rm
target=https://rm2.staging.example.org:9443/rm
#Additional Urls included in rename by /rm
#(The address of the application used to generate images for graphical artifacts.)
source=https://rm2.production.example.org:9443/converter/htmlgen
target=https://rm2.staging.example.org:9443/converter/htmlgen

# RRDI
source=https://rrdi.production.example.org:9082/reporting
target=https://rrdi.staging.example.org:9082/reporting

# Dummy mappings
source=https://cqwebhost.production.example.org:9443
target=https://dummyhost1.example.org:9443
source=https://cqsynchhost.production.example.org:8444
target=https://dummyhost2.example.org:9443

建議您編輯主機檔,以便將正式作業 URL 重新導向至虛假的 IP 位址。

# 10.10.10.10 refers to an IP address that does not host a clm application.
10.10.10.10   cqwebhost.production.example.org
10.10.10.10   cqsynchhost.production.example.org

意見