Deploy BizTalk Applications using MSI files – Concept and Best practices

Posted: April 6, 2010  |  Categories: BizTalk Deployment

A complete solution built on the BizTalk Server engine can contain several items (sometimes referred to as artifacts): orchestrations, pipelines, message schemas, and more.

Since BizTalk Server 2006 the product formalizes the notion of a BizTalk Application that allows working with these artifacts as a single unit. A BizTalk application wraps all of the pieces required for a solution into a single logical unit, making it the fundamental abstraction for management and deployment.

Managing Applications

The main tool for managing the BizTalk Server 2006 engine (and following versions) is the BizTalk Administration console, a Microsoft Management Console (MMC) snap-in that provides a new user interface for BizTalk Server Administrators. While this new tool gives administrators a number of capabilities, the most important is the ability to do three things:

  • Deploy BizTalk applications.
  • Configure BizTalk applications.
  • Monitor BizTalk applications.

The process of creating an MSI and deploy them into other environments like Lab and Production is fast and easy. It’s also very thorough in that the process enumerates dependencies while it creates the MSI and ensures that the dependencies are present when the MSI runs.

Exporting Applications

To export the BizTalk application to deploy in the new environment, the BizTalk Administration Console provides the capability to export and import artifacts. Combined with the use of BizTalk applications, this allows for a simplified method of packaging your solutions and deploying them to new environments. The following steps outline the process for exporting a BizTalk application.

  • Right-click the application you wish to export and select Export ➤ MSI File. This launches the Export MSI File Wizard.
  • Click Next on the Welcome page of the wizard.
  • On the Select Resources page, verify that the resources you need to include in the exported MSI package are selected. Click Next to proceed.
  • On the Specify IIS Hosts page, select the virtual directories you need to include in the exported MSI package. Click Next.
  • On the Dependencies page, review the BizTalk applications your exported MSI package depends on. Click Next to proceed.
  • On the Destination page, specify:
    • The destination application name – which indicates what the application will be named in the new environment after you have imported it;
    • And the MSI package output location and file name;
  • Click Export to generate the MSI package.

Import Applications

  • Install the MSI file in the new environment
  • Open the BizTalk Administration Console, select Start ➤ All Programs ➤ BizTalk Server 2006 ➤ BizTalk Server Administration.
  • Navigate to your BizTalk group. Right-click the Applications folder and select Import-MSI File. This launches the Import Wizard.
  • On the Welcome page, navigate and select the MSI file that is to be used to perform the import. Click Next.
  • On the Application Settings page, verify the settings for your application, references, and resources. In the Application name drop-down list, select the application name, if available. The list is available if you are importing the application into the BizTalk group. Click Next to continue.
  • On the Application Target Environment Settings page, in the Target Staging Environment drop-down list, select the environment to which the application is to be deployed. If you leave the value set to <Default>, the configuration will be applied to all environments.
  • On the Import Summary page, verify the application import information presented. Click Import when you’re ready to complete the import process.
  • The wizard displays the progress of the import operation and then shows a Results page. If you don’t execute the first step, you can check the option “Run the Application Installation Wizard to install the application on the local computer”. Click Finish to close the wizard.

Problem

The problem is that the MSI you generate on your development system could include dependencies on your system in folders and drives that may not be present on the target system. Common dependencies are maps and schemas – it’s possible to end up with errors when trying to run an MSI that folders and drives don’t exist!

Solution

Before creating the MSI file set the property “Destination Location” of each the resources of the application.

  • Go to BizTalk Administrator Console, and select your application
  • Under your Application’s Resources folder, review the values of the Destination Location column, you’ll see folders and drive letters that exist on your system.
  • For each item in the list, right-click and select Modify
    • Change the “Destination location” property to %BTAD_InstallDir%\myresource.dll
  • Export your application.

BTAD_InstallDir

BTAD_InstallDir contains the installation path of the BizTalk application, in other words, is the name of the folder that the user selects when she runs your MSI file (the default value is %ProgramFiles%\Generated by BizTalk\<application name>).

A few Best Practices

  • Is a good idea to use the reserved variable %BTAD_InstallDir% since we do know that the BizTalk directory will exist?
  • In the process of importing MSI file, in the Application Settings page, is a good practice to check the option “Overwrite resources”, special if is an upgrade to the application.
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

turbo360

Back to Top