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

1

6

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

Academicism answered 17/8, 2011 at 17:42 Comment(0)
S
4

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.

Sternum answered 1/3, 2012 at 22:20 Comment(1)
I understand that the source will be definted within the site, but for what ever reason that somehow equates to ignoring the -ignore attributes specified in the command. I am trying to do this because I want said virtual directory contents to be protected by the authentication of the main app. I have posted my question here: #23548522Heathheathberry

© 2022 - 2024 — McMap. All rights reserved.