1. Trang chủ
  2. » Công Nghệ Thông Tin

Pro BizTalk 2006 phần 9 pot

52 157 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Pro BizTalk 2006

    • Chapter 11

Nội dung

i. In the Add Resources window, click the Add button and select the C:\PROBIZTALK\ DeploymentSampleApplication\TestingBindings.xml file. j. In the Add Resources window, type Testing in the Target Environment text box.This text box allows you to specify which environment a binding file is applied to upon installation of the BizTalk MSI application. k. In the Add Resources window, click the OK button. 3. Add a pre-processing script to the PROBIZTALK Deploy Sample Application: a. In Notepad, create a new file and insert content of the command file presented in Listing 10-2. b. Save the file as C:\PROBIZTALK\DeploymentSampleApplication\TestingDirs.cmd. c. In the BizTalk Server 2006 Administration Console, expand BizTalk Server 2006 ➤ BizTalk Group ➤ Applications ➤ PROBIZTALK Deploy Sample Application. d. Right-click the PROBIZTALK Deploy Sample Application, point to Add, and then click Pre-processing scripts. e. In the Add Resources window shown on Figure 10-7, click the Add button, and select the C:\PROBIZTALK\DeploymentSampleApplication\TestingDirs.cmd file. f. In the Add Resources window, click the OK button. CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS 391 Figure 10-7. Add Resources dialog 6994ch10final.qxd 10/2/06 12:23 AM Page 391 4. Export the PROBIZTALK Deploy Sample Application to an MSI file: a. In the BizTalk Server 2006 Administration Console, expand BizTalk Server 2006 ➤ BizTalk Group ➤ Applications ➤ PROBIZTALK Deploy Sample Application. b . R ight-click the PROBIZTALK Deploy Sample Application, point to Export, and then click MSI. c. When the Welcome window appears as shown on Figure 10-8, click the Next button. d. In the Select Resources window shown on Figure 10-9, ensure that all BizTalk artifacts are checked, and then click the Next button. e. Since the application does not have any virtual directories, click the Next button in the Specify IIS Hosts window as shown on Figure 10-10. CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS392 Figure 10-8. Export MSI File Wizard Welcome screen 6994ch10final.qxd 10/2/06 12:23 AM Page 392 CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS 393 Figure 10-9. Export MSI File Wizard Resources screen Figure 10-10. Export MSI File Wizard—Specify IIS Hosts screen 6994ch10final.qxd 10/2/06 12:23 AM Page 393 f. The Dependencies window shown in Figure 10-11 enumerates all the dependencies for the applica- tion. As you can see in this particular case, this application depends only on the BizTalk.System a pplication. Click the Next button. g. Type C:\ProBizTalkSample.msi and then click the Export button in the Destination window as shown in Figure 10-12. h. In the Summary window shown in the Fig 10-13, click the Finish button. CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS394 Figure 10-11. Export MSI File Wizard—Dependencies screen 6994ch10final.qxd 10/2/06 12:23 AM Page 394 CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS 395 Figure 10-12. Export MSI File Wizard—Destination screen Figure 10-13. E xpor t MSI F ile Wizard—Summary screen 6994ch10final.qxd 10/2/06 12:23 AM Page 395 Once you have exported your BizTalk application to an MSI package, you can import or install it onto a new BizTalk Server Group. When importing or installing an MSI BizTalk appli- cation, you can specify the following parameters: • Application name: The name of the application used to import or install the MSI pack- a ge. If the application name is not provided, the default BizTalk application name will be used. • Environment: The target environment where the MSI package is being imported or installed. This parameter allows all binding files for the specified environment to be applied to the BizTalk server. If the environment parameter is not specified, all the binding files that do not specify a target environment will be applied. • Overwrite: This flag specifies whether or not to overwrite the existing artifacts. Table 10-5 displays what operations are executed when a BizTalk application is imported or installed. CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS396 Table 10-5. Operations Executed When Importing or Installing a BizTalk Application Operation Occurs While Importing Occurs While Installing Add references in the BizTalk X Management Database. Copy BizTalk artifacts to the X X BizTalk server. Apply binding files for the X X specified target environment. Execute pre- or post- X X processing scripts. The scripts will only perform The scripts will only perform actions that will run when the actions that will r un when the BTAD_InstallMode is equal to BTAD_InstallMode is equal to Import. Install. Store file-based artifact (assem- X blies , virtual directories, files, scripts, certificates, BAM arti- facts, and BAS artifacts) data in the BizTalk Management D atabase. Store policies in the Rule X Engine database. Store BAM artifacts in the BAM X Primary Import database. D eplo y BAM definitions . A dd BAS ar tifacts to the BAS site .X A dd BizTalk assemblies to the Only if BizTalk assemblies were Only if BizTalk assemblies were Global Assembly Cache. added to the BizTalk application added to the BizTalk application with the “Add to global assembly with the “Add to global assembly cache on MSI import” option. cache on MSI install” option. 6994ch10final.qxd 10/2/06 12:23 AM Page 396 The BizTalk Administration Console and BTSTask command-line application are the two applications that allow a user to export, import, and install a BizTalk MSI file. Please note that the BTSDeploy tool from BizTalk Server 2004 is also available to perform these tasks, but it has been deprecated and scripts should be migrated to the BTSTask tool. Exercise 10-3 walks you through the process of importing a BizTalk application using the BTSTask tool. Exercise 10-3: Importing a BizTalk Application To perform this exercise, please ensure that you completed Exercise 10-2 successfully.Then follow these steps: 1. Remove the PROBIZTALK Deploy Sample Application: a. In the BizTalk Server 2006 Administration Console, expand BizTalk Server 2006 ➤ BizTalk Group ➤ Applications ➤ PROBIZTALK Deploy Sample Application. b. Right-click the PROBIZTALK Deploy Sample Application and then select Stop. c. In the Stop ‘PROBIZTALK Deploy Sample Application’ window shown in Figure 10-14, select the Full Stop – Terminate instances radio button and then click Stop. d. In the BizTalk Server 2006 Administration Console, right-click the PROBIZTALK Deploy Sample Application and then select Delete. e. In the confirmation message box, click the OK button. Then, close the BizTalk Server 2006 Administration Console. CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS 397 Figure 10-14. S top Application dialog 6994ch10final.qxd 10/2/06 12:23 AM Page 397 2. Import the PROBIZTALK Deploy Sample Application: a. Open the Visual Studio 2005 Command Prompt. b. In the Visual Studio 2005 Command Prompt, execute the following command: BTSTask ImportApp / Package:C:\ProBizTalkSample.msi /Environment:Testing /ApplicationName:"PROBIZTALK Deploy Sample Application" /Overwrite . c. If the script was executed successfully, the content of the command prompt will resemble Figure 10-15. Typical Deployment Cycle In the previous sections, you learned how to deploy a BizTalk solution manually and using the MSI export and import method. In this section, you will learn how to move a BizTalk applica- tion from the development environment all the way to production using the steps outlined in the preceding two sections. There are five main steps to move an application from one envi- ronment to another: 1. D eplo y fr om Visual Studio 2005 the assemblies in a BizTalk solution : I n this step , the B izTalk dev elopers deploy a B izT alk solution on their development environment. Once the developers have tested their BizTalk application adequately, they proceed to the next step . 2. Add BizTalk artifacts to the deployed BizTalk application: In this step, the BizTalk developers or the integrators add artifacts to the BizTalk application in order to deploy their solution to another environment or BizTalk Server Group. Typically, this step involves creating new binding files specific to the next target environment, adding pro- cessing scripts to automate as much as possible the installation of the BizTalk MSI application to the next target environment, and adding any other BizTalk artifact (like certificates and readme files) necessary on the target environment. CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS398 Figure 10-15. BizTalk Server MSI import using the BTSTask console application 6994ch10final.qxd 10/2/06 12:23 AM Page 398 3. Export the BizTalk application to an MSI file: In this step, the developers or the inte- grators proceed to export the modified BizTalk application to an MSI file using the BizTalk Administration Console or the BTSTask command-line tool. They will have to decide whether or not they want to create one or more MSI packages and what BizTalk artifact they wish to include in them. 4. Import and install the MSI file: Once the MSI package or packages are ready, it is time to import and install them on the target environment. The MSI file will register all BizTalk artifacts in the target environment’s BizTalk Management Database. It will also copy and register in the GAC or in the Windows’ registry all .NET assemblies and COM libraries on the BizTalk servers where the packages are installed. Please keep in mind that you must install the MSI file on each BizTalk server in a BizTalk Server Group. 5. Start the application and verify that it is functioning correctly: At this point, the BizTalk developer or integrator starts and tests the newly installed BizTalk application. Once that person is satisfied with the results, he can repeat steps 2 through 5 to deploy the BizTalk application to other staging environments until he eventually releases the BizTalk application to production. Administrative Tools BizTalk 2006 provides different tools to manage BizTalk Server applications: • BizTalk Administration Console MMC • BTSTask command-line tool • BTSDeploy command-line tool (deprecated and its usage is not recommended by Microsoft) • WMI and the ExplorerOM APIs Each of these tools allows you to deploy and manage your solutions. While BizTalk Administration Console has been changed and improved significantly in BizTalk Server 2006, it is, as most UI tools, not intended to automate administration tasks. The B TSTask and BTSDeploy command-line tools can be used in batch files to perform auto- mation tasks, but batch files are still not as flexible as full-featured programming languages like C# or VB .NET. If you are an experienced developer, you know that real-world projects can easily contain hundr eds and even thousands of ar tifacts. Managing them manually is a daunting and error-prone task and in many cases simply hardly possible. To address these kinds of problems, Microsoft provides two APIs—Windows Management Instrumentation ( WMI) and Explor erOM, which allow you to write your own custom utilities to address all aspects of managing and configuring a BizTalk Server and a BizTalk Server Group. As shown in Tables 10-6 to 10-15, the tools have an overlapping functionality, and for the most common B izT alk tasks y ou can use any of them. However, for some tasks you will have a more limited set of tools to choose from. Tables 10-6 through 10-15 list common manage- ment tasks and indicate what tools are available to perform each of them. CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS 399 6994ch10final.qxd 10/2/06 12:23 AM Page 399 Table 10-6. Application Tasks Administration Task Console BTSTask Tool WMI ExplorerOM C reating a new application X X X Modifying application properties X X X (but you can’t mod- ify the Default Application property) Deleting an application X X X Table 10-7. Assembly Tasks Administration Task Console BTSTask Tool WMI ExplorerOM Deploying an assembly X X X Undeploying an assembly X X Table 10-8. Host Tasks Administration Task Console BTSTask Tool WMI ExplorerOM Creating a new host X X Modifying a host X X Deleting a host XX Starting/stopping/modifying X X host instances Table 10-9. Orchestration Tasks Administration Task Console BTSTask Tool WMI ExplorerOM Browsing orchestration artifacts X X X X Finding roles used or imple- X mented b y or chestr ation Binding/enlisting/starting X Only if BTSTask X X orchestrations makes use of processing scripts that internally use WMI or ExplorerOM S topping/unenlisting/unbinding X Only if BTSTask X X orchestrations makes use of pro- cessing scripts that internally use WMI or ExplorerOM CHAPTER 10 ■ DEPLOYING AND MANAGING BIZTALK APPLICATIONS400 6994ch10final.qxd 10/2/06 12:23 AM Page 400 [...]... bindings, pre-processing scripts, and postprocessing scripts) from a BizTalk application • Export and import BizTalk applications from an MSI file • Export and import binding information from BizTalk binding files • List all BizTalk applications in the BizTalk Management Database for the BizTalk Group • List the resources in an MSI file The sample shown in Figure 10-17 creates an application named PROBIZTALK... the BizTalk configuration database BtsCatalogExplorer catalog = new BtsCatalogExplorer(); catalog.ConnectionString = "Server=PROBIZTALK;Initial Catalog= ¯ BizTalkMgmtDb;Integrated Security=SSPI;"; try { // Get a reference on existing BizTalk Application Application app = catalog.Applications["PROBIZTALK Application"] 699 4ch10final.qxd 10/2/06 12:23 AM Page 417 CHAPTER 10 s DEPLOYING AND MANAGING BIZTALK. .. BtsCatalogExplorer class and setting the ConnectionString property to access the Management Database Table 10- 19 lists the properties of the BtsCatalogExplorer class As you can guess, all these properties except the ConnectionString property are collections of different BizTalk artifacts stored in the Management Database Table 10- 19 BtsCatalogExplorer Properties Property Name Description ConnectionString Connection... been working with BizTalk 2004 for a while, it is good to know that a few things changed for the better between BizTalk Server 2004 and BizTalk Server 2006 Apart from the advancements in deployment and management, throttling and tuning have improved BizTalk Server 2004 Tuning Tuning BizTalk 2004 applications is not a task for the fainthearted The property pages for the different BizTalk artifacts in... 404 CHAPTER 10 s DEPLOYING AND MANAGING BIZTALK APPLICATIONS s Note If you are working on a BizTalk Server 2004 project, we suggest that you download the BizTalk 2004 Management Tool by Paul Somers available on the GotDotNet web site (www.gotdotnet.com/ workspaces/workspace.aspx?id =99 2ca223-553c-475a-ac87-da7ae2c9016a) This tool will allow you to administer your BizTalk servers from a Windows application... using Microsoft .BizTalk. ExplorerOM namespace AddSendPort { class Program { static void Main(string[] args) { CreateSendPort(); } private static void CreateSendPort() { // Connect to the BizTalk configuration database BtsCatalogExplorer catalog = new BtsCatalogExplorer(); catalog.ConnectionString = "Server=PROBIZTALK;Initial Catalog= ¯ BizTalkMgmtDb;Integrated Security=SSPI;"; 413 699 4ch10final.qxd... Messagebox properties X X BTSTask Tool WMI ExplorerOM BizTalk Administration Console The BizTalk Administration Console, shown in Figure 10-16, is a Microsoft Management Console (MMC) This tool is the only one that comes with a Windows graphical UI It is also the easiest one to use for novices 699 4ch10final.qxd 10/2/06 12:23 AM Page 403 CHAPTER 10 s DEPLOYING AND MANAGING BIZTALK APPLICATIONS Figure 10-16 BizTalk. .. going to consider in this section is the BtsAssembly Using the properties of this class listed in Table 10-25, you can get access to the collections of compiled artifacts contained in the assembly 699 4ch10final.qxd 10/2/06 12:23 AM Page 4 19 CHAPTER 10 s DEPLOYING AND MANAGING BIZTALK APPLICATIONS Table 10-25 BtsAssembly Class Properties Property Name Description Application Read-only Returns the application... this assembly using properties of the BtsAssembly class Listing 10-11 Enumerating Orchestrations using System; using System.Text; using Microsoft .BizTalk. ExplorerOM; namespace EnumerateOrchestrations { class Program { static void Main(string[] args) { EnumerateOrchestrations(); Console.ReadKey(); } 4 19 699 4ch10final.qxd 420 10/2/06 12:23 AM Page 420 CHAPTER 10 s DEPLOYING AND MANAGING BIZTALK APPLICATIONS... referenced applications Assuming you have an application named PROBIZTALK Application, the code in Listing 10 -9 shows how you can obtain a reference to this application and to add a send port to it Listing 10 -9 Adding a New Send Port to a Specific BizTalk Application using System; using Microsoft .BizTalk. ExplorerOM namespace AddSendPort { class Program { static void Main(string[] args) { CreateSendPort(); . file as C:PROBIZTALKDeploymentSampleApplicationTestingDirs.cmd. c. In the BizTalk Server 2006 Administration Console, expand BizTalk Server 2006 ➤ BizTalk Group ➤ Applications ➤ PROBIZTALK Deploy. steps: 1. Remove the PROBIZTALK Deploy Sample Application: a. In the BizTalk Server 2006 Administration Console, expand BizTalk Server 2006 ➤ BizTalk Group ➤ Applications ➤ PROBIZTALK Deploy Sample. In the BizTalk Server 2006 Administration Console, expand BizTalk Server 2006 ➤ BizTalk Group ➤ Applications ➤ PROBIZTALK Deploy Sample Application. b . R ight-click the PROBIZTALK Deploy Sample

Ngày đăng: 14/08/2014, 11:21

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

  • Đang cập nhật ...

TÀI LIỆU LIÊN QUAN