Before moving to a complete Azure environment for Sitecore. Our current work are on-premise, however in order to keep a consistent deployment method. We are looking to use WebDeploy for local deployment as well. Since Sitecore provides pre-built WebDeploy packages for Azure, I was trying to test them out in local so we could potentially borrow it for local setup. But of course it requires some configuration changes since it's setup to use Azure services like Application Insights and search indexes stuff.
Package I used is Sitecore 8.2 rev.
It requires a SetParameters.xml file based on the parameters.xml inside of the package. Of course I can manually create it, but being lazy, I copied the parameters.xml into a project in Visual Studio and generated a WebDeploy package, which generate the SetParameters.xml for me automatically.
Then just call the commands from command prompt:
"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='C:\xxx\Sitecore 8.2 rev.' -dest:auto,includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"C:\xxx\Sitecore 8.2 rev. 170614_single.scwdp.SetParameters.xml"
However keep getting the SQL error while it's creating database users:
You can only create a user with a password in a contained database
Turns out it could a bug with the version of SQL management studio was used to generate dacpac files. I had to import the dacpac files manually into a SQL server and Update all database options "Containment Type" to "Partial":
Then use Visual Studio to extract them again to dacpac files and repackage the WebDeploy package.
After that, the SQL error was gone and the package was able to install successfully.
Will create a post in the future for all the configuration changes required.