automatic biztalk 2004 application deployments scott colestock trace ventures, llc blog:

24
Automatic BizTalk 2004 Automatic BizTalk 2004 Application Deployments Application Deployments Scott Colestock Scott Colestock Trace Ventures, LLC Trace Ventures, LLC blog: www.traceofthought.net blog: www.traceofthought.net

Upload: jonah-andrew-moore

Post on 12-Jan-2016

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Automatic BizTalk 2004 Automatic BizTalk 2004 Application DeploymentsApplication Deployments

Scott ColestockScott ColestockTrace Ventures, LLCTrace Ventures, LLCblog: www.traceofthought.netblog: www.traceofthought.net

Page 2: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

AgendaAgenda

What are the elements of a BizTalk What are the elements of a BizTalk deployment?deployment?

What makes it complicated?What makes it complicated?

What are my options for getting the What are my options for getting the work done?work done?

What can I do with the “Deployment What can I do with the “Deployment Framework” on Framework” on http://workspaces.gotdotnet.com/BT2004Deploymenthttp://workspaces.gotdotnet.com/BT2004DeploymentFrameworkFramework

Page 3: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Elements of a BizTalk App Elements of a BizTalk App DeploymentDeployment

Deliver metadata to BizTalk Deliver metadata to BizTalk Management DatabaseManagement Database

Schemas, Maps, Pipelines, Orchestrations Schemas, Maps, Pipelines, Orchestrations – assemblies all interrogated– assemblies all interrogatedBTSDeploy.exe / BizTalk Deployment BTSDeploy.exe / BizTalk Deployment WizardWizardOne time per BizTalk groupOne time per BizTalk groupLee Graber: “analogous to regsvr32.exe”Lee Graber: “analogous to regsvr32.exe”

Deliver assemblies to the GACDeliver assemblies to the GACAll assemblies containing schemas, maps, All assemblies containing schemas, maps, pipelines, orchestrationspipelines, orchestrationsAll .NET components you will callAll .NET components you will call

Page 4: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Elements of a BizTalk App Elements of a BizTalk App Deployment (2)Deployment (2)

Deliver Binding FilesDeliver Binding FilesDefine physical ports (Send Port Groups/Send Define physical ports (Send Port Groups/Send Ports, Receive Ports/Receive Locations)Ports, Receive Ports/Receive Locations)

Tie logical orchestration ports to physical portsTie logical orchestration ports to physical ports

Tie orchestration roles to partiesTie orchestration roles to parties

Associate orchestrations with host definitionsAssociate orchestrations with host definitions

Ancillary components…Ancillary components…Custom functoids to [BtsInstallDir]\Developer Custom functoids to [BtsInstallDir]\Developer Tools\Mapper ExtensionsTools\Mapper Extensions

Custom pipeline components to [BtsInstallDir]\Custom pipeline components to [BtsInstallDir]\Pipeline ComponentsPipeline Components

Page 5: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Elements of a BizTalk App Elements of a BizTalk App Deployment (3)Deployment (3)

Virtual directories / App poolsVirtual directories / App poolsBTSHttpReceive.dll or SOAP proxyBTSHttpReceive.dll or SOAP proxy

Appropriate permissions…Appropriate permissions…

Vocabulary & PoliciesVocabulary & Policies

File drop / pickup directories (& perms)File drop / pickup directories (& perms)

SSO Affiliate applicationsSSO Affiliate applications

MSI for packaging & deliveringMSI for packaging & delivering

Page 6: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Complications…Complications…

Dependency tree…Dependency tree….NET dependencies via references.NET dependencies via referencesBizTalk dependencies via call/start orchestration BizTalk dependencies via call/start orchestration shapes, schema usage, etc.shapes, schema usage, etc.

Least dependent assemblies must be Least dependent assemblies must be deployed firstdeployed firstMost dependent assemblies must be Most dependent assemblies must be undeployed firstundeployed firstTo replace an assembly that is “depended To replace an assembly that is “depended upon”, all the dependents must be upon”, all the dependents must be undeployed firstundeployed first

(See Flanders’ blog for table of exceptions to the (See Flanders’ blog for table of exceptions to the rule – masteringbiztalk.com)rule – masteringbiztalk.com)

Page 7: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Direct Dependencies among BizTalk 2004 Components

Page 8: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Implications of “Dependency Web”Implications of “Dependency Web”

Developer’s edit/build/deploy/debug Developer’s edit/build/deploy/debug cycle can be tricky and error pronecycle can be tricky and error prone

Updating a pipeline component means Updating a pipeline component means undeploying a pipelineundeploying a pipeline

And all send/receive ports that use itAnd all send/receive ports that use it

Updating a pipeline might mean Updating a pipeline might mean stopping/undeploying an orchestrationstopping/undeploying an orchestration

Updating a schema might mean Updating a schema might mean undeploying several pipelines, undeploying several pipelines, orchestrations, and transformsorchestrations, and transforms

Page 9: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Implications of “Dependency Web” (2)Implications of “Dependency Web” (2)

Background: All BizTalk components (except Background: All BizTalk components (except send/receive port definitions) are .Net assembliessend/receive port definitions) are .Net assemblies

Packaging components for a BizTalk 2004 project Packaging components for a BizTalk 2004 project according to their according to their type type turns out to be good designturns out to be good design

BizTalkSample.Components.dllBizTalkSample.Components.dll

BizTalkSample.Schemas.dllBizTalkSample.Schemas.dll

BizTalkSample.Transforms.dllBizTalkSample.Transforms.dll

BizTalkSample.Pipelines.dllBizTalkSample.Pipelines.dll

BizTalkSample.Orchestrations.dllBizTalkSample.Orchestrations.dll

BizTalkSample.PipelineComponents.dllBizTalkSample.PipelineComponents.dll

Why? If these assets are grouped in assemblies Why? If these assets are grouped in assemblies arbitrarily, managing the dependencies becomes arbitrarily, managing the dependencies becomes much more complex. Monolithic assemblies make much more complex. Monolithic assemblies make reuse & operations difficult.reuse & operations difficult.

Page 10: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Complications (2)Complications (2)

Binding file act as a layer of indirectionBinding file act as a layer of indirectionContain references to queue names, ftp Contain references to queue names, ftp locations, directory/UNC locations, SOAP locations, directory/UNC locations, SOAP endpoints, email addresses…endpoints, email addresses…

These all vary by physical environment!These all vary by physical environment!

But a binding file contains too much other But a binding file contains too much other structure & information to make it safe for structure & information to make it safe for operations to editoperations to edit

Most shops want binding files version Most shops want binding files version controlled & part of release management controlled & part of release management strategystrategy

Page 11: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

So…What do we want?So…What do we want?

Solution to deploy all of the Solution to deploy all of the components of a BizTalk solution to all components of a BizTalk solution to all the appropriate places…the appropriate places…

Assemblies, IIS resources, permissions, Assemblies, IIS resources, permissions, directories, bindings, policies, etc.directories, bindings, policies, etc.

Manage away the complexitiesManage away the complexitiesDependency tree issuesDependency tree issues

““Environment-relative” configurationEnvironment-relative” configuration

Makes developer life easier & Makes developer life easier & QA/Production deployments repeatableQA/Production deployments repeatable

Page 12: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

What are my options?What are my options?

Option 1: See BTSInstaller in BizTalk docsOption 1: See BTSInstaller in BizTalk docsAddresses delivering assemblies in MSIAddresses delivering assemblies in MSIDeploying metadata to BizTalk management Deploying metadata to BizTalk management databasedatabaseSome holes: virtual directory management, SSO Some holes: virtual directory management, SSO affiliate apps, rule engine components, affiliate apps, rule engine components, environment-relative configenvironment-relative configDoesn’t address developer painDoesn’t address developer pain

Option 2: See Option 2: See BTS2004BatchFileDeployment.zip at BTS2004BatchFileDeployment.zip at http://www.gotdotnet.com/team/wsservers/bts2004http://www.gotdotnet.com/team/wsservers/bts2004

Shows how to adapt admin scripts provided in \Shows how to adapt admin scripts provided in \sdk\samples\adminsdk\samples\adminDoesn’t cover everything; good place to start if Doesn’t cover everything; good place to start if rolling your ownrolling your own

Page 13: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Option 3: Deployment Framework for Option 3: Deployment Framework for BizTalk (traceofthought.net)BizTalk (traceofthought.net)

Q: What is it?Q: What is it?

A: “A set of scripts and utilities for A: “A set of scripts and utilities for deploying BizTalk solutions both on deploying BizTalk solutions both on developer workstations and into server developer workstations and into server environments, including MSI packaging environments, including MSI packaging and environment-specific and environment-specific configuration.”configuration.”

Page 14: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Components of Deployment Components of Deployment FrameworkFramework

BizTalkDeploymentInclude.nantBizTalkDeploymentInclude.nantNAnt “include” file to use with your NAnt “include” file to use with your projectsprojects

Manages dependency tree & coordinates Manages dependency tree & coordinates deploymentsdeployments

Used for workstations and serversUsed for workstations and servers

Page 15: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Components of Deployment Components of Deployment Framework (2) – Utilities to…Framework (2) – Utilities to…

Enlist/Unenlist/Start/Stop orchestrations and Enlist/Unenlist/Start/Stop orchestrations and portsportsPreprocess xml binding files (or other xml files)Preprocess xml binding files (or other xml files)Provide basic UI for managing environment-Provide basic UI for managing environment-relative configrelative configConfigure IIS vdirs, app pools, web extensionsConfigure IIS vdirs, app pools, web extensionsSelectively restart BizTalk host instancesSelectively restart BizTalk host instancesCreate affiliate applications & import Create affiliate applications & import configuration dataconfiguration dataDeploy policies / vocabulariesDeploy policies / vocabulariesProvide automatic MSI generationProvide automatic MSI generation

Page 16: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Developer Experience with the Developer Experience with the Deployment FrameworkDeployment Framework

Page 17: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

What is required to use the What is required to use the Deployment Framework?Deployment Framework?

Get full sample from Get full sample from http://workspaces.gotdotnet.com/BT2004DeploymentFramework http://workspaces.gotdotnet.com/BT2004DeploymentFramework (references traceofthought.net)(references traceofthought.net)

Run the sampleRun the sampleSpend some time with the documentationSpend some time with the documentationInstall NAnt according to docsInstall NAnt according to docs

Follow naming conventions for solution name, project Follow naming conventions for solution name, project names, directory names for ease of use…names, directory names for ease of use…Get “core” zip file for Deployment Framework from Get “core” zip file for Deployment Framework from same locationsame locationExpand core zip “on top” of your projects current Expand core zip “on top” of your projects current directory structuredirectory structureWhat do you get?What do you get?

DeployTools/DeployResults/EnvironmentSettingsDeployTools/DeployResults/EnvironmentSettingsWiXSetup directoryWiXSetup directory

Create a YourProject.sln.deploy.build file…Create a YourProject.sln.deploy.build file…

Page 18: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Environment Relative ConfigurationEnvironment Relative Configuration

Lots of elements of BizTalk binding Lots of elements of BizTalk binding files (or any xml config file!) can vary files (or any xml config file!) can vary by physical environmentby physical environment

Having operations staff manage large Having operations staff manage large xml files can be tricky – “needle in xml files can be tricky – “needle in haystack”haystack”

Adapter configuration is escaped xmlAdapter configuration is escaped xml

We would like to extract out what varies We would like to extract out what varies into simple name/value pair into simple name/value pair management with simple UImanagement with simple UI

(Demo)(Demo)

Page 19: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Building MSIs…Building MSIs…

Once you have all your scripts working in Once you have all your scripts working in development…development…

All aspects of setup are being communicated All aspects of setup are being communicated efficiently among developers…efficiently among developers…

Why not use for the server?Why not use for the server?Only a subset of NAnt deployed - no services, no Only a subset of NAnt deployed - no services, no file associations for nantfile associations for nant

Small additional nant file required…Small additional nant file required…

Redistribution directory created (to look like Redistribution directory created (to look like server image); WiX & server image); WiX & MSI auto generatedMSI auto generated

(Demo)(Demo)

Page 20: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Why NAnt ?Why NAnt ?

Dependencies among BizTalk components Dependencies among BizTalk components are certainly no more complex than are certainly no more complex than build build dependenciesdependencies for other types of software for other types of software

Tools such as MAKE/NMAKE and Ant/NAnt Tools such as MAKE/NMAKE and Ant/NAnt have always managed these dependencies have always managed these dependencies well well

Background: They allow for the natural Background: They allow for the natural expression of dependencies, such that the expression of dependencies, such that the complete dependency tree is worked out by complete dependency tree is worked out by the toolthe tool

Page 21: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

NAnt BackgroundNAnt Background

NAnt is the .Net version of Ant, an open-source build NAnt is the .Net version of Ant, an open-source build tool that expresses all of the functionality of a tool that expresses all of the functionality of a traditional MAKE tool using Xmltraditional MAKE tool using Xml

…….while adding substantial functionality!.while adding substantial functionality!

NAnt scripts are quite suitable for expressing NAnt scripts are quite suitable for expressing deployment of BizTalk componentsdeployment of BizTalk components

Can be used with BTSDeploy.exe and a handful of WMI Can be used with BTSDeploy.exe and a handful of WMI scripts or Explorer OM-driven custom tasks to control all scripts or Explorer OM-driven custom tasks to control all aspects of deploymentaspects of deployment

This includes “tearing down” the environment in the This includes “tearing down” the environment in the correct order so as to deploy new versions!correct order so as to deploy new versions!

This includes all assemblies, all send/receive ports, and all This includes all assemblies, all send/receive ports, and all bindingsbindings

Page 22: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Get Training on BizTalk ServerGet Training on BizTalk Server

* For Details See: http://www.microsoft.com/biztalk/techinfo/training

74-135 Developing E-Business Solutions Using 74-135 Developing E-Business Solutions Using Microsoft BizTalk ServerMicrosoft BizTalk Server

E-Learning https://www.microsoftelearning.com/catalog/default.aspx#bizTalk

Virtual Labs http://msdn.demoservers.com

2 – Day2 – Day Hands-On QuickStart (Available Soon) Hands-On QuickStart (Available Soon)5 – Day5 – Day Developer Basics (Course 2157) Developer Basics (Course 2157)3 – Day3 – Day Operations Basics (Course 2158) Operations Basics (Course 2158)5 – Day5 – Day Deep Dive Advanced Course (Through Quicklearn) Deep Dive Advanced Course (Through Quicklearn)

Instructor Led TrainingsInstructor Led Trainings

Online LearningOnline Learning

Microsoft Learning Exam (available onsite)Microsoft Learning Exam (available onsite)

Page 23: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

Next StepsNext Steps

Cabana FunCabana FunI will be available at the I will be available at the Cabana after this sessionCabana after this session

Attend BPI Cabana SessionsAttend BPI Cabana Sessions

Pass the BPI Mini-ExamsPass the BPI Mini-Exams

Pass the MS Learning Pass the MS Learning BizTalk Server 2004 Exam 74-135 BizTalk Server 2004 Exam 74-135

For details on all activities, pick up a copy of For details on all activities, pick up a copy of “ “BPI Week at a Glance” and “BPI Community Activity” BPI Week at a Glance” and “BPI Community Activity”

Page 24: Automatic BizTalk 2004 Application Deployments Scott Colestock Trace Ventures, LLC blog:

BizTalk Server ResourcesBizTalk Server Resources

Homepage: http:// www.microsoft.com/commerceserver

Dev Center: http://msdn.microsoft.com/commerceserver

TechNet: http://www.microsoft.com/technet/prodtechnol/comm/

Ryan’s Blog: http://blogs.msdn.com/rdonovan/

Support: http://support.microsoft.com/ph/1552

Newsgroups: http://www.microsoft.com/technet/community/newsgroups