a trace of thought on...BizTalk Server, Team Foundation Server, Windows Mobile, etc. RSS 2.0
 Thursday, November 06, 2008

A tool that has been an important part of the BizTalk Deployment Framework has been updated by Loren – see the codeplex project here.

XmlPreProcess is a general purpose tool in its own right for managing configuration files across multiple environments.  The tool has pulled in previously separated functionality (the excellent stuff done by Tom) so that it can consume spreadsheets (that describe environment variations) directly, rather than needing a separate process for that.  Very slick stuff !

 

Thursday, November 06, 2008 9:29:05 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Deployment Framework | General
 Thursday, June 19, 2008

As I mentioned previously, I did some talks recently (user group, Teched 2008) on “unattended” deployments for BizTalk.  You can download the slides here.

Soon, I’ll be posting a generic Team Build script for BizTalk projects as well as a MSBuild script that can be used with TFS Deployer (for unattended deployments.)

Thursday, June 19, 2008 1:03:48 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
BizTalk Insights | Deployment Framework
 Friday, February 15, 2008

So, I should have moved the BizTalk Deployment Framework to CodePlex long ago, but better late than never.  Find it here.

A few small items:

  • Better support for 64 bit platforms in scripting operations
  • Support for using the 64 bit isapi extension for http adapter
  • A "startApplicationOnDeploy" property you can use to control whether your application immediately starts after deploying
  • Bug fixes for the lightweight "Update Orchs/Comps" tool menu item
  • Automatic creation of "ProjectPath" sso config item – that lets you know where your developer workspace or server installation directory resides.
  • Better support for pre-processing bindings on developer workstations

But the cool item is integration of Tom Abraham’s improved “SettingsFileGenerator” – see here.  It moves the process of generating individual environment setting files from a VB macro inside of the SettingsFileGenerator.xls spreadsheet to an external command-line tool.

It also allows you to use the Excel XML format for the SettingsFileGenerator spreadsheet.  The Excel XML format allows for the ability to do standard diff/merge activities, a big improvement…

The way we’ve intergated this tool into the deployment framework allows you to treat the individual settings files as "transient" - they will get auto-generated by the deployment process now on the fly, and do not need to be version controlled or manually generated after spreadsheet edits. 

Enjoy!

Friday, February 15, 2008 4:40:24 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
Deployment Framework
 Friday, June 30, 2006

(Update: The original download files were missing the PDB-to-GAC functionality I've discussed before.  Please download again if you have already...)

The BizTalk Deployment Framework has been updated to work with BizTalk 2006...It is hard to believe that this project has been going on since May of 2004!

The Deployment Framework for BizTalk 2006 still has the same goals as the 2004 version:

  • Streamline the deployment process for developers, ensuring repeatability
  • Make it easier for a team of BizTalk developers to stay in sync - not just with BizTalk artifacts, but with all the other infrastructure that surrounds the solution (virtual directories, queues, file folders, etc.)
  • Extremely close parity between server-side deployments and developer deployments - so you are always testing your server deployments as you go through a typical developer work day.

BizTalk 2006 itself introduced quite a few features to make deployment easier, and can work fine for small (or solo) projects.  Here are a few limitations I've encountered:

  • Though much improved, it is still possible to get into "dependency chaos" - where you spend time manually undeploying/deploying individual artifacts.
  • Binding changes have to be communicated "manually" between developers on a team, since the import process is done through the Admin MMC or command-line.  Just "getting latest" from version control isn't sufficient.
  • Binding files for your various environments have to be maintained as separate files (manually), rather than "merging in" environment-specific settings
  • Artifacts such as rules, virtual directories, queues, folders, additional dependent assemblies, etc. can be represented as "Resources" within the Admin MMC (and in exported MSIs), but not in a fashion that easily moves between developers on a team.

So!  To get started with this version, download the Deployment Framework (Tools) zip and run the MakeBizTalkExternalTools_VS2005.vbs script.  This will add entries to the Visual Studio tools menu for deploying and undeploying using the framework.  You can download the full sample to see the framework in action (first build it, then do Tools-BizTalk Deploy.  You'll see something like this.)

The high-level approach is the same as the 2004 framework - you supply a small project-specific NAnt script that indicates via properties what elements of a deployment your solution requires.  You include BizTalkDeploymentInclude.nant to get all the core deployment functionality, and make sure the DeployTools directory is copied to your project.  (Unzipping the Deployment Framework Core into your project is a good way to do this.)  See the documentation for a more complete discussion.

The primary difference in the upgraded framework for BizTalk 2006 is that we now create a BizTalk Application definition, and use BTSTask to add all BizTalk artifacts as resources within that application.  Starting and stopping the application is done at an application level rather than per port/per orchestration.

Packaging up your solution as an MSI can be done with the WiX-based scripts that have been in the framework for awhile, or by using the MSI export mechanism in BizTalk 2006, if you prefer.  (The latter solution will require a few additional steps, and doesn't give you the parity described earlier.  But it works if you need to go that route.)

Other Notes:

  • NAnt .85 RC4 (and NAntContrib ) is required.  Be sure to copy the new BizTalk.NAnt.Tasks.dll to NAnt's bin directory.  We need to call BizTalk's .net 2.0 assemblies, and NAnt wasn't built against 2.0 -- so change nant.exe.config to have only<supportedRuntime version="v2.0.50727" /> in the<startup> element.
  • Log4net usage in the sample (which isn't required of course for the framework) has been updated to log4net 1.2.10 , as has my serializable wrapper.  You can find the new log4net.Ext.Serializable in the Tools download (which is useful all by itself, apart from the framework.)
  • You can actually use the BizTalkDeploymentInclude.nant file in this release with BizTalk 2004, if you like, to aid in your migration.  There is NAnt property to indicate 2004 vs. 2006.
  • Scan all the previous release notes...

Leave comments with any questions/issues/etc.  Enjoy!

Download: Full Sample, Framework Core, Tools Source , Docs

Friday, June 30, 2006 2:46:41 PM (Central Standard Time, UTC-06:00)  #    Comments [23] -
Deployment Framework
 Wednesday, March 01, 2006

In the last release of the BizTalk Deployment Framework, an additional feature was added that I thought deserved its own post for explanation...

If you are responsible for troubleshooting BizTalk applications in production, you are likely hungry for all the information you can get about why something is failing.  Since all BizTalk project assemblies are in the GAC, the stack traces you get (either from your own logging, or the event logs BizTalk generates for unhandled exceptions) do not contain file and line number information.  This makes post-mortem analysis a lot harder...

A new custom NAnt task (getgacpath) and corresponding support within BizTalkDeploymentInclude.nant was added for placing PDB (program database) files for all BizTalk and component assemblies into the GAC.  (You can use just this NAnt task without the rest of the Deployment Framework, of course.  In addition, a standalone command line utility called GetGacPath has been included in the "Tools" download.)

Why is this interesting?  Well, because it allows you to get stack traces that include file and line number information even when assemblies reside in the GAC.  (This is obviously useful and useable outside the domain of BizTalk...)  Without extra work, file and line number information is generally missing from a stack trace if a PDB file is not co-located physically with the corresponding assembly.  Putting the PDB file directly into the GAC is an easy way of solving this problem.

Set the "deployPDBsToGac" NAnt property to "true" in your project-specific NAnt file to get this functionality.

A couple of points are worth mentioning:

  • If the directory structure of the GAC were to ever change, this would need to be updated.  (See my upcoming post on using this technique with .NET 2.0.)
  • It would be great if Gacutil.exe provided this functionaity, but it doesn't. 
  • You should strongly consider having your release-mode binaries (aka 'deployment' configuration in BizTalk) build PDB files - there is no reason not to.  Look under Project properties/Configuration properties/Build/Generate Debugging Information.
  • Stack traces that show up in the event log either through your own logging, or via BizTalk (because the exception was unhandled) will now have file and line number info.  For orchestrations, the file name will correspond to the temporary C# file generated at compile time.  If you use the techniques described in this post , you can correlate back to the actual statement that failed.  For instance, the event log might say:
    [4740] ERROR BizTalkSample.Orchestrations.TopLevelOrch - An exception was caught. 
    [a08701ff-bf80-4940-9f9f-c2bb8597684b]
    System.Exception: Something exceptional happened.
       at BizTalkSample.Orchestrations.TopLevelOrch.segment2(StopConditions stopOn) in 
       c:\Documents and Settings\Scott\Local Settings\Temp\h0li3wbi.0.cs:line 2538
    
  • If you grab the file mentioned (h0li3wbi.0.cs) using BTSFileDump (again,see here) you can cross-reference this message to a location in the generated C# code for TopLevelOrch:

    You might save off "h0li3wbi.0.cs" (the temp file name chosen when TopLevelOrch compiled) and the other generated files when you do your build, using BTSFileDump. (That would be tough to do if you build with CruiseControl, etc.) But you wouldn't have to do that - if you can retrieve the source code used for a particular deployment, then the line number alone should be sufficient to get you to the exception site (since you can find the correct temp file by looking for comments, etc. that are in the orchestration - just like if you were using this technique to do live debugging.)  This all gets better with BizTalk 2006 - see a future post on this topic. 
  • Final point: If you set deployPDBsToGac to "true", deployments will begin by stopping the BizTalk services (instead of just bouncing the services at the end.)  The reason for this is that the BTSNTSvc.exe process will not "let go" of an assembly for which it has loaded a PDB file (so you have to terminate it.)  This means you may not always want this switch on for the developer edit/run/debug cycle.
Wednesday, March 01, 2006 12:43:19 PM (Central Standard Time, UTC-06:00)  #    Comments [1] -
Deployment Framework

There are some updates to the Deployment Framework and log4net story that I've been meaning to release for quite some time. After this, I'll focus my deployment efforts on BizTalk 2006 (didn't I say that last release?)

Below are a list of revisions. On this blog's home page under "Downloads", you will find an updated full download (with sample), as well as updated "Core" and "Tools" downloads.  "Core" contains only the deployment framework itself and can be used for upgrades of existing projects.  "Tools" contains source for all utilities used by the framework.  Be sure to put a fresh copy of BizTalk.NAnt.Tasks.dll in your nant\bin directory. 

  • Update to the log4net.Ext.Serializable library.  Note that the "Tools" download now has variants of this library for both log4net 1.2.0 and 1.2.9, though the sample is built against 1.2.9.  The important change here is that the original version of the library had a threading bug...as a result, the usage pattern for the library has changed somewhat.  Now, an instance of log4net.helpers.PropertiesCollectionEx is declared (as an orchestration variable), and an expression shape at the top of your orchestration will do something like below (notice logProps is passed to all logging calls so as to preserve context despite thread changes across dehydrations.)  See the sample for additional detail.

    logger = log4net.Ext.Serializable.SLogManager.
       GetLogger(@"BizTalkSample",log4net.helpers.CallersTypeName.Name);
    ...
    logProps.Set("InstanceId",TopLevelOrch(Microsoft.XLANGs.BaseTypes.InstanceId));
    logger.Debug(logProps,"Received top level request...");               
                   
  • Update to the SSOSettingsFileReader class to include an "Update" method.  Likewise, an additional custom NAnt task called "updatessoconfigitem" that allows you to add or update config items within an SSO affiliate application.  What is the use case for this?  Suppose you have a piece of information that you a) don't want to store in SettingsFileGenerator.xls (perhaps because you can't manage that file securely) and b) you need access to at run time.  (For instance, it might be an Oracle username/password.)  You could ask an operator/admin for this information at deployment time using SetEnvUI.exe/InstallWizard.xml (from the deployment framework) -- and then in your project-specific NAnt file do this:

       <target name="customSSO" if="${property::exists('serverDeploy') and serverDeploy}">
          <updatessoconfigitem ssoitemname="databaseUserName" ssoitemvalue="${sys.env.databaseUserName}"/>
          <updatessoconfigitem ssoitemname="databasePassword" ssoitemvalue="${sys.env.databasePassword}"/>
       </target>            
          

    At runtime, you can simply use SSOSettingsFileReader to retrieve this information.  Note that this example checks for whether we are doing a server deployment - so in this case, we would have the development environment values in SettingsFileGenerator.xls. 

  • Added a small utility called SSONameValueDump to the tools download to view current name/value pairs of an SSO affiliate application (if you have appropriate permissions.)
  • Update to the <controlbiztalkports> custom NAnt task to allow Send Port Groups to be shared across projects.  That is, Send Port Groups will only be removed if they no longer contain Send Ports (and putting new Send Ports into an already-existing Send Port Group will happen automatically.)
  • XmlPreprocess will be run against log4net configuration files, if you are using log4net. This allows you to use SettingsFileGenerator.xls to control logging levels for different physical environments.
  • SetEnvUI.exe no longer defaults to "last directory" when doing a file browse, to avoid confusion between applications when managing multiple BizTalk application installs.
  • If you use ElementTunnel, you will find that the xpath file will be reversed automatically for unescape operations (thanks to Frank de Groot for that update!)
  • Fix: When deploying HTTP/SOAP infrastructure, file system permissions granted to the specified application pool account.
  • Fix: The "quick update" target (updateOrchestrations) now respects true/false properties for includeSchemas, includeTransforms, etc. (A menu option in Visual Studio is created for this target when you use the MakeBizTalkExternalTools script. The target updates orchestrations, components, schemas, and transforms (see Flanders' post on this) Using this as part of your normal edit/run/debug cycle is a must for productivity…)
  • Fix: Handle multiple assemblies (of one artifact type) correctly in more cases, including where we are not deploying to the management database (i.e. gac deployment only.)

Download: Full Sample, Framework Core, Tools Source

Wednesday, March 01, 2006 12:27:09 PM (Central Standard Time, UTC-06:00)  #    Comments [10] -
Deployment Framework
 Monday, November 21, 2005

I had a chance to speak at the Twin Cities BizTalk User Group last Thursday.  It was a great turnout, entirely too much pizza, and a lot of fun to talk to folks throughout the area about how they are using BizTalk.  The deployment talk had 2004 content and a bit on 2006 as well – slides are here.

Monday, November 21, 2005 9:55:26 AM (Central Standard Time, UTC-06:00)  #    Comments [5] -
Deployment Framework
 Thursday, August 11, 2005

Version 2.6 of the Deployment Framework is now available (see the download links - the full download, core, and tools have all been updated.)  Future work in this area will be about augmenting the already-great deployment story in BizTalk 2006! 

The release notes below will (likely) only be interesting for folks that are using the framework extensively.

Interesting Features:

  • If you populate the bizTalkHosts property with the name of the Hosts that you are using, the 'servicecontroller' nant task is used for the stop/start of BizTalk services, with a configurable timeout stored in the 'biztalkHostResetTime' nant property. This requires recopying the BizTalk.nant.tasks.dll to your \program files\nant\bin directory. This alleviates the problem some users were having with timeouts in service restarts.
  • IISReset now uses configurable reset time from nant property iisResetTime.
  • Modified the sample application to demonstrate how you can maintain adapter configuration in binding files (i.e. the TransportTypeData sections) in its "unescaped" form -- rather than having to maintain it as escaped xml-within-xml. This relies on a new tool - ElementTunnel.exe, which is also in the Tools download. This is a huge help with adapters such as MQSeries that have many configuration elements.  More on this in another post.

Administrivia:

  • SSOSettingsFileImport.exe opens files with read access only, eliminating some file locking issues.
  • Permissions on the physical directories associated with virtual directories are now granted to the account specified as the application pool account (instead of just aspnet account.)
  • Now using NAnt .85 RC3
  • Now using log4net 1.2.9 (thanks Campbell McNeill for work on this!)
  • Now using the July 2005 release of WiX (thanks to Loren Halvorsen for work on compatibility with this.)
  • Now using XmlPreProcess 1.0 RC3 (and the associated SettingsFileGenerator.xls.) One new feature here is the ability to use URLs that contain query strings in the spreadsheet. The name/value pair XML files that are generated will wrap as CDATA where appropriate. Thanks Loren!
  • Modified the sample application to demonstrate how file receive and drop locations can be made relative to the a) project directory on a developer workstation or b) installation directory on a server. This has actually be in the sample application before - but it relied on the xmlpoke nant task, whereas now it uses the XmlPreProcess mechanism we use for all other binding file modifications.
  • Modified the deployment verification unit test in the sample application to rely on a NUnitUtility helper class that you can pull into your own projects. One included method allows you to examine the event log (on multiple machines) looking for errors that BizTalk might have raised during the test - very handy, and a potentially important component of your test.
  • Support for a local_settings file used with XmlPreProcess. It can be handy to have an "environment specific" set of macro values that are particular to a local workstation, and the sample application shows how this is done now.
  • Added transforms and schemas to the list of what is re-gac'd for the updateOrchestrations target. See here for more detail. In a recent release, I made changes that allowed for the use of a single binding file, so that binding files as emitted by the deployment wizard could be used (rather than splitting them by hand, which was required early on with the Deployment Framework.) This was a good change…but the implementation broke the "messaging only" scenario (where you have no orchestrations.) I don't have a good fix for this yet. The workaround is as follows: In your project's nant file, set includeOrchestrations to "true" (even though you don't have any), and define the orchestration assembly list to be an empty string, as shown here:
    <property name="includeOrchestrations" value="true" />
    <property name="orchestrations" value="" />

How do you upgrade?  Extract the "core" zip file on "top" of your existing project, and then fix up the WiX directory manually (since it will be named BizTalkSample.WiXSetup after the unzip.)  All tools and scripts will be updated as a result.  Then test...Leave a comment with any issues you encounter.  Good luck!

Thursday, August 11, 2005 10:22:25 AM (Central Standard Time, UTC-06:00)  #    Comments [12] -
Deployment Framework
 Friday, June 17, 2005

TechEd 2005 was a great time, and I really enjoyed the extended look at BizTalk 2006 - lots of great presentations.  Much more has been done in this release than I had anticipated, and I look forward to digging into the CTP build.

Thanks to those who attended my talk on automating BizTalk application deployments - the questions asked during the session were great!  It was fun to talk to the folks who are using the Deployment Framework stuff...The deck I presented is here.  BizTalk 2006 is doing a lot to make deployment easier - no comparison to 2004!  I expect a subset of the tools in the Deployment Framework to remain useful - but that is another post for another day.

If you attended my DevCon 2005 talk on mobility (and even if you didn't) you can find the deck available here.  The talk was specifically on the .NET Compact Framework 2.0 and Sql Server 2005 Mobile Edition.

Friday, June 17, 2005 7:23:39 AM (Central Standard Time, UTC-06:00)  #    Comments [1] -
Deployment Framework
 Monday, May 09, 2005

Just a few notes on what I'll be up to in the next month or two...

Do you use the Deployment Framework for BizTalk?  Or just have general questions on automating BizTalk deployments?  You can attend my session at TechEd 2005 - Friday June 10th, 10:45am to 12:00pm in the BPI Cabana, where I'll be doing a talk on those topics...

I'll also be speaking at the Microsoft DevCon event on my "other favorite" topic, Windows Mobile.  The focus will be on what is new for Visual Studio 2005 in the mobile arena...The conference will also be covering the new Team System offerings, ASP.NET 2.0, and quite a few other VS2005 topics.  Check it out...

Monday, May 09, 2005 8:10:41 AM (Central Standard Time, UTC-06:00)  #    Comments [3] -
Deployment Framework | General
 Friday, May 06, 2005

(Update: See the latest on the Deployment Framework here.)

Well, its time for another revision of the BizTalk/NAnt deployment tools... 

For folks recently joining us, these tools allow you to quickly create both developer workstation deployments (inside Visual Studio) and MSI-based deployments (for servers) for BizTalk 2004 solutions.  Just about all aspects of BizTalk deployments are handled, including items such as virtual directories, SOAP proxies, and WinXP/2k/2003 differences.

I get quite a few emails from people who are using these tools (which is great!)  A couple folks have suggested that I start referring to the whole thing as a" p framework?. < deployment>

That sounds about right - like all frameworks, there is a core set of functionality that takes care of quite a bit of work, and a given project can supply what needs customization or what is missing. 

In this case, the core NAnt scripts, custom NAnt tasks, WiX generation, and other custom tools form the framework itself - and a given BizTalk project can supply project-specific details, what needs to be customized, and any missing functionality.   So I'll refer to this work as the "Deployment Framework for BizTalk" from now on... 

What has changed in this rev? 

  • When last posting on this topic, I should have been even clearer that as of the last release, the deployment framework requires NAnt .85.
  • The biggest improvement is the ability to use binding files as they are emitted by the BizTalk Deployment Wizard directly.  In the past, the framework had insisted that binding files be split between orchestration bindings and messaging bindings - this is no longer required.  I had several requests for this fix...Also, note that having multiple binding files is supported (like one for each of several assemblies.)  Now, if you wish to continue to use the "old style" split bindings, define the orchBindings property in your project NAnt file as shown below:
  • <property name="orchBindings" value="${nant.project.name}.OrchBindings.xml" overwrite="false" />

  • You can now set the value of NAnt properties from the SettingsFileGenerator spreadsheet.  Recall that this spreadsheet is used (in conjunction with XmlPreProcess) to manage environment-relative configuration - that is, to manage those values that vary depending on whether you are in a development, QA, or production environment.  Until now, it has been difficult to use those configuration values within the NAnt deployment file!  You typically just used them in your binding files or other application-level XML files.  Now, however, you can define a property as shown below to make these values available as NAnt properties.  A good example usage is the case where you want the actual names of the SSO Application Users group and SSO Administrators group to be defined in the SettingsFileGenerator spreadsheet (because the group names may vary by environment you deploy to.)  Just define a property in your project NAnt file called "propsFromEnvSettings" with a comma-separated list of values you want pulled in.  (The sample has been updated to show this, too.)
  • <property name="propsFromEnvSettings" value="ssoAppUserGroup,ssoAppAdminGroup"/>

  • Many people had asked for the DeployResults.txt file (which is created in the DeployResults subdirectory during a deployment) to be available in a history log, so that it would be easy to walk up to a production server and determine what deploy/undeploy activity had taken place (especially useful for diagnosing any failures.)  To that end, the deployment framework will preserve past DeployResult.txt files with this convention: `DeployResults TRACESATURN_05032005_0922.txt'  Note that the machine name, date, and time are preserved - so you can gather these files across all the servers in a BizTalk group, if need be.
  • SSOSettingsFileReader class improvements: In the last release, I introduced the ability to manage settings within the BizTalk SSO using the SettingsFileGenerator spreadsheet that is also used for managing environment-relative configuration.  Part of that functionality included a class called SSOSettingsFileReader, used to retrieve settings at runtime.  This class now has some strongly typed accessors, and no longer sits inside a lengthy namespace, which means that in an orchestration expression shape you can simply do:
  • someVar = SSOSettingsFileReader.ReadString("BizTalkSample","SomeAppConfigItem") // or ReadInt32

  • Ben Cops had found that on large-scale deployments, it was useful to restrict which orchestrations were deployed/started to speed the development cycle.  So, he modified the orchestration NAnt task accordingly.  To use (if you need to), just set the orchestrationsToIgnore property in your project NAnt file with a comma-separated list that reflects what you are currently working on.  Make sure to copy BizTalk.NAnt.Tasks.dll to your program files\nant\bin directory again! (you'll find it in the DeployTools directory in the download.)
  • A bug was fixed with undeployment for the case where an SSO affiliate app had already been deleted...
  • All references in NAnt files to xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd" were removed, because they were simply causing heartache (for many reasons.)  Remove this namespace in your project NAnt file when upgrading.
  • Rather than trying to keep the source for the C# tools (NAnt tasks, SetEnvUI, DeployBTRules, SSOSettingsFileImport\SSOSettingsFileReader, etc.) current within the GotDotNet workspace, I'm making them available as a zip

Remember, you do not need to piece together the current functionality set from past blog entries - the complete documentation (in Word form) is in the download and separately here.

Some last thoughts:

  • Some folks have been reluctant to use the deployment framework because of its reliance on NAnt, and a worry over using NAnt in a server environment.  One thing to remember (that might allay this concern) is that a subset of NAnt is delivered with the generated MSI, and NAnt will not require a separate installation procedure by your production operations team.  Moreover, NAnt doesn't create any kind of persistent service or footprint on the production machine (i.e. no automatic file associations that would cause scripts to run with a double-click or anything like that...)
  • Add a Visual Studio External Tool for the updateOrchestration target if you haven't already!  This can speed your development cycle significantly.  See the tools zip for a script that creates all relevant external tools.
  • When using the WiX-based MSI generation, make sure your project NAnt file (for WiX generation, like BizTalkSample.WiXSetup.Build) is choosing "debug" or "release" based on what you want to put in the MSI.  See comments in that file for more detail, and Jon Flanders' post on this topic.

How do I upgrade?

  1. With a safe copy of your BizTalk solution, expand the "Core" zip contents right on your project directory, such that the core scripts will overwrite what you have now (but your project-specific scripts will be preserved.)
  2. Manually copy the WiX-related updates to your *.WiXSetup directory, since they will get unzipped to BizTalkSample.WiXSetup
  3. Remove xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd" from your project NAnt file
  4. Copy DeplyTools\BizTalk.NAnt.Tasks.dll to your program files\nant\bin directory
  5. Do a deployment on a developer workstation and a server to test things out...

Downloading

  • You can always use the download links on this blog.
  • Full sample here, core scripts here, extra tools here
  • (But always check the download links to see if there has been an update…)
  • Standalone documentation here (and diagram here.)
  • GotDotNet workspace here
    Friday, May 06, 2005 1:13:00 PM (Central Standard Time, UTC-06:00)  #    Comments [5] -
    Deployment Framework

    (Update: See the latest on the Deployment Framework here.)

    In the latest release of the Deployment Framework for BizTalk “extra tools”, you will find a script that will automate the creation of “external tools” in Visual Studio that are useful for working with BizTalk 2004 and the Deployment Framework.  Modify the script to include all the tools that your team relies on, too.

    The idea that this should be automated came from Ben Cops (though I’ve heard the complaint before!)  Manually creating all the useful external tools was somewhat painful for a large team of BizTalk developers.

    After you run the script, your Tools menu in Visual Studio should include entries for deploying and un-deploying the current solution, as well as for updating just the orchestrations, .NET components, and SSO configuration data (one menu entry.)  In addition, there will be entries for running NAnt on a highlighted target name (useful if you have your build script open), and for running HAT and the Subscription Viewer.  Enjoy…

     

    Friday, May 06, 2005 12:32:03 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
    Deployment Framework
     Monday, March 21, 2005

    (Update: See the latest on the Deployment Framework here.)

    Just when you thought automated deployments for BizTalk 2004 were safe, another update to the “Deploy with NAnt” template comes along… :) 

    This is a very worthwhile "upgrade" to consider taking advantage of.  One of the big items is support for "configuration info within SSO", but a complete list of features/fixes, etc. is below. 

    SSO Integration: If you are currently using the SettingsFileGenerator.xls spreadsheet (discussed in previous entries) in conjunction with the XmlPreProcess tool to handle "environment-relative" configuration - that is, to handle variations between your dev/QA/production environments - you will be glad to know you can get more leverage out of that process now…

    To review, with this process, you use the names that are defined in the first column of the SettingsFileGenerator spreadsheet (shown below) as "tokens" within your binding file, as in: 

    <!-- ifdef ${ xml preprocess} -->
    <!-- <Address>${FileSendLocation}\%MessageID%.xml</Address> -->
    <!-- else -->
    <Address>C:\temp\BizTalkSample OutDir\%MessageID%.xml</Address>
    <!-- endif -->

    At install time, the value for FileSendLocation that is appropriate to the environment you are deploying to is "plugged in" by XmlPreProcess (but for developers, the file remains legal XML.)  The spreadsheet might look as follows:

    Image0031
    (click)

    Now, however, you can also put in name-value pairs (whether they vary by environment or not) into the spreadsheet that you need access to at run time (i.e. general configuration information.

    The name-value pairs will be deployed into a newly created affiliate application within the SSO, and can be read using the SSOSettingsFileReader class (which serves as a cache, too – and is provided in the download.)  The static methods on this class can be used from an orchestration expression shape, or from assemblies that orchestrations call – as in string test = SSOSettingsFileReader.ReadValue("BizTalkSample","SomeAppConfigItem");  (By the way, the “nested names” shown in the spreadsheet above are just meant to suggest a partitioning mechanism you might want to use, rather than one flat “namespace” of config data.)

    Of course, the deployment scripts handle all the interaction with the SSO database for deployments/un-deployments.  This whole mechanism (SettingsFileGenerator.xls, XmlPreProcess, and now SSOSettingsFileImport.exe) is worth using even if you don’t use the rest of this script infrastructure.  Note that Jon Flanders had a great article on SSO-based configuration using a strongly-typed approach, where as this approach is loosely-typed, but leverages a mechanism you might already be using (i.e. the spreadsheet concept.)  (Note: Jon’s code for creating/deleting affiliate apps helped me complete the SSOSettingsFileImport.exe utility quickly…) 

    Other features/fixes: 

    • Support for multiple schema assemblies, including the case where schema assemblies reference each other due to schema imports.  (Undeployments occur in reverse order of deployments.)
    • Support for multiple orchestration assemblies, including the case where orchestration assemblies reference each other due to the use of Call/Start Orchestration shapes.  (Undeployments occur in reverse order of deployments.) 
    • Support for multiple orchestration and port binding files (just list them as comma separated values in the orchBindings/portBindings properties.) 
    • Fixed bug that occurred when undeploying ISAPI extensions in Windows 2003 / IIS 6. 
    • Fixed bug in undeploying pipeline components (thanks to John Adams) 
    • Added /NOFORCE flag to IISRESET calls in accordance with http://support.microsoft.com/kb/286196 
    • New property "includeInstallUtilForComponents" was added, which can be set to 'true' in your project-specific nant file.  This will cause your component assemblies to be called with "installutil.exe" (with the /u flag for undeployment.)  This is useful if you have .NET Installer-derived classes that need to get called for creating event sources, perf counters, etc.  (Yes, you could certainly argue these should be called by the WiX piece of the script infrastructure instead, but this method works and is more in keeping with the spirit of the entire process.)  Note there is no harm if a given component assembly listed in your components property does not have an installer class. 
    • Eliminated the need for the includeCustomTarget property, and provided additional ways to supply custom functionality.  Project-specific nant file can now supply any or all of customDeployTarget, customPostDeployTarget, customUndeployTarget, customPostUndeployTarget -- and they will be called if they are present. 
    • Integrated the deployment of log4net-specific stuff, if the includelog4net property is set to true.  See the work on BizTalk/log4net integration for more information.  (Log4net sample usage is included in the new sample.)   
    • Now using NAnt version .85 - so be sure to grab the latest NAnt/NAntContrib since the nant scripts are using .85-specific syntax to avoid "deprecated" warnings that were occurring otherwise.  Note that even once you have installed NAnt .85, you will still be able to deploy BizTalk projects that are using old versions of the deployment scripts.  Note also that this is a pretty basic port to .85 - there are no doubt more elegant ways of doing lots of things that I haven't investigated yet, now that nant has expression support. 

    Other notes 

    The scripts like to see BizTalk projects using Debug and Release for target names.  A long while back I had suggested a file-level search/replace within btproj files to change these, but two more elegant options are available: 

    • In project properties, change the output location for the “Development” configurations to “bin\debug” and output location of “Deployment” configurations to “bin\release”.
    • (Via Puneet Gupta): Change the template for BizTalk projects, found in BTSApp.btproj file in %BizTalkInstallDir%\Developer Tools\BizTalkWizards\BTSApp\Templates\1033, to reflect Debug and Release targets. 

    Another note: Lots of folks have noticed that XmlPreProcess can be used for a lot more than port binding files!  Log4net config files, orchestration binding files, you name it.  See the full Word documentation in the download for an example of how to do this within customDeployTarget.

    How do I upgrade?

    1. With a safe copy of your BizTalk solution, expand the “Core” zip contents right on your project directory, such that the core scripts will overwrite what you have now (but your project-specific scripts will be preserved.)
    2. Manually copy the WiX-related updates to your *.WiXSetup directory, since they will get unzipped to BizTalkSample.WiXSetup
    3. Do a deployment on a developer workstation and a server to test things out…

    Downloading

    • You can always use the right-hand links on this blog.
    • Full sample here, core scripts here
    • GotDotNet workspace here.  Because of issues with GotDotNet, I’m only going to be keeping the EXE utility source code up to date – not the entire sample & core tree.

     Enjoy – comments always welcome and appreciated.

    Monday, March 21, 2005 2:31:28 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
    Deployment Framework
     Tuesday, December 07, 2004

    (Update: See the latest on the Deployment Framework here.)

    It has been about three months since my initial submission to the BizTalk 2004 developer competition that I discussed here.  The contents of that contest entry took a prize (woohoo!) but still left a lot to be desired…

    Since then, I’ve had a chance to make what I believe are major improvements to the deployment story I’ve been discussing since last May.  In addition, I’ve had a chance to see the practice being used across several large BizTalk projects, and have done a lot of learning as a result.  (No guarantees or warranty implied, but derivatives of the scripts/tools I discuss here have been in use for some time by a very large BizTalk customer I work with.)

    The most important changes you will see in this release are as follows:

    • The “core” NAnt functionality has now been separated from the piece that an individual BizTalk project must “own” and maintain.  This is a huge simplification, and allows for more rapid adoption -- as well as the ability to deploy bug fixes & feature enhancements in a way that just wasn’t possible when stuff was intermingled.  (Peter Provost was right about that aspect of my first attempts.)  The NAnt script that a particular project must own can now be reduced to the following for a simple case (notice the ‘include’ reference for the core):

      <project name="BizTalkSample" default="debugDeploy">
         <sysinfo/>
         <include buildfile="BizTalkDeploymentInclude.nant"/>  
         <-- Set following properties to true or false to 
      include various pieces of a BizTalk deployment. -->
         <property name="includeSchemas"  value="true" />
         <property name="includeOrchestrations" value="true" />
         <property name="includeTransforms" value="true" />
         <property name="includePipelines" value="true" />
         <property name="includeComponents" value="true" />
         <property name="includePipelineComponents" value="false" />
         <property name="includeCustomFunctoids" value="false" />
         <property name="includeVocabAndRules" value="false" />
         <property name="includeVirtualDirectories" value="true" />
         <property name="includeMessagingBindings" value="true" />
         <property name="includeDeploymentTest" value="true" />
         <property name="includeCustomTarget" value="true" />
      <project/>

    • You now have the ability to supply a simple xml-driven Wizard-based UI when you are deploying after an MSI install.  You can use this UI to gather Windows identity information for virtual directories (for SOAP/HTTP receive ports), to indicate whether the scripts should deploy to the BizTalk management database (for working in BizTalk groups), and for many other purposes.  I call this “Install-Time Configuration” in the documentation below.  Here are some example Wizard screens:

    • You now have the ability to have an Operations-managed “spreadsheet-driven” mechanism for environment-relative configuration.  What do I mean?  I mean those aspects of your deployment that are particular to your development, QA, or production BizTalk environments.  Aspects that wind up appearing in your BizTalk binding files!  Queue names, database names, file shares, FTP locations, etc.  This is information that you don’t want to manage with the Wizard UI above (there is too much of it) and you want to maintain “as a set” for each environment.  The spreadsheet (pictured below) can start life with your developers, and ownership can gradually migrate to Operations.  This spreadsheet generates environment-specific “settings” files, and at the point you deploy, the values for the environment you are deploying to are automatically substituted into your binding file…Slick!

      Image0051
      (click)

    • You now can use a highly templated (reusable) WiX based setup, rather than a Visual Studio Setup Project, to generate your MSI.  WiX, in a nutshell, is a set of tools and an Xml grammar that allow you to specify the contents of an MSI.  One of the clear pieces of feedback I got on the last rev I released is that reproducing a Visual Studio Setup Project was far too manual.

    There are a large number of other changes that I’ll just enumerate quickly here:

    • You no longer need to have your NAnt file enumerate your orchestration names or their deployment order – a new custom NAnt task eliminates the need for this.
    • You no longer need to have your NAnt file enumerate how many receive ports/send ports/etc. you have – a new custom NAnt task eliminates the need for this.
    • Support for BizTalk groups, where machines 2-n do not require deploying to the BizTalk management database.
    • Support for not following the naming recommendations I made in previous releases – you can have custom project names, assembly names, directory names – its just a little more work.
    • Support for multiple assemblies of the various types (i.e. multiple orchestration assemblies, schema assemblies, etc.)
    • Inclusion of a utility I call SetEnvUI.exe for creating the xml-based wizards described above.
    • Inclusion of a utility I call DeployBTRules.exe for deploying BizTalk Rule Engine policies and vocabularies.
    • Inclusion of Loren Halvorsen’s XmlPreProcess tool for managing the environment-relative configuration discussed above.
    • Support for creating IIS6 application pools (with specified Windows identity) for HTTP and SOAP-based receive locations, and for adding virtual directories to application pools.
    • Support for registering the btshttpreceive.dll ISAPI extension with IIS6.
    • Support for selectively restarting multiple BizTalk host instances, for deploying custom functoids, and for dealing with send port groups, and more…

    There are now two downloads.  The first contains all of the core scripts and utilities plus a sample BizTalk solution that uses them.  The second download contains just the core scripts and utilities, and is designed to allow a BizTalk solution to accept updates/bug-fixes/etc. over time (i.e. the zip can be expanded into your directory structure on a developer workstation so you can test it out.) 

    It should be noted, though, that some manual work will be required to “upgrade” from the previous version I released in September – this release is quite different, but I think you will find it is well worth the time.

    Full download is here.

    Core scripts and utilities only are here

    GotDotNet Workspace is here.

    The full documentation for this release (which includes more detail than this blog entry…) is included in the zip files, but it can be viewed directly here (with a diagram here.)

    Enjoy!  And remember: if you didn’t make into a given environment (QA, production, etc.) with a scripted deployment of some kind, you didn’t get there at all.

    (Not necessarily this stuff, but something automated, at any rate…)

    Tuesday, December 07, 2004 3:29:16 PM (Central Standard Time, UTC-06:00)  #    Comments [1] -
    Deployment Framework
     Tuesday, September 07, 2004

    (Update: See the latest on the Deployment Framework here.)

    I see that the GotDotNet workspace I referenced in my last post is having occasional trouble, so I'm making the current version of template available for download on this site.

    Tuesday, September 07, 2004 1:15:53 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
    Deployment Framework
     Saturday, September 04, 2004

    (Update: See the latest on the Deployment Framework here.)

    It has been several months since I initially posted on the topic of using NAnt to coordinate the deployment of BizTalk 2004 solutions, with updates here and here.  Since that time, I've been heads-down in a BizTalk project and have had a chance to refine the practice quite a bit.

    So, I took the opportunity to introduce quite a few improvements into the sample I had previously released - hopefully turning it into a "template" that can be used on your projects more easily.  To that end, I've created a GotDotNet workspace where you can download the current version of the build template, and I invite any feedback/suggestions/participation.

    The major changes I've introduced can be categorized as follows:

    • Split binding files: On a BizTalk project with multiple developers, I believe it is beneficial to split your binding files into content related to orchestrations vs. content relating to "everything else" (send ports, receive ports, etc.)  The new build template sample does just that.
    • Improved scripts: Many of the WMI-related scripts I relied on in the past were from BizTalk SDK samples.  These were modified to get better/different error handling behavior.
    • More generic handling of send ports, receive ports, receive locations, etc. in the script - though it still requires some maintenance.
    • Better NAnt citizen: I'm still not a NAnt expert by any stretch, but thanks to Duncan Millard I realized that I had been remiss in applying quotes to a good deal of the text names I was using (i.e. &quot).  In addition, I started using built-in NAnt tasks for at least a few items where I had overlapped functionality, though not in cases where I needed slightly different behavior.  Finally, the build file naming convention proposed by the build template is "BizTalkSample.sln.deploy.build" (rather than "BizTalkSample.sln.build") to avoid conflicting with a NAnt file that would actually be used to build the project (e.g. with Cruise Control), as opposed to deploying it.
    • Use of "Deploy with NAnt" in an MSI scenario: This is the biggest (and I believe most useful) change...Let me explain further.

    As you study the build script, you will notice that it now also tackles such tasks as deploying virtual directories and applying permissions to them, patching binding files to match “local conditions”, etc. The initial goal here is to ensure that in a team development scenario, the amount of “out of band” setup required for any given developer to establish their BizTalk 2004 project environment is minimal – and that the current topology for the project is communicated efficiently (i.e. through the build file, as opposed to email or word-of-mouth.)

    After a development team has spent weeks or months with this build script, refining it to represent their exact situation and deployment needs, a question might arise: Why not take this well-tested script and use it for production (or just non-development-machine) deployments as well?

    To do this, it is helpful to agree that a two-phase deployment of BizTalk-related projects is both acceptable and useful. The first phase is an MSI-based installation that simply installs all of the BizTalk-related assets in a specific directory, but doesn’t deploy them to the BizTalk server. The second phase occurs when the user goes to the Start-Programs-YourProjectName menu, and chooses “Deploy YourProjectName”. The user also has the option to un-deploy (leaving the assets still on the file system until the MSI is uninstalled) or redeploy (to support the case where a single file is “patched”.)  See a picture of the Start menu created by the build template's MSI file.

    The reason that two phases are useful is that if the deployment to BizTalk fails, we would like a complete log of the results (which in this sample occurs in the DeployResults directory) for analysis/diagnostics, and we would rather not have the MSI simply roll back. The same holds true of un-deployment.

    Dual-purposing the NAnt file you have been maintaining for “real” deployments can be summarized as follows:

    • Use the build template's approach (see BizTalkSample.sln.deploy.build in the download) for the “server.deploy” and “server.undeploy” targets, which make the build file able to work with “co-located” binaries in addition to the standard developer tree.
    • Create a Visual Studio Setup project that deploys your BizTalk assemblies according to the pattern shown in the BizTalkSample.Setup project. Notice that this setup project includes the NAnt build file, the “DeployTools” directory (with our scripts), as well as a subset of NAnt in a subdirectory of our installation (so that we don’t rely on NAnt being present on the target server.)  It also includes a few convenience batch files referenced by our Start menu entries for invoking NAnt with specific targets.

    The BizTalkSample.Setup project in the build file can be built, installed, and deployed to try this out.  (You will want to make sure you haven't already deployed in "developer" mode, because the "Deploy BizTalk Deployment Sample" passes a flag to the NAnt script that will skip the undeploy phase in order to speed up "clean" installations.)  Note that as your deployment grows more sophisticated - multiple hosts, servers, etc. - you will find the NAnt script requires additional properties to govern these variations between server deployments and developer-desktop deployments.

    The build template sample also discusses the use of NUnit as a post-deployment verification process.  See the documentation in the sample for a full discussion --  basically all we are doing is making sure our MSI includes a subset of our unit tests, NUnit, and appropriate test files.  This is then wired up to the "Verify Deployment" Start menu option.  This can be an extremely effective means of ensuring your operations team has a means of testing the system interactively (not to replace standard automated heartbeat tests you might have…)

    Peter Provost proposed a great generic approach to building BizTalk NAnt files a couple of weeks ago - and I shamelessly stole his approach to reverse the "orchestration ordering" property (very slick!)  If you do not wish to pursue the MSI option just discussed, and you do not wish to integrate the "out of band" setup actions discussed above (i.e. virtual directory creation, etc.), you might prefer his approach or you might want to push the build template sample provided here in that direction (i.e. more property driven.)  However, I believe tackling the kinds of concerns that we do here will generally mean that a real-world project will no longer have a generic-looking NAnt script. 

    Again, you can download the build template sample here.  Enjoy, and I hope you find it useful.

    Saturday, September 04, 2004 8:41:21 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
    Deployment Framework
     Tuesday, June 29, 2004

    (Update: See the latest on the Deployment Framework here.)

    Addressing a few comments/questions that have appeared -

    1. Bootstrapping your binding file: It was pointed out that a bootstrapping process is required for your initial BizTalk Orchestration binding file.  This is quite true - you either need to manually deploy your orchestration(s) and associated assemblies, and use the BizTalk Deployment Wizard to create a binding file, or you need to create a binding file by hand (using a previous file as an example...)
    2. Automatic maintenance of your binding file: Hermo Terblanche would like the binding file to be maintained automatically (as part of the build process.)  One could imagine automatically “refreshing” this file using BTSDeploy at build time.  However, there is a question of what the source of truth should be for your bindings - I would argue it should be the binding file, not the current configuration of the server.  Others might disagree, at least during development.
    3. Rule deployment: Chris Delaney is looking for a method of deploying rules.  There doesn't appear to be a command line tool for this (that you could call from NAnt), but it looks somewhat trivial to write.  See \program files\microsoft biztalk server 2004\sdk\samples\business rules\business rules hello world2\HelloWorld2.cs - specifically the LoadFromFile and DeployRuleSet methods.
    Tuesday, June 29, 2004 10:50:35 AM (Central Standard Time, UTC-06:00)  #    Comments [0] -
    Deployment Framework
     Tuesday, June 15, 2004

    (Update: See the latest on the Deployment Framework here.)

    I realized today that in the "deploy.orchestrations" target of the NAnt build file (discussed here) there is a bug in the ordering of operations.  The original file imported the binding file prior to deploying the orchestration - which doesn't work for a "first time" deployment. 

    In addition, Hermo Terblanche made a good point (in comments) regarding piplines which are used by Send/Receive ports - i.e. the ports need to be removed prior to removing/updating the corresponding pipeline assembly. 

    Therefore, an additional dependency has been added to the "undeploy.piplines" target - namely, "remove.ports".  This target will remove exactly one Send and one Receive port, the names of which are derived from the binding file.  This section of the build file will have to be customized for your purposes, just like the names and ordering of orchestrations.  Note that in my sample, the orchestration uses “Specify Now” ports, and removing the Send/Receive ports is probably not necessary.  However, for “Specify Later” ports (the more typical case) that use custom pipelines, you will get the error referenced in Hermo's comment if you do not remove the ports prior to updating the pipeline assembly.

    The zip file with a new build file is still located here.  Current NAnt output from the sample will look like this.  Enjoy!

    Tuesday, June 15, 2004 2:44:24 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
    Deployment Framework
     Monday, May 24, 2004

    (Update: See the latest on the Deployment Framework here.)

    One of the more complicated aspects for a developer using BizTalk 2004 is the large number of steps required during the edit/run/debug cycle.  Since your BizTalk artifacts can't be run "in place" (that is, where they were compiled) but must instead be deployed to a local (or remote) BizTalk server, life can get quite complicated.

    If you have done much BizTalk 2004 development, you know the routine quite well at this point.  If you have orchestrations, schemas, transforms, pipelines, and (say) C# components all partitioned into separate assemblies - and you have a number of orchestrations with "Call/Start Orchestration" shape dependencies that introduce specific start/stop-ordering - you can spend a lot of time doing the whole stop/unenlist/undeploy/redeploy/enlist/start/bounce BizTalk routine. 

    Worse, you might not get it right - which can lead to hours spent debugging problems (over the course of your project) that don't really exist.

    To alleviate this problem, it can be quite helpful to use a tool like NAnt to coordinate the "update my BizTalk server" process that must occur after each build.  (NAnt is a large topic - suffice to say it is an Xml-driven software build system.)  As long as your NAnt build file (and BizTalk bindings file) are kept up to date, the whole process can be reduced to:

    1. Comple your solution (which might have multiple orchestrations, schemas, transforms, pipelines, and external components in separate assemblies)
    2. Choose "Deploy to BizTalk" from your Tools menu.
    3. Wait 60 seconds or so, enjoying the feeling that you have a consistent & reliable deployment mechanism.

    In addition, you can of course use NAnt to kick off full unattended builds for nightly builds or continuous integration systems (like Cruise Control).  Since Visual Studio.NET is the only supported way to build BizTalk projects - despite that tempting XSharpP.exe file sitting in your BizTalk installation directory - this part of your NAnt build file must defer to calling devenv.exe in command-line fashion.  (A short "getting started" for NAnt & directions for using with a VS external tool can be found here.)

    So, how about a sample that shows using NAnt to coordinate a reasonably complex deployment of inter-related BizTalk projects?  Available for download is a zip of a BizTalk solution that contains the following projects:

    • BizTalkSample.Components (a C# project, with a class called from orchestration)
    • BizTalkSample.Orchestrations (that contains two orchestrations, one which calls the other via a Call Orchestration shape)
    • BizTalkSample.Pipelines (a send and receive pipeline, which are not needed but included to illustrate the deployment aspects)
    • BizTalkSample.Schemas (which includes two schemas)
    • BizTalkSample.Transforms (which contains a single transform used by one of the orchestrations)

    The item I hope you will find most interesting, however, is a file called BizTalkSample.sln.build.  This is a NAnt build file that has a deployment target which captures the following dependency tree (only partially blown out here, for brevity - but this no doubt seems familiar to you if you've been using Biztalk 2004 for awhile…)

    Deploy
       Deploy Schemas
          Undeploy Schemas
             Undeploy Orchestrations
                Unenlist Orchestrations
                   Stop Orchestration
             Undeploy Transforms
                Undeploy Orchestrations
       Deploy Components
       Deploy Pipelines
          Undeploy Pipelines
             Undeploy Orchestrations
       Deploy Transforms
          Undeploy Transforms
             Undeploy Orchestrations
       Deploy Orchestrations
       Bounce BizTalk
    

    Perhaps more illustrative is the output of the deployment itself - a sample of which can be seen here.  Note that the NAnt script relies heavily on the EnlistOrch.vbs and StopOrch.vbs script files that ship as samples with BizTalk 2004, as well as the BTSDeploy command line utility.

    The BizTalkSample.sln.build script included in the download should represent a BizTalk project organization of sufficient complexity to act as a template for your own projects.  You will want to maintain the list (and correct ordering!) of the names of your orchestrations within the build targets for "deploy.orchestrations" and "unenlist.orchestrations" (this isn't deriveable automatically…)

    Note that the build script relies on a set of naming conventions that will be evident once you spend some time with it - namely, that directory names correspond to assembly names.  In addition, the standard "Development" and "Deployment" configurations in BizTalk projects have been replaced with "Debug" and "Release", in order to not create inconsistencies with standard .NET projects (and allow for one "Configuration" property within the build script.)  This replacement was accomplished with a file-level search/replace.

    There is probably room for more sophistication in this build file.  It takes a somewhat pessimistic view of what must happen for each edit/run/debug/deploy cycle, but I've found that despite the 60 seconds spent executing the script, your net productivity gain will be quite high given the time you won't waste trying to figure out what aspect of your deployment isn't correct.  Leave comments with suggestions for improvements, if you like.

    Monday, May 24, 2004 3:30:48 PM (Central Standard Time, UTC-06:00)  #    Comments [0] -
    Deployment Framework
    Archive
    <March 2010>
    SunMonTueWedThuFriSat
    28123456
    78910111213
    14151617181920
    21222324252627
    28293031123
    45678910
    About the author:

    Scott Colestock lives, writes, and works as an independent consultant in the Twin Cities (Minneapolis, Minnesota) area.

    © Copyright 2010
    Scott Colestock
    Sign In
    All Content © 2010, Scott Colestock
    DasBlog theme 'Business' created by Christoph De Baene (delarou)