I am trying to figure out the best way to deploy to a web farm in stages. We have a web farm with 4 servers. For a deployment we want to take 3 of the servers 'offline' using our HW load balancer, leaving just 1 in the rotation. (this is outside of WFF
entirely) Then we want to deploy our application changes to those 3 servers in the farm so that we can validate the new code. then once the new code is tested/validated working we would allow the changes to propagate to the 4th server, and then allow all
servers back in the LB rotation.
The only way I've found to do this would be to stop all of the WFF services on the one server we want to delay getting the updates. or is there a more elegant way of doing this?
Why deploy to 3 of 4? Wouldn't it be better to deploy to 1 of 4?
How I have 4 set up is - 1 is the primary -2-4 are secondary. I simply take 1 out of the NLB, disable application provisioning. Deploy to 1, confirm all ok, then re-enable provisioning which then deploys to 2-4.
If you surely must do it your way i.e. deploy to 1-3, then finally to 4, I'd suggest still having 1 as primary, 2-4 as secondary and deploy etc as above. When you enable provisioning it should see 2-3 as all the same as 4 as old code and update it.
We have successfully used the method mentioned above, and it was great! Now the question is can we automate this setting using powershell scripts? I have not found a cmdlet that seems to do this.
I know it's a config file setting so I am confident it can be done (even if it is just a script to edit a file).. but.. it is only a single radio button. Seems more work to automate it than to click it! :)
knoall
9 Posts
How to deploy to a web farm in stages
Jun 07, 2012 03:26 PM|LINK
I am trying to figure out the best way to deploy to a web farm in stages. We have a web farm with 4 servers. For a deployment we want to take 3 of the servers 'offline' using our HW load balancer, leaving just 1 in the rotation. (this is outside of WFF entirely) Then we want to deploy our application changes to those 3 servers in the farm so that we can validate the new code. then once the new code is tested/validated working we would allow the changes to propagate to the 4th server, and then allow all servers back in the LB rotation.
The only way I've found to do this would be to stop all of the WFF services on the one server we want to delay getting the updates. or is there a more elegant way of doing this?
nastymatt
124 Posts
Re: How to deploy to a web farm in stages
Jun 11, 2012 11:55 AM|LINK
Why deploy to 3 of 4? Wouldn't it be better to deploy to 1 of 4?
How I have 4 set up is - 1 is the primary -2-4 are secondary. I simply take 1 out of the NLB, disable application provisioning. Deploy to 1, confirm all ok, then re-enable provisioning which then deploys to 2-4.
If you surely must do it your way i.e. deploy to 1-3, then finally to 4, I'd suggest still having 1 as primary, 2-4 as secondary and deploy etc as above. When you enable provisioning it should see 2-3 as all the same as 4 as old code and update it.
knoall
9 Posts
Re: How to deploy to a web farm in stages
Jun 11, 2012 02:44 PM|LINK
It does not have to be how I described. Your way seems much easier!
I will experiment with this method and see how it works. Thanks for the tip!
knoall
9 Posts
Re: How to deploy to a web farm in stages
Jun 13, 2012 08:43 PM|LINK
We have successfully used the method mentioned above, and it was great! Now the question is can we automate this setting using powershell scripts? I have not found a cmdlet that seems to do this.
nastymatt
124 Posts
Re: How to deploy to a web farm in stages
Jun 14, 2012 11:24 AM|LINK
Which part is it you wish to automate?
knoall
9 Posts
Re: How to deploy to a web farm in stages
Jun 14, 2012 03:58 PM|LINK
I wish to automate the disabling/enabling of application provisioning.
nastymatt
124 Posts
Re: How to deploy to a web farm in stages
Jun 14, 2012 04:04 PM|LINK
I know it's a config file setting so I am confident it can be done (even if it is just a script to edit a file).. but.. it is only a single radio button. Seems more work to automate it than to click it! :)
knoall
9 Posts
Re: How to deploy to a web farm in stages
Jun 14, 2012 04:15 PM|LINK
I don't disagree. It's not me who wants to do it unfortunately.
nastymatt
124 Posts
Re: How to deploy to a web farm in stages
Jun 15, 2012 12:07 PM|LINK
I reckon you can do this via appcmd.. you can certainly list all attributes so you must be able to configure them
to list the syntax is appcmd list config -section:webfarms
here is some more pointers :
http://learn.iis.net/page.aspx/485/define-and-configure-an-application-request-routing-server-farm/
if you can't get it let me know and i'll spend some time on it...
knoall
9 Posts
Re: How to deploy to a web farm in stages
Jun 18, 2012 07:15 PM|LINK
I haven't had much luck with this. I have tried various iterations of appcmd with no success.
AppCmd.exe set config -section:webfarms /applicationProvision.syncWebServerFromPrimary="false"
ERROR ( message:Unknown attribute "applicationProvision.syncWebServerFromPrimary
=false". Replace with -? for help. )