Samuel Kastberg Scripting a BizTalk Server installation Senior Premier Field Engineer - Azure Scripting a BizTalk Server installation God morning everyone! Thank you for having me! I will be talking about Scripting a BizTalk Server installation.
Meanwhile in your datacenter! samuel.kastberg@microsoft.com
Why scripting the installation? Predictability Streamlined environments Remember all details Repeatable execution Less errors than manual installation Lower time and costs Not on the first environment but on the second and third Prepare for Disaster Recovery Today we talk more and more of infrastructure as code. From time to time I get to work with customers that want to script an installation and there are several different reasons. First time Developer machines, then authority in Sweden that creates a test environment for each project …
What you should script? Things you can control Things you want to be the same Good candidates Windows features Provision VMs in Azure BizTalk features and group configuration MSDTC settings, Hosts, Host instances Visual Studio, SQL Server … Your favorite monitoring tool ;-) Bad candidates Things you don’t have control over If you don’t have the rights to set Firewall rules … Things that might change over time https://skastberg.wordpress.com/2019/04/13/automating-biztalk-server-installation-and-configuration/
Before you start you should know What is your goal? Developer machines Streamlined Test, QA and Prod environments What is your baseline? Set of prerequisites dependent on ambition and politics We need 4 VMs with Windows Server 2016 6 LUNs with x GB Name and address for the SQL Availability group(s) What is reasonable work? Timeframe and adapt your ambition to the time you have Scripting is not a replacement for documentation Your documentation will just be a bit different https://skastberg.wordpress.com/2019/04/13/automating-biztalk-server-installation-and-configuration/
Good practices Maincode should orchestrate process Create functions for tasks Name scripts to show the order to run them Write a module for common functions Logging, Prompts, Checking etc. Use a common timestamp for generated files Be moderate with error handling Easy to spend a lot of time on unlikely errors Debugging is a good friend … Add reminders to information source
Common issues Wrong binaries Permissions to create Cluster resources I’ve seen both Developer in Prod and Enterprise in Dev/Test Becomes an issue if you’re already in production Permissions to create Cluster resources Cluster Name Object don’t have rights in AD When creating AG listener or clustered Hosts Read here Starting PowerShell 32/64 bit Not elevated session
Windows feature installation Different tools ServerManager CmdLets don’t work with Windows 10 Win10 2016/2019 Source Enable-WindowsOptionalFeature * Dism module Get-WindowsOptionalFeature Install-WindowsFeature ServerManager module Get-WindowsFeature Add-WindowsFeature A dism.exe %SystemRoot%\System32 pkgmgr.exe https://skastberg.wordpress.com/2019/04/13/automating-biztalk-server-installation-and-configuration/
Installing BizTalk Server features Setup /ADDLOCAL feature1,feature2 … Setup /S ConfigFile.xml https://skastberg.wordpress.com/2019/05/06/installing-biztalk-server-binaries-with-script/
Installing CU/FP and Adapter pack Adapter pack installation Separate 32 and 64 bit install Separate SDK and Features install CU and Feature packs https://skastberg.wordpress.com/2019/05/06/installing-biztalk-server-binaries-with-script/
Configuration File Consists of Feature Elements Each one maps to sections in the configuration tool Each feature contains one or more questions Answer Attribute Selected=True Export from configuration.exe Edit the export to be a template Replace with real values at configuration time You will need one file for Create group and one for join https://skastberg.wordpress.com/2019/05/29/configure-biztalk-server-with-script/
Configuring the group Replace tokens with values Run Configure.exe /S config.xml Delete the configuration file since you have passwords in it! https://skastberg.wordpress.com/2019/05/29/configure-biztalk-server-with-script/
Jobs and more https://skastberg.wordpress.com/2019/05/29/configure-biztalk-server-with-script/
Configure Hosts and Instances WMI MSBTS_Host MSBTS_HostInstance MSBTS_ServerHost PowerShell Provider Navigate to the right folder Use New-Item Set properties https://skastberg.wordpress.com/2019/05/31/scripting-hosts-instances-and-handlers/
Create Handlers WMI PowerShell Provider MSBTS_ReceiveHandler MSBTS_SendHandler2 PowerShell Provider Navigate to the right location Use New-Item Note the ”dummy” path, yes it’s needed Sometimes it gives a DTC error, just retry https://skastberg.wordpress.com/2019/05/31/scripting-hosts-instances-and-handlers/
Handling secrets Store secrets safely Replace at configuration time KeePass KeyVault Replace at configuration time Remember to Delete the configuration file https://skastberg.wordpress.com/2019/05/31/scripting-hosts-instances-and-handlers/
Demo
More details and examples Blog posts https://skastberg.wordpress.com Github repository https://github.com/skastberg/biztalkps