BizTalk Application deployment with VSTS

Published on : Apr 26, 2017

Category : BizTalk Server

Lex

Author

Microsoft has just released BizTalk Server 2016 Feature Pack 1. More information on the Feature Pack, how different it is from the CU’s and SP’s can be found here in Saravana’s blog.
You can download the entire article as a PDF document.
Microsoft BizTalk Server 2016 Feature Pack 1.
One of the nice features this pack contains is the ability to deploy BizTalk applications from Visual Studio Team Services. To have this working, you need to do the following:
  • Install Microsoft BizTalk Server 2016 Feature Pack 1
  • Configure Visual Studio Team Services
  • Install an Agent on your BizTalk Server
  • Create a BizTalk solution

Install Microsoft BizTalk Server 2016 Feature Pack 1

Installation of Microsoft BizTalk Server 2016 Feature Pack 1 is straight forward. Just download the bits from this website: https://www.microsoft.com/en-us/download/details.aspx?id=55100 After downloading, you can install the package with elevated rights. During the installation, from time to time no screens will be visible as the installation consists of a couple of packages.

How do I check my BizTalk version?

Be aware that this Feature Pack can only be used with BizTalk Server 2016. To check the BizTalk version you are running, perform the following steps:

  1. Open the Registry Editor (regedt32.exe)
  2. Expand HKEY_LOCAL_MACHINE, SOFTWARE, Microsoft, BizTalk Server, and then select 3.0
  3. The subkey ProductVersion contains the version of BizTalk Server.
  4. Check this page to view the BizTalk Server version you are running

Configure Visual Studio Team Services

After installing the Feature Pack, we’ll configure Build definitions in Visual Studio Team Services. If you don’t have it already, create a new account. You’ll end up with a site like: https://<youraccount>.visualstudio.com Next, navigate to https://marketplace.visualstudio.com/items?itemname=ms-biztalk.deploy-biztalk-application Extension On this screen, click Install. This will install an extension to your VSTS site, which enables you to deploy BizTalk applications from VSTS. Extension added Now, you’ll create a Build definition in VSTS, which is based on Visual Studio. For now, it will be good enough to have a definition only for building the solution and to copy the built files to a drop location. We’ll also create a Deploy definition, which will contain the task to deploy BizTalk applications. Task catalog

Install an Agent on your BizTalk Server

To be able to perform deployments on your BizTalk Server, you need to install an agent. This agent must only become installed on one BizTalk Server. For VSTS, you navigate to this URL to be able to download the agent software:
After downloading, you can install and configure the agent. Before installation and configuration, make sure that your system meets the requirements. Check these here:
During configuration, you need to provide a Personal Access Token, which you must create in VSTS. More information on how to create such a token, can be found here:
The agent can be run both interactive or as a service. For testing purposes the interactive mode should work fine, but later on you could switch to service mode. The latter will consist of a Windows NT service. You can decide to use interactive or service mode while executing the run command. This command has to be executed after successful configuration.
Install Agent
The agent will also show up in VSTS.
Agent in VSTS The green bar indicates that the agent is properly configured and running.
You can download the entire article as a PDF document.
Microsoft BizTalk Server 2016 Feature Pack 1.

Create a BizTalk solution

Now we have VSTS and the agent in place, we can concentrate on Visual Studio. Start Visual Studio as an Administrator and connect with VSTS. You can now add a new BizTalk solution, which will also contain a project for deployment.
Add New Project When creating such a solution, note that you should change the .NET Framework version to 4.6.1, otherwise you won’t see the new BizTalk Server application project type, which we will use for deployment. The new project contains a file called BizTalkServerInventory.json which is used by VSTS during deployment.
BizTalkServerInventory After you have created a BizTalk application, you can build it, add the dlls together with the files in the BizTalkServerApplication1 project to a zip file. Check in the zip file and make sure the local repository is synced with VSTS. In VSTS, make sure that the BizTalk Deployment uses the just created zip file for deployment.
DeploymentDefinition Finally, schedule a new build and the BizTalk application will be deployed on the BizTalk server. DeploymentLog

Summary

BizTalk team’s first ever Application Life cycle Management feature will help us to perform automatic deployments in an improved and easy way.
You can download the entire article as a PDF document.
Microsoft BizTalk Server 2016 Feature Pack 1.