For the next version of the BizTalk Software Factory(BSF) also the BizTalk Deployment Framework(BTDF) must be converted to the latest version, 5.0 in this case.
From blogs and reviews I understood that the BTDF 5.0 was seriously simplified, something I like in advance. :-)
So I started by downloading and installing it on my virtual PC environment. It is installed in the Program Files folder, where also some samples are installed. These samples were the basis for me.
Like is said on Codeplex with this 5.0 beta release, the documentation is sometimes outdated which makes it a bit harder to get started.
The best thing you can do after installing is launch the sample. That is the easiest way to find out how it works. You’ll find a toolbar in the Visual Studio IDE which supports several deployment and undeployment options. If you build and deploy the sample application, it is first stopped and undeployed if it was already deployed and then redeployed, bindings applied and started. That’s about it! You can play with the options to generate MSI’s for server deployment, but that is out of scope for this post.
So what do actually you need to get started? The best way is to copy the “BizTalkSample.Deployment” folder from the “BizTalkSample_BT2009” project to your own project. This contains everything you need.
- <project>.Deployment.btdfproj
- BuildDebugMsi.bat
- BuildReleaseMsi.bat
- InstallWizard.xml
- UninstallWizard.xml
- PortbindingsMaster.xml
- EnvironmentSettings folder with SettingsFileGenerator.xml
The <project>.Deployment.btdfproj contains the deployment script where you specify all project names, artifacts to deploy, how to handle bindings and a lot of other things. Not all possible elements are in the sample, take a look at “BizTalkDeploymentFramework.targets” to find all elements you can use.
The debug/release build files just kick the process to get the build started.
The install and uninstall wizard files can be used to specify the user interface you see when you deploy or undeploy from the start menu. This user interface is only shown for server deployments via the MSI.
For now the <project>.Deployment.btdfproj, the PortbindingsMaster.xml and the SettingsFileGenerator.xml are the most important files.
With BizTalk deployment there is always the question about how to manage your bindings. These files are hardly readable so it is easy to make mistakes. The BTDF contains a SettingsFileGenerator.xml where you can specify values to show up in the bindings. When the deployment is started, the settings are parsed and merged with the PortbindingsMaster to a file called ‘PortBindings.xml’. This file is used to import bindings to the just deployed application. If you don’t need to parse anything, you can instruct the BTDF to use the PortbindingsMaster file instead of the Portbindings file by setting the "<UsingMasterBindings>” element to true.
With most of the defaults in the sample btdfproj file you can get started or easily figure out what they should be. To conclude this short getting started: the sample can get you up to speed very fast and you’ll have a deployment process in place in minutes.