开发者

csrun & cspack - what's the purpose of sitePhysicalDirectories?

I'm trying to build an Azure deployment package using cspack on my build server for devfabric deployment (csrun) onto a test server. cspack dutifully copies the web role binaries & files into the csx package, but it also requires a 'sitePhysicalDirectory' path for each web role, which is embedded in a 'RoleModel.xml' file. This directory must exist at package time.

Upon deployment, csrun sets up an IIS site that points directly to the sitePhysicalDirectory path and appears to completely ignore the web role binaries packaged 开发者_运维问答in the csx package. Needless to say, the test deployment on a different machine doesn't work.

Am I missing something here? Why can't cspack/csrun set the physical path in IIS to the approot in csx package? What's the purpose of a csx package if the packaged binaries are not used? What does sitePhysicalDirectories do in a production Azure deployment?


I'm beginning to think the answer to all of those questions is "Because cspack/csrun are poorly-designed piles of garbage that should never have shipped". They seem to be built for Visual Studio support and nothing else.

Manually updating the RoleModel.xml file to set the physicalPath attribute to 'approot' (it's relative to the RoleModel.xml location) after packaging appears to be a viable workaround.


I think part of this has to do with the addition of Full IIS. It used to be the case that your approot directory in Windows Azure was for both the RoleEntryPoint process and the IIS WAS Host (one in the same). However, with full IIS, you would have w3wp.exe running your web code and the WaWorker process executing your RoleEntryPoint.

The decision was made to effectively copy the entire website (which also has the WebRole.cs RoleEntryPoint) to a new directory and root full IIS there. As such, you will notice that your packaging for Web Roles actually contains a copy of your code twice. Once, for the website and once for the WebRole.cs RoleEntryPoint. Only your RoleEntryPoint is executed now out of approot. I don't remember all the technical reasons why this occurred, but it might have been easier/safer to copy the website out rather than risk missing a dependency.


I would think that sitePhysicalDirectory should be set as the folder under AppRoot in your csx package, not the source of your web role binaries & files.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜