Shared Application Deployment

Topics: General Questions, Getting Started/Beginner, Server Deployment
Jan 13, 2012 at 5:24 PM

Hello,

We have around 20 applications that reference a handful of schemas and pipelines which are deployed as a separate application. My question is, if I have to update the common application using the BTDF, do I have to go about undeploying the depending applications manually first (probably using BTDF separately for this application) and then deploy the common application. Or the BTDF able to recognize the dependant applications and undeploys the dependant applications before updating the common application and after the update redeploy the dependant application?

Thanks

Harini

Coordinator
Jan 16, 2012 at 5:29 AM

Hi Harini,

The Deployment Framework is currently based around a single application, so while a particular application is aware of any applications required for it to run, it is not aware of other applications that depend on it.  In the case of your common application, that application's BTDF configuration is not aware of the 20 other applications that depend on it.  If you were doing a "pure" BTDF deployment, then yes, you would have to undeploy all 20 apps that reference the common app, redeploy the common app and then all 20 other apps.

A couple of simpler methods are possible.

First, you could manually delete all of the app references pointing to the common app in BizTalk Admin (or make this a pre and post deploy step in your common app's .btdfproj).  With the references removed, you could immediately undeploy and redeploy the common app with the normal BTDF process, then re-add the references.  I'm not sure, however, if BizTalk Admin will block you from removing the references.

Second, if you simply change steps inside of a pipeline or make some non-breaking changes within a schema, you can sometimes get away with simply re-GAC'ing the assemblies.  That would avoid any redeployment, but the changes allowed in this case are fairly limited.

Another thing you might look at is a beta framework named Sprinkler which has been used with BTDF projects.  It is able to help automatically deploy across multiple servers, which could help save you time since you have so many apps.

Thanks,
Tom

Jan 16, 2012 at 4:57 PM

Thanks you verymuch for the reply.

I have tried to remove the references manually using the BizTalk admin console and it prevented me. Looks like manual removal of the references is not possible. I am considering to add pre/post deployment steps in .btdfproj file (Though I am not sure if these steps do the same as the admin console. If so, these .btdfproj file changes would not work either. But I would like to give it a go)

Could you please help me how to add the pre/post deployment steps in the .btdfproj file?

Thanks

Harini

Jan 16, 2012 at 5:01 PM
Just to add to this thread, I'm VERY interested in solving this issue as well. We have an almost identical situation, in terms of problem and size. We are manually undeploying all the dependent applications before implementing a change.
Harini, if you find a solution to this, I would appreciate hearing your results.

Thanks!

Chris J Albertson





On Mon, Jan 16, 2012 at 11:57 AM, harinisiva <notifications@codeplex.com> wrote:

From: harinisiva

Thanks you verymuch for the reply.

I have tried to remove the references manually using the BizTalk admin console and it prevented me. Looks like manual removal of the references is not possible. I am considering to add pre/post deployment steps in .btdfproj file (Though I am not sure if these steps do the same as the admin console. If so, these .btdfproj file changes would not work either. But I would like to give it a go)

Could you please help me how to add the pre/post deployment steps in the .btdfproj file?

Thanks

Harini

Read the full discussion online.

To add a post to this discussion, reply to this email (biztalkdeployment@discussions.codeplex.com)

To start a new discussion for this project, email biztalkdeployment@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jan 16, 2012 at 5:37 PM

I found this blog interesting http://blog.tiews.info/2008/05/02/biztalk-2006-manage-application-references/.

The author was talking about how to remove BTS app references programmatically. If we can use this code to remove the references as pre/post deployment steps, I think it might be possibel to redeploy the shared apps without undeploying the dependant apps.

However,  I still dont know how to add the pre/post deployment steps in .btdfproj file. Can someone point me in the right direction please.

Thanks

Harini

Coordinator
Jan 16, 2012 at 5:45 PM

Please add new targets to your .btdfproj named CustomDeployTarget and CustomUndeployTarget and add the custom tasks inside them.  (Like <Target Name="CustomDeployTarget"></Target>.)

The Deployment Framework already has an MSBuild task AddAppReference.  If you want to add a remove option to it, you could start with the source code in Tools\BuildTasks\DeploymentFramework.BuildTasks\AddAppReference.cs.

Thanks,
Tom

Jan 17, 2012 at 6:37 PM

Hi Tom,

Thanks for yor reply.

I have quick question here. For the simplicity sake lets call the common app as CAPP and the dependant app as DAPP. DAPP has a reference to CAPP. The idea is to remove that link bewteen the apps so that the CAPP can be redeployed with out the need to undeploy/redeploy the DAPP. That means we need to be able to remove the reference on DAPP while redeploying the CAPP. Is it possible to do that? Is there a remove dependant applications property/task available on CAPP that would remove the link bewteen CAPP and DAPP?

Thanks

Harini

Coordinator
Jan 18, 2012 at 3:40 PM

The API is the BizTalk ExplorerOM, and there is not a built-in MSBuild task to remove an app reference.  In my last message I referenced the AddAppReference task source code that you can use to create a custom remove-app task.  My suspicion is that the API will fail the same way as BizTalk Admin, because removing the app references essentially puts the apps into an invalid state.  Any messages coming through the DAPP's would fail while CAPP is being redeployed, so the API probably won't allow it -- but it's worth a try.

If you're making a change to the common app that is small enough not to break any of the dependent apps (something that doesn't force you to recompile the dependent apps), then the change may be a candidate for the simple GAC update that I mentioned earlier.  However, adding a schema or pipeline wouldn't work with that simple approach.

Assuming that the changes do require a full deployment of the common app, your other best bet is to automate the entire deployment.  That has been done by many users and you will find a number of discussions here on that topic.  The BTDF deployments can be fully automated with fairly low effort, and also see the Sprinkler framework that I referenced above to assist with that.

Thanks,
Tom