The process of BizTalk Application deployment process is a complex, time consuming and repetitive task. Microsoft BizTalk Server 2020 comes with capabilities to create deployment packages. However, the MSI packages you create with the out-of-the-box features of BizTalk Server have some shortcomings which lead to deployments which are error-prone.
The BizTalk Deployment Framework (BTDF) covered these deployment issue.
To eliminate this manual process, organization’s started to adopt the DevOps practice. In this article, we will see how the BizTalk360 APIs are helpful in BizTalk monitoring while deploying BizTalk Applications using Azure CI/CD Pipelines.
Microsoft has introduced automated deployment of BizTalk Applications in BizTalk Server 2016 Feature Packs. In BizTalk Server 2016 Feature Pack 1, automatic deployment and application lifecycle management (ALM) experience was introduced. Automatic deployment process has been improved with the release of BizTalk Server 2016 Feature Pack 2.
With Automated build/release definitions you can set up the CI or CICD Pipelines based on environment (Development/QA/Staging/Production):
If you are new to Azure CI/CD Pipeline go through this article Configure automatic deployment with Visual Studio Team Services in BizTalk Server
In the BizTalk Application deployment process, you can create the following build/release definitions:
The build and release definitions are Visual Studio Team Services tasks, and should be done by a VSTS admin. The build definition builds your project within your git or VSTS repository, and the release definitions deploys it to your BizTalk Server environment
In Publish Build Artifacts stage configure the Path to publish (Application Project Folder)
A BizTalk Server application deployment build definition operation has three options available
Customer Scenario: In Build pipeline stages the customer wants to utilize the BizTalk360 API to set the Stop Alert for Maintenance in a BizTalk environment. Once after the new build is deployed to BizTalk Server and then user wants to configure newly deployed artifacts to monitor in BizTalk360. As the last step revoke the Stop Alerts in BizTalk360 Application.
We can use the following steps in Build definitions to achieve the above scenario;
BizTalk360 customers can take advantage of using the BizTalk360 API’s to set the alert maintenance during the BizTalk Application deployment. Create the PowerShell Script stage to call the SetAlertMaintenance API method to set the BizTalk environment under the maintenance. Assign the PowerShell Script full path
Set Alert Maintenance API returns the alert maintenance object with maintenance Id (out parameter). You can refer this maintenance Id, when revoking the maintenance in the below step.$Request = '{ "context": { "callerReference": "SAMPLE_REFERENCE", "environmentSettings": { "id": "DC45E848-E485-41D7-92E5-7C9932D43CB8" } }, "alertMaintenance": { "comment": "BizTalk Deploy", "maintenanceStartTime": "2018-11-22T15:26:37.000", "maintenanceTimeUnit": 0, "maintenanceTimeLength": 2, "isActive": false, "expiryDateTime": "" } }' $Request $body = ConvertFrom-Json -InputObject $Request $body $RepsonseSet = Invoke-RestMethod -Uri http://biztalk360webserver/Services.REST/AlertService.svc/SetAlertMaintenance -Method Post -ContentType "application/json" -Body $body -UseDefaultCredentials $RepsonseSet
Once after BizTalk Application deployment is completed, next step you can configure the newly artifacts to monitor. For creating BizTalk360 alarms and BizTalk Application mappings during deployments with BTDF, you could consider to BT360Deploy command-line tool. Use this GitHub project to setup pipeline stage.
After the deployment of BizTalk Applications, the maintenance mode of BizTalk environment must be revoked in BizTalk360. To achieve this step, create a PowerShell Script stage and assign the PowerShell Script path(RemoveMaintenance.ps1)
$RequestRem = '{"context":{"callerReference":"SAMPLE_REFERENCE","environmentSettings":{"id":"DC45E848-E485-41D7-92E5-7C9932D43CB8"}},"maintenanceId":"308d8b2c-b3e0-4024-b600-845113b06b80"}' Invoke-RestMethod -Uri http://biztalk360webserver/BizTalk360/Services.REST/AlertService.svc/RemoveAlertMaintenance -Method Post -ContentType "application/json" -Body $RequestRem -UseDefaultCredentials
Automation of Build and/or Deployment will be helpful to reduce the turnaround time. Hopefully, this article has provided insight on the following:
Get started with the free 30 days trial. For any queries/feedback please write to us support@biztalk360.com.