Wednesday, July 9

Setting up Deployment Framework for BizTalk (BTDF) (basic setup for BizTalk 2013) - ii

Setting up Deployment Framework for BizTalk (BTDF) (basic setup for BizTalk 2013) - part 1, page 2



Previous: Introduction and Installation

Structure and Components
The BTDF uses MSBuild as the underlying build engine. For this reason, it works very well with MSBuild nomenclature (naming conventions) and the advice is to follow the naming conventions outlined below for easier setup and use.

Structure

The Deployment Project file
The starting point is the btdfproj file which is created for you when you add a new BTDF project. All configuration (MSBuild commands) is done in this file.

Just like BizTalk (.btproj), C# (.csproj) or VB.NET (.vbproj) projects, the Deployment Framework for BizTalk is based around a project file in MSBuild XML format. A Deployment Framework for BizTalk project file carries a .btdfproj extension and can be edited with any text or XML editor.

For full information on the project file and configuration, please see http://www.tfabraham.com/BTDFDocs/V5_0/DeploymentFrameworkForBizTalkDocs.html?WorkingwithBindingsFiles.html.

Naming conventions
Although the BTDF is extremely flexible with naming in the newer versions, it is advisable that all users follow an agreed naming convention for BizTalk artifacts and shared components to make configuration easier.

To avoid extra configuration, the following guidelines on naming are specified: (you can also get this information at http://www.tfabraham.com/BTDFDocs/V5_0/DeploymentFrameworkForBizTalkDocs.html?WorkingwithBindingsFiles.html).






  1. The name of the folder containing a BizTalk project is identical to the project’s output DLL name (without the extension). So for example, a project called SmartAlex.BTDFProjects.FirstProject.Common should be in a folder of the same name, and the DLL will be SmartAlex.BTDFProjects.FirstProject.Common.dll.
  2. Each project must build to a bin\Debug and bin\Release folder under the project folder.For example, if you have a BizTalk project in a folder named SmartAlex.BTDFProjects.FirstProject.Orchestrations, then it must build to SmartAlex.BTDFProjects.FirstProject.Orchestrations\bin\Debug\SmartAlex.BTDFProjects.FirstProject.Orchestrations.dll (or bin\Release). This is the default for BizTalk 2009 and newer versions anyway.
  3. Split BizTalk projects by artifact type: a project for orchestrations, a project for schemas, a project for maps and so on (SmartAlex.BTDFProjects.FirstProject.Orchestrations, SmartAlex.BTDFProjects.FirstProject.Schemas etc.). This model is built into the Deployment Framework and is the preferred structure.
A typical example of such a project naming structure is:
SmartAlex.BTDFProjects.FirstProject.Orchestrations
SmartAlex.BTDFProjects.FirstProject.Schemas
SmartAlex.BTDFProjects.FirstProject.Maps
SmartAlex.BTDFProjects.FirstProject.Pipelines
SmartAlex.BTDFProjects.FirstProject.CommonComponents
 
From a VS 2012 perspective, these would all be projects called Orchestrations, Schemas, Maps etc under the solution SmartAlex.BTDFProjects.FirstProject with namespaces SmartAlex.BTDFProjects.FirstProject.Orchestrations, SmartAlex.BTDFProjects.FirstProject.Maps etc.
 
The Deployment Framework pre-defines the folder names for orchestrations, schemas, etc. as $(ProjectName).Orchestrations, $(ProjectName).Schemas, etc. Tthe definition for the ProjectName property is near the top of the .btdfproj file. 
Using these conventions, and taking a schemas assembly as an example, the Deployment Framework can then fill in parameters automatically within the .btdfproj file in the sample configuration node below:
<ItemGroup>
<Schemas Include="$(ProjectName)Schemas.dll">
<LocationPath>..\$(ProjectName).Schemas\bin\$(Configuration)</LocationPath>
</Schemas>
</ItemGroup>
 
 Where $(ProjectName) is of the format  SmartAlex.BTDFProjects.FirstProject and this will also be the BizTalk server application name.
 
Components
There are various components installed and generated on your computer after the installation of the BTDF. These components tie together the framework to create the overall deployment process. I have discussed the main components you should understand for a basic setup below:

The Deployment folder
This is a solution folder called Deployment which should be created for each BizTalk solution (This solution should also be your BizTalk server application as explained above under 'Structure').

This folder will contain the deployment artifacts and sub-folders.
Sub-folders in the Deployments folder can include:
• EnvironmentSettings: Contains the settings matrix file

• BRE: Contains Business rules engine artifacts such as policies and vocabularies
• Bin\Debug: Contains msi files created as a result of deployments in the debug mode
• Bin\Release: Contains msi files created from deployments in the release mode.


Deployment Project File(Deploy.btdfproj)
As mentioned above, a deployment project file (.btdfproj extension) is created to hold the instructions which BTDF uses in compiling the solution projects and components.


This file uses MSBuild syntax and the MSBuild engine to build and deploy the BizTalk solution artifacts. All actions carried out by the Deployment Framework are driven by MSBuild. This file will be in the Deployment folder.

Settings Matrix File (SettingsFileGenerator.xml)
The Deployment Framework builds upon an open-source tool known as the Environment Settings Manager to help tackle the complexity involved in managing the BizTalk bindings process across environments.

The core of the solution is a simple, easy-to-use Excel workbook. In this workbook, you may list out all of your runtime environments (Dev, Test1, Test2, UAT, Prod etc.) and all of your runtime settings (WCF service URLs, FTP server addresses and details etc.) in a simple matrix that also contains the actual values for each combination.

This gives you instant documentation and a simple method with which to maintain your settings and their values across environments and even across teams (test team, support team, dev team etc.).
A parameterized master bindings file is used in conjunction with the matrix for each BizTalk application, and it fills in values from the matrix during the deployment process as explained below.

All you need to get started with the Environment Settings Manager workbook is Excel 2003 or newer.

This file will be in the Deployment\EnvironmentSettings folder.


Parameterized Master Bindings File (PortbindingsMaster.xml)
A parameterized bindings file is an extension of the BizTalk bindings file concept which allows the same file to be used across multiple deployment environments.

It is an environment-neutral XML bindings file template stored as PortBindingsMaster.xml within the deployment folder. It simply holds all the configuration parameters for an application's bindings using custom variable names, and replaces those variables in a bindings file with the actual values it stores. The values are looked up from the matrix file based on their variable names and automatically filled in during deployment once the environment has been selected. It is used to collate environment bindings information for re-usability.

This file will be in the Deployment folder.


Previous: Introduction and Installation

No comments:

Post a Comment