Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly is the Auto Provider in Web Deploy (msdeploy.exe)

Can somebody explain (better than the technet/msdn docs) what the auto provider exactly does, how it works, and when to use it.

This is in regard to Web Deploy. I've seen a lot of documentation specifying -dest:auto and it's not really making sense to me.

The auto provider specifies that the provider on a destination will be the same as the source provider.

Example

msdeploy.exe -verb:sync -source:appHostConfig="MySite" -dest:auto,computername=Server1

The auto provider enables you to avoid entering the full path for the -dest argument when the destination argument is the same as the -source argument. It also removes the need to copy the manifest file separately from an archive or package.

The auto provider takes the source that you specify and uses a corresponding location on the destination computer. For example, if you specify appHostConfig=Site1 as the source, the destination on the target computer will be Site1. This is useful when you want to synchronize a Web site "as is" to a remote machine.

technet docs for auto provider

Example that doesn't make sense:

msdeploy.exe -verb:sync -source:package=myapp.zip -dest:auto

Why would you ever set the destination exactly to the source? What is the point? Aren't you simply overwiting the source with iteslf?

The generated cmd file generated from publishing a package in VS2010 generates something like this:

"C:\Program Files\IIS\Microsoft Web Deploy V2\\msdeploy.exe" -source:package='MySourcePath' -dest:auto"  

Doesn't auto mean the source will just overwrite itself? But it doesn't, it actually updates the IIS web site (based on the settings in the manifest)

I've tried using package as the destination and in this case it did update the source package and not the IIS site.

The catalyst for this question is that I'm implementing CI and I 've always used msbuild/xcopy in the past. I want to utilize msdeploy now. I want to understand it rather than simply calling the myproject.cmd that's generated from visual studio.

For example, this SO link specifies using the auto provider for the dest argument.

Thanks

like image 318
Scott Coates Avatar asked Aug 17 '11 17:08

Scott Coates


People also ask

Where is MSDeploy exe located?

MSDeploy.exe can be usually found under path C:\Program Files\IIS\Microsoft Web Deploy V3 on your computer.

What does web Deploy do?

The Web Deploy is a tool for simplifying migration, management and deployment of Web applications, sites and servers. It can be used to package a Web site, automatically including content, configuration, certificates and databases. It can be used to synchronize between IIS 6.0, IIS 7.

How do I know if MSDeploy is installed?

Is Web Deploy installed? You can verify web deploy is installed by going to the "Programs and Features" control panel and looking for "Microsoft Web Deploy 2.0" in the list of installed programs. If it is not there, you can install it via the Web Platform Installer by going to the "Products" tab.


1 Answers

I think you've actually figured out the answer for yourself.

If the source is a package and the destination is auto, that simply means that the components specified inside the package will be "unzipped" and placed on the destination server. In the -source:package -dest:auto syntax, "auto" does not mean that the package itself is the destination.

And, as you observe, if you specify a package as the destination, whatever you specify for the source will indeed be packaged up as a zip file that you can later use as a source to deploy elsewhere.

like image 99
timamm Avatar answered Nov 06 '22 15:11

timamm