BizTalk Server Orchestration - deploying/undeploying assemblies with scripts

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > January 2005 > deploying/undeploying assemblies with scripts





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author deploying/undeploying assemblies with scripts
biztalker

2005-01-26, 5:54 pm

hello,

i want to make my life simple by using scripts to stop/start orchs,
deploy/undeploy assemblies etc. it is a straightforward task, and there are
samples out there telling u exactly how to do so. i have two .bat files, one
to stop orchestration and undeploy the assembly, and the other one to deploy
assembly and start the orchestration. the combination does not seem to work,
since it ends up deploying the not-most-recently-built solution. unless i
undeploy, build and deploy the solution from visual studio itself, my most
recent changes are not reflected. here is what the files look like:

cleanup:
Note: i have attempted to use the btsdeploy remove command by specifying the
path of the assembly to no effect as well.

@ECHO Calling the WMI script to Stop and Unenlist the orchestration...
@CScript StopOrch.vbs TestExceptionOrchestration.CatchException
TestExceptionOrchestration Unenlist

@ECHO Undeploying orchestration...
@BTSDEPLOY REMOVE NAME="TestExceptionOrchestration" VERSION="1.0.0.0"
CULTURE="" PUBLICKEYTOKEN="4c90d01dff5aa99d" UNINSTALL="true"

setup:

@SET SolutionName=pathtosolution.sln
@ECHO Building the project and deploying the sample assembly...

@DevEnv %SolutionName% /Build Development /Out Build.log


@ECHO Deploying orchestration...
@BTSDEPLOY DEPLOY ASSEMBLY="pathtoassembly" INSTALL="true"

-----------------------------------------------------------------------------------
can someone point out what's missing?
thanks


Joe Gaska

2005-01-26, 5:54 pm

Are you absolutely sure when you run your undeploy script it has removed
your assembly? When you are unenlisting your orchestration from within
visual studio you are checking the boxes to "Terminate Existing
Orchestration Instances". Are you sure before you run your script that all
instances have been terminated?


"biztalker" <biztalker@discussions.microsoft.com> wrote in message
news:F4423A41-10FC-461A-A543-07EBD3B4B7CE@microsoft.com...
> hello,
>
> i want to make my life simple by using scripts to stop/start orchs,
> deploy/undeploy assemblies etc. it is a straightforward task, and there

are
> samples out there telling u exactly how to do so. i have two .bat files,

one
> to stop orchestration and undeploy the assembly, and the other one to

deploy
> assembly and start the orchestration. the combination does not seem to

work,
> since it ends up deploying the not-most-recently-built solution. unless i
> undeploy, build and deploy the solution from visual studio itself, my most
> recent changes are not reflected. here is what the files look like:
>
> cleanup:
> Note: i have attempted to use the btsdeploy remove command by specifying

the
> path of the assembly to no effect as well.
>
> @ECHO Calling the WMI script to Stop and Unenlist the orchestration...
> @CScript StopOrch.vbs TestExceptionOrchestration.CatchException
> TestExceptionOrchestration Unenlist
>
> @ECHO Undeploying orchestration...
> @BTSDEPLOY REMOVE NAME="TestExceptionOrchestration" VERSION="1.0.0.0"
> CULTURE="" PUBLICKEYTOKEN="4c90d01dff5aa99d" UNINSTALL="true"
>
> setup:
>
> @SET SolutionName=pathtosolution.sln
> @ECHO Building the project and deploying the sample assembly...
>
> @DevEnv %SolutionName% /Build Development /Out Build.log
>
>
> @ECHO Deploying orchestration...
> @BTSDEPLOY DEPLOY ASSEMBLY="pathtoassembly" INSTALL="true"
>
> --------------------------------------------------------------------------

---------
> can someone point out what's missing?
> thanks
>
>



Neal Walters

2005-01-26, 5:54 pm

This is a wild guess - what about /rebuild instead of /build on the DevEnv
command?
Or is perhaps the DevEnv building the new .DLL in the wrong directory?

I'm really surprised you have to run the DevEnv command. It seems like you
could rebuild your solution in the IDE, then run the four other scripts, and
they should undeploy the old one and deploy the new .DLL.

Also curious - you don't need a binding file to restore the bindings of the
orchestration to the ports?

Neal Walters
http://Biztalk-Training.com

biztalker

2005-01-27, 7:46 am

actually i am missing the binding file...that part is missing in the script.
once the orchestration has been deployed, what i do is go to the explorer to
restore the bindings. i guess i really didn't need to run the devenv command,
i just added it in there to see if running that in the same script made a
difference.

while waiting for a response, i was doing some more browsing through the
newsgroups and came across this thread:

http://groups.google.ca/groups?hl=e....com%26rnum%3D1

the problem in the thread is the problem i am facing: the changes i make to
the orchestration don't seem to get picked up when i attempt to deploy the
rebuilt version. message 7 in the thread says:

"You must stop the host if you are deploying the same version. This is a
..Net issue where the assembly is still in memory in the host, so it won't
load the new assembly since it is the same version. It basically doens't
know that it changed. If you are undeploying and deploying, and not
changing hte version number,then you will need to stop and restart the host."

this is what i do not do in the scripts, and i guess it happens when i
deploy/undeploy through visual studio itself. so right now i'm looking for a
way to start/stop hosts through scripts. any pointers?

thanks

"Neal Walters" wrote:

> This is a wild guess - what about /rebuild instead of /build on the DevEnv
> command?
> Or is perhaps the DevEnv building the new .DLL in the wrong directory?
>
> I'm really surprised you have to run the DevEnv command. It seems like you
> could rebuild your solution in the IDE, then run the four other scripts, and
> they should undeploy the old one and deploy the new .DLL.
>
> Also curious - you don't need a binding file to restore the bindings of the
> orchestration to the ports?
>
> Neal Walters
> http://Biztalk-Training.com
>

biztalker

2005-01-27, 5:49 pm

hi joe,

the undeploy script did remove the assembly from gac as well as i didn't see
it in the explorer either. from the reading i've done so far, the issue seems
to be me not having recycled the host when deploying/undeploying through
scripts. the recycling probably takes place by default when the
undeployment/deployment is done through visual studio (or through the
deployment wizard).

i pasted a response from one thread in my other response that related to the
problem. here is another link that talks about the issue i'm facing:

http://groups.google.ca/groups?q=bi....phx.gbl&rnum=1

thanks

"Joe Gaska" wrote:

> Are you absolutely sure when you run your undeploy script it has removed
> your assembly? When you are unenlisting your orchestration from within
> visual studio you are checking the boxes to "Terminate Existing
> Orchestration Instances". Are you sure before you run your script that all
> instances have been terminated?
>
>
> "biztalker" <biztalker@discussions.microsoft.com> wrote in message
> news:F4423A41-10FC-461A-A543-07EBD3B4B7CE@microsoft.com...
> are
> one
> deploy
> work,
> the
> ---------
>
>
>

Neal Walters

2005-01-27, 5:49 pm

There is no model in the SDK, but you can take one of the other WMI scripts
and modify it. You would use the HostIntance object, and the Start/Stop
methods.

Is this on your own machine - are you sharing an environment with others?
If you are sharing - then you might want to create a different host for each
developer so when you restart it, it doesn't kill everybody else.

Neal Walters
http://Biztalk-Training.com

"biztalker" wrote:
[vbcol=seagreen]
> actually i am missing the binding file...that part is missing in the script.
> once the orchestration has been deployed, what i do is go to the explorer to
> restore the bindings. i guess i really didn't need to run the devenv command,
> i just added it in there to see if running that in the same script made a
> difference.
>
> while waiting for a response, i was doing some more browsing through the
> newsgroups and came across this thread:
>
> http://groups.google.ca/groups?hl=e....com%26rnum%3D1
>
> the problem in the thread is the problem i am facing: the changes i make to
> the orchestration don't seem to get picked up when i attempt to deploy the
> rebuilt version. message 7 in the thread says:
>
> "You must stop the host if you are deploying the same version. This is a
> .Net issue where the assembly is still in memory in the host, so it won't
> load the new assembly since it is the same version. It basically doens't
> know that it changed. If you are undeploying and deploying, and not
> changing hte version number,then you will need to stop and restart the host."
>
> this is what i do not do in the scripts, and i guess it happens when i
> deploy/undeploy through visual studio itself. so right now i'm looking for a
> way to start/stop hosts through scripts. any pointers?
>
> thanks
>
> "Neal Walters" wrote:
>
biztalker

2005-01-27, 5:49 pm

thanks Neal. i would like some more info on this: what are the implications
of stopping and restarting a host?
does it kill all running instances?
this is not a shared environment. however, since there are a bunch of
assemblies deployed, catering to different requirements, would it be better
to have multiple hosts?

"Neal Walters" wrote:
[vbcol=seagreen]
> There is no model in the SDK, but you can take one of the other WMI scripts
> and modify it. You would use the HostIntance object, and the Start/Stop
> methods.
>
> Is this on your own machine - are you sharing an environment with others?
> If you are sharing - then you might want to create a different host for each
> developer so when you restart it, it doesn't kill everybody else.
>
> Neal Walters
> http://Biztalk-Training.com
>
> "biztalker" wrote:
>
[vbcol=seagreen]
Tareq Mohamed

2005-01-29, 7:47 am

give a try to
http://biztalkers.blogspot.com/2004...rogress_17.html


"biztalker" wrote:
[vbcol=seagreen]
> thanks Neal. i would like some more info on this: what are the implications
> of stopping and restarting a host?
> does it kill all running instances?
> this is not a shared environment. however, since there are a bunch of
> assemblies deployed, catering to different requirements, would it be better
> to have multiple hosts?
>
> "Neal Walters" wrote:
>
1[vbcol=seagreen]
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com