Got a little over an hour?  Get a full featured multi-server BizTalk 2013 domain running in Windows Azure IaaS!  It is fully configured with Send, Receive, Processing, and Tracking hosts all ready to go.  Since it is scripted, it is repeatable so you can tear it down when you are done and create a brand new fresh environment the next time! 

Cost: For a MSDN user the cost is around $0.55 per hour for the compute time with Medium VMs!  Monthly charges may be incurred for storage, bandwidth, and transaction but in my experience these have be next to nothing.  The costs for non-MSDN users will be significantly higher as these are premium images in Azure.

As promised at the BizTalk Summit in London in March, here are the Windows Azure IaaS Full BizTalk Domain Setup scripts.  Of course these scripts can be used to create any type of domain, not just for BizTalk. And better yet, you only need to update as little as 2 variables file to be able to run them!

Download scripts: Microsoft Azure IaaS BizTalk Domain Setup PowerShell Scripts

Important Points to Note

1. These scripts use Premium IaaS Images.  If you are not using a subscription tied to a MSDN account you will occur significant changes.

2. Due to legal issues related to the Microsoft provided BizTalk Provisioning Tool, I am unable to allow people to download it.  The BizTalk 2013 Images on IaaS contain an older, none working version.  Because of this some additional manual steps are required to complete the auto BizTalk configuration.  I have made the auto configuration an optional step that is enabled by a Flag in the variables file.  The default is false.  I suggest everyone spend 20 minutes to get the files from a developer image using the instructions below until we have an updated IaaS image that includes the files or until we are able to download them from Microsoft.  See below information on “To enable full end to end auto configuration do the following (Note – must be a MSDN users)”

This is what the scripts do:

  • Creates a Virtual Network, Affinity Group, and Azure Storage account
  • Create a Domain Controller with the BizTalk Groups and Users created
  • Creates a SQL Server and assigns the correct permissions for the BizTalk users
  • Creates two BizTalk Servers
  • Optional – Downloads a bunch of helper files to configure the BizTalk Group
  • Optional – Installs Classic Shell (yes, I can not live without a Start button)
  • Optional – Installs BizTalk 2013 CU2
  • Downloads Remote Desktop connections to the newly created VMs

To run the scripts:

  • Review the prerequisites below.
  • Open variables.ps1 and review the variables.  Only the top 8 should need to be looked at or updated.  Of these, only 2 values must be changed.
    • $baseVMName = ‘<abcd1234>’                                 # UPDATE – Must be Globally Unique and 8 characters or less.
    • $subscriptionName = ‘<subscription name>’              # UPDATE – This is the name of your subscription from the publishing file
    • $setupDir = "C:\BizTalkGurus"                                   # OPTIONAL UPDATE – Used for files on the remote and local servers
    • $basePathToScripts = ‘<path to scripts>’                    # OPTIONAL UPDATE – This is used if you run the scripts through an IDE
    • $workStorgeAccount = ’<update for auto configure>’    # OPTIONAL UPDATE – Update with the storage location of the helper files for auto configuration
    • $installCU2 = ‘false’                          #OPTIONAL UPDATE – Must upload BizTalk CU2 exe to the root of the Storage Account above
    • $installClassicShell = ‘false’              #OPTIONAL UPDATE – Must upload classic shell version 4.1 exe to the root of the Storage Account above
    • $installBizTalkProv = ‘false’               #OPTIONAL UPDATE – Must upload 5 files from BizTalk 2013 Dev box to the root of the Storage Account above
  • Run Master.ps1 in an elevated PowerShell window.  If running in an IDE it is best to run the script from the command windows rather than hitting Run. 

The end result will look something like this:

What is included

Prerequisites

  • Tested with PowerShell late- May release.  PowerShell versions before March (sorry can’t keep the versions straight) will fail in the VM creation because static IP Addresses are assigned to the VM’s in the network. 
  • Ensure you have a working PowerShell installation before running.  This can be tested by running Get-AzureLocation to ensure it returns values.  Details on how to set this up can be found here.
  • Scripts must be ran elevated. 

Main PowerShell Scripts

  • Master.ps1 – This is the only file you need to run.  Ensure you run from an elevated PowerShell window.  Takes a bit over an hour for full configuration.
  • variables.ps1  – This is the only file you need to update.  You should only need to look at the first 8 parameters. 
  • 00_Create_Network.ps1 – This script creates the affinity group, storage account, and virtual network.
  • 01_Create_PDC.ps1 – This script create the domain controller by promoting a windows server using remote PowerShell. It also creates all the groups and uses needed for the BizTalk configuration.
  • 02_Create_Servers.ps1 – This script creates the SQL and BizTalk Servers using the Enterprise Edition of the Microsoft provided images. 
  • 03_Configure_Servers_RemoteProp.ps1 – This script uses remote PowerShell to complete additional configuration on the SQL and BizTalk Servers.  If flags are set, files will be downloaded to the servers to complete configuration.
  • 04_Configure_Servers_LaunchRDP.ps1 – This script will launch the Remote Desktop sessions needed to complete the auto configuration.
  • 05_RemoteDesktop – Downloads the remote desktop connect for each server.  This is stored inside a new folder called RemoteDesktop in the scripts folder.
  • 99_RemoveVM.ps1 – End-to-end clean up script.  Removes all items created based on the variables file.  Note – due to limitations in Virtual Networks only run this if you have no other virtual networks on your subscriptions.   If you do, you should comment out the virtual network section of this script.
  • SaveMoney_StopAll.ps1 – Scripts to stop and deallocate all the Azure Virtual Machines based on the values in your variables file.
  • SpendMoney_StartAll.ps1 – Scripts to start all the Azure Virtual Machines based on the values in your variables file.
  • Configs folder – NetworkConfig.xml – This is the XML Configuration used to create the virtual network in Azure.
  • Helper Files – Helper files are only needed if you plan to auto-configure BizTalk, auto install CU2, or auto install Classic Shell
    • multinodeconfigDemo_DomainHosts.xml – XML file used by the BizTalk Provisioning tool to auto configure the BizTalk group.  No changes are needed to this file.
    • rdp.exe – Use to auto launch a Remote Desktop session to complete the BizTalk configuration. 
    • RunBizTalkTask_Domain.xml – File used to create a Windows Scheduled Task.
    • RunLocalClient.ps1 – PowerShell script to be ran locally on the First BizTalk Server in the group. 
    • RunLocalClientServer2.ps1 – PowerShell script to be ran locally on all Other BizTalk Server in the group. 
    • StartPowershell.exe – Helper exe to enable Windows Scheduled Task to easily run a PowerShell script in elevated mode.
    • Optional – ClassicShellSetup_4_1.exe – You need to be download from http://www.classicshell.net/ and uploaded to your container.   Ensure the version names match what is in the 03_Configure_Servers_RemoteProp.ps1 file.
    • Optional – BizTalk 2013 CU2 – This needs to be downloaded yourself and uploaded to your own public Azure container.
    • Optional – BizTalk.Provisioning.files- This needs to do downloaded yourself and uploaded to your own public Azure container.

To enable full end to end auto configuration do the following (Note – must be a MSDN users):

  • Put all helper files on your own public Azure storage account container
  • Update $workStorgeAccount in the variables file to the full address of your storage container
  • To enable auto install BizTalk 2013 CU2
    • Download BizTalk 2013 CU2 exe and upload it the root of your storage account
    • Update $installCU2 in the variables file to “true”
  • To enable auto BizTalk configuration
    • Create a BizTalk 2013 Development Virtual Machine in Microsoft Azure (script here)
    • Copy the 5 files in the C:\BizTalk_Provisiong folder
    • Upload the 5 files to the root of your storage account

If you do the auto configuration (witch is highly recommended for anyone who plans to run the scripts more than once) your end result will look like this.

Known Issues and Limitations:

  • At present the auto configuration is only possible if you download and host the BizTalk Provisioning files yourself.  This will change in the future and I will release a new set of scripts once the process is cleaner.
  • Every once in a while Azure is really slow.  I have added some speed breaks in the scripts to better account for this.
  • Every once in a while the auto configuration fails.  The servers get joined to the group by no hosts are created.  At that point, they should just be created manually or remove and restart all the scripts from scratch.
  • If you have an existing virtual network associated with your subscription the 99_RemoveVM script will delete it or fail trying.  This is a limitation in PowerShell. 

These scripts are over a year in the making!  Ok, ok, do not laugh.  I did not spend a year straight on them but I have spent over 300 hours trying to get them fully working end to end.  I have create no less than 100 domains while testing.  I never have an issue with the IasS side of things until the most recent release of PowerShell so things seem to be a little unstable at the moment,  All the issue I have ran into have been related to setting up the auto configuration.

Enjoy and I look forward to community feedback!