2

I have more than 20 solutions to deploy or retract at the same time, Currently i doing the deployment/retract one by one and each deployment is required an iis reset and this causes around 20 minutes for the complete deployment/retract.Is there a way to deploy or retract multiple solutions in a single batch process. I am using .net to do the deployment.

1
  • Are there any dependencies between the solutions or are they completely independent? Can you explain why there are 20 separate solutions? Commented Sep 10, 2011 at 15:27

3 Answers 3

2

Not sure about I am using .net to do the deployment. in your question.

There are two basic ways to deploy/retract multiple solutions on SharePoint 2010:

stsadm command ('The Old Way')

You can use stsadm commands to retract/deploy your solutions and put them in batch file. It can look something like this:

stsadm -o retractsolution -name [solution1]
stsadm -o retractsolution -name [solution2]

stsadm -o execadmsvcjobs

stsadm -o deletesolution -name [solution1]
stsadm -o deletesolution -name [solution2]

stsadm -o execadmsvcjobs

stsadm -o addsolution -filename [solution1]
stsadm -o deploysolution -name [solution1] -immediate
stsadm -o addsolution -filename [solution2]
stsadm -o deploysolution -name [solution2] -immediate

stsadm -o execadmsvcjobs

By stopping SharePoint 2010 Administration service (SPAdminV4) before executing this batch you will save some time (but not too much). Then again instead of retracting, deleting, adding and deploying you can use stsadm -o upgradesolution just to upgrade your solutions (if this is requirement).

PowerShell script ('The New Way')

PowerShell is very powerful (!) tool for scripting. IMHO you need to solve your deployment by using some PS script (eg. second link). Since I would need few more pages of text to explain everything I will just point you in right direction:

2
  • 2
    Deployment does not work reliable when only setting off the deployment jobs as in your STSADM example, especially with many solutions and/or multiple servers. It is essential to wait for the actual deployment time jobs to terminate. Commented Sep 14, 2011 at 12:33
  • true if your solutions are 'connected' in any way Commented Sep 14, 2011 at 12:51
0

When retracting solutions from SharePoint 2010, it only does an App Pool recycle on the web application the solution is deployed to (if it is deployed to all applications, then each app pool will get recycled). SharePoint treats each retraction as a separate timer job and there isn't any way to change that behavior. So, after each retracted solution, the applicable app pools will be recycled.

0

I prefer to group the operations. So I start by retracting all solutions, delete them, run an application pool recycle and restart the owstimer (if there are timer jobs in any of the solutions), then add all solutions and deploy them.

I have been working on projects with upto 30 solution packages at we followed that pattern. It is slow, yes, but it works everytime. Also it is seems very import to only run one deployment job at any time. So we built a tool to check for the deployment timer job to be finished before continuing with the next deployment operation. Gary Lapointe has built this into his tools.

Again, it might seem awkward and time consuming but for this is the solution that works every time and on single server as well as farms with multiple front-ends.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.