Home > BizTalk Server > BizTalk Deployment Framework (BTDF) Tutorial – Basic Instruction – Walkthrough

BizTalk Deployment Framework (BTDF) Tutorial – Basic Instruction – Walkthrough


BizTalk Deployment Framework for BizTalk 2010 Walkthrough

Since it’s really hard to find a simple instruction on how to use the BizTalk Deployment Framework (BTDF) i come up with compiled simplified instruction to get you started.

BTDF Files

When you add the BizTalk Deployment Framework in your project these are the important files that you need to take note of:

Deployment.btdfproj – this is the main file that contains the configuration on how your installer will behave.

SettingsFileGenerator.xml – this is an excel template that you can open using Excel in which you will map the settings (binding information) per environment. These files: Exported_DevSettings.xml, Exported_LocalSettings.xml, Exported_ProdSettings.xml, Exported_TestSettings.xml will be automatically generated by BTDF during installation.

Update Deployment.btdfproj

Double click Deployment.btdfproj to open.

The first part is pretty much self-explanatory:


<PropertyGroup>
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
<Platform Condition="'$(Platform)' == ''">x86</Platform>
<SchemaVersion>1.0</SchemaVersion>
<ProjectName>MyTest</ProjectName>
<ProjectVersion>1.0</ProjectVersion>
<IncludeSchemas>True</IncludeSchemas>
 <IncludePipelines>False</IncludePipelines>
<IncludeComponents>True</IncludeComponents>
<IncludeOrchestrations>True</IncludeOrchestrations>
<IncludeTransforms>True</IncludeTransforms>
<IncludePipelineComponents>False</IncludePipelineComponents>
<IncludeSSO>False</IncludeSSO>
<SkipIISReset>True</SkipIISReset>
<UsingMasterBindings>True</UsingMasterBindings>
<ApplyXmlEscape>True</ApplyXmlEscape>
</PropertyGroup>

Take note of the the last 3 settings, I set SkipIISReset since I’m not deploying anything on IIS and UsingMasterBindings(set to false initially, will be set to true later on) since I want to use a single binding file for all environments. How is it possible? Basically I would first manually configure the bt application (receive location/send ports) then I will export the binding (MasterBinding) and I will add place holders inside it so that the XmlPreProcessor (Part of BTDF) will substitute during installation.  Pretty cool huh?

Lets go to the last part:


<ItemGroup>
   <BizTalkHosts Include="SSO_Host;Sending_Host" />
</ItemGroup>
<ItemGroup>
   <Components Include="CommonComponent.dll">
       <LocationPath>..\..\$(ProjectName)\Shared Assemblies</LocationPath>
   </Components>
    <Schemas Include="CommonSchema.dll">
       <LocationPath>..\..\$(ProjectName)\Shared Assemblies</LocationPath>
    </Schemas>
    <Schemas Include="MyTest.Schemas.dll">
       <LocationPath>..\..\$(ProjectName)\Source\MyTest.Schemas\bin\$(Configuration)</LocationPath>
    </Schemas>
<Transforms Include="MyTest.Transforms.dll">
 <LocationPath>..\..\$(ProjectName)\Source\MyTest.Transforms\bin\$(Configuration)</LocationPath>
 </Transforms>
 <Orchestrations Include="MyTest.Orchestrations.dll">
<LocationPath>..\..\$(ProjectName)\Source\MyTest.Orchestrations\bin\$(Configuration)</LocationPath>    </Orchestrations>
</ItemGroup>

This means that I would like to

– Restart the BizTalk Host: SSO_Host and Sending_Host after the installation

– I have a common .NET component named CommonComponent.dll and common schema named  CommonSchema.dll both on Shared Assemblies folder.

– I have Schema, Orchestration and a Map. I changed the name because normally for big solution you don’t want to put all schemas in the schemas project and so on. Sometimes it’s better to split it functionally, this example configuration show you how  you can do that.

Next Steps

1. Deploy the solution manually or create a dummy PortBindings.xml (must be valid) to deploy using BTDF then click Tools -> Deployment Framework for BizTalk -> Deploy BizTalk Solution

2. Manually configure the receive ports, send ports, orchestration bindings.

3.  Export the bindings and named it as PortBindingsKnownGood.xml

4Run ElementTunnel.exe
/i:PortBindingsKnownGood.xml
/x:adapterXPaths.txt
/o:PortBindingsMaster.xml
/decode

Both (ElementTunnel and adapterXPaths.txt) can be found under <Program Files>\Deployment Framework for BizTalk\5.0\Framework\DeployTools.

The generated PortBindingsMaster.xml now has selected nested XML fragments decoded into plain, unencoded XML, controlled by the XPath statements in AdapterXPaths.txt. (see BTDF FAQ)

5. Add the the generated binding file: PortBindingsMaster.xml to the solution.

Configure PortBindingsMaster.xml

1. Double click PortBindingsMaster.xml to open.

2. Now go to the Address section of ReceivePort or SendPort and add a placeholder on the place you want to substitute during installation. Here I want the ${BackupOrderPath} substituted during installation.

<!-- ifdef ${ _xml_preprocess} -->
<Address>${BackupOrderPath}</Address>
<!-- else -->
<address>C:\Orders\Backup\%MessageID%.xml</address>
<!-- endif -->

 Configure SettingsFileGenerator.xml 

Right click SettingsFileGenerator.xml -> open with MS Excel.

This is how it should look like:

Deployment

1. Open Deployment.btdfproj and update both UsingMasterBindings and ApplyXmlEscape to True

2. Click Tools-> Deployment Framework for BizTalk -> Build Server Deploy MSI. This will generate an MSI file under the Project Folder\Deployment\bin folder.

3. Double click the MSI to install.

4. In the Step asking for XML File click Elipsis and select the correct settings file under EnvironmentSettings folder. Then click next.

5. BizTalk Application installed.!!

Silent Install / Unattended installation of BTDF using powershell:

https://randypaulo.wordpress.com/2012/01/31/automating-silent-install-biztalk-deployment-framework-btdf-using-powershell/

Advertisements
  1. Zachary Barno
    September 27, 2013 at 5:10 pm

    Very helpful thanks!

  2. Fred
    May 28, 2014 at 12:46 pm

    Good article! Thanks

  3. jrbvillanuevaJuan
    December 19, 2014 at 7:55 am

    Nice. Thanks Randy!

  4. January 13, 2015 at 11:33 am

    >then I will export the binding (MasterBinding) and I will add place holders inside it

    Manual work required in above step can be avoided by using this web based utility ( http://bbiztalk.com/?page_id=31 ) – you will need to provide the exported bindings and your SettingsFileGenerator.xml as inputs. This utility will then put the place holders. The output which it returns then needs to be saved in your PortBindingsMaster.xml file

  1. April 3, 2012 at 7:06 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: