Question

I am using webdeploy to automatically deploy a application on a testserver via teamcity. Now once all test scripts are run I want to deploy it on Live servers. I have installed a web farm on server1(controller) and I have 2 other servers server2(primary) and server3(secondary) as web farm agents setup. Now how can I copy the publish done on testserver to my live sites on server2 and server3 and it do the load balancing. can any one please explain how I can Accomplish this task automatically using teamcity. or I am going the wrong way.

Please guide.

Was it helpful?

Solution

I would make a different job, that deploys to the production, that way you control when it deploys, but that depends on what it is, and how much.

If you are building a package with /t:package you can make it available through artifacts, and use msdeploy -verb:sync -source:package="Path to package" -dest:auto.

In my "deploy to production" job I have this step, as a command line step:

"c:\Program Files\IIS\Microsoft Web Deploy V2\msdeploy.exe" -verb:sync -source:package="%env.deployPackagePath%" -dest:auto,includeAcls=False,wmsvc="%env.msdeploy.serviceurl%?site=%env.msdeploy.Sitename%",userName="%env.msdeploy.username%",password="%env.msdeploy.password%",authType=basic -allowUntrusted -setParam:name="IIS Web Application Name",value="%env.msdeploy.Sitename%"  

OTHER TIPS

I'd recommend looking into the Web Farm Framework, which supports deploying to multiple servers and even removing them from (supported) load balancers.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top