Orchard Solution, GIT, and Azure Web Site Deployment

Topics: General, Installing Orchard
Oct 2, 2012 at 3:40 AM
Edited Oct 2, 2012 at 4:21 AM

Am I correct that the current "Deploy to Azure" documentation pertains only to an Azure "web role" cloud service deployment rather than the new (Jun 2012) "Azure Web Site" technology preview?  Likewise, am I correct that the "Orchard.Azure.1.5.1.zip" distro does not apply to the Azure web site technology preview?

I want to code against the Orchard solution in Visual Studio, and then push with GIT to an Azure web site.  So I downloaded Orchard.Source.1.5.1.zip and extracted.  Into my GIT repository I committed everything except what is found in the 'lib' folder.

On my push to Azure, I got an error.  David Ebbo suggested I use a .deployment file:

[config]
project = src

That seemed to make the Azure web site deployment through GIT happy, but my deployed web site doesn't work.  As my comments state in that link above, it appears the file structure of my GIT repository is wrong (perhaps Azure wants my global.asax at the root?).  David also suggested I look at an older Orchard 1.4.1 Azure-ready deployment, but that doesn't have the Visual Studio solution or project files.

So I then decided to cheat.  I used web deploy to publish the Orchard site, directly on top of what I had already deployed using GIT.  It was very instructive to see the diff generated by web deploy:

Copying all files to temporary location below for package/publish:
obj\Release\Package\PackageTmp.
Start Web Deploy Publish the Application/package to https://waws-prod-bay-001.publish.azurewebsites.windows.net/msdeploy.axd?site=MyWebSite ...
Creating application (MyWebSite)
Adding directory (MyWebSite\bin).
Adding directory (MyWebSite\Config).
Adding directory (MyWebSite\Media).
Adding ACL's for path (MyWebSite)
Adding ACL's for path (MyWebSite)
Adding file (MyWebSite\bin\Antlr3.Runtime.dll).
Adding file (MyWebSite\bin\Autofac.Configuration.dll).
Adding file (MyWebSite\bin\Autofac.dll).
Adding file (MyWebSite\bin\Autofac.Integration.Mvc.dll).
Adding file (MyWebSite\bin\Autofac.Integration.Web.dll).
Adding file (MyWebSite\bin\Castle.Core.dll).
Adding file (MyWebSite\bin\Castle.DynamicProxy2.dll).
Adding file (MyWebSite\bin\ClaySharp.dll).
Adding file (MyWebSite\bin\FluentNHibernate.dll).
Adding file (MyWebSite\bin\Iesi.Collections.dll).
Adding file (MyWebSite\bin\log4net.dll).
Adding file (MyWebSite\bin\Microsoft.Web.Infrastructure.dll).
Adding file (MyWebSite\bin\NHibernate.ByteCode.Castle.dll).
Adding file (MyWebSite\bin\NHibernate.dll).
Adding file (MyWebSite\bin\NHibernate.Linq.dll).
Adding file (MyWebSite\bin\NuGet.Core.dll).
Adding file (MyWebSite\bin\Orchard.Core.dll).
Adding file (MyWebSite\bin\Orchard.exe).
Adding file (MyWebSite\bin\Orchard.Framework.dll).
Adding file (MyWebSite\bin\Orchard.WarmupStarter.dll).
Adding file (MyWebSite\bin\Orchard.Web.dll).
Adding file (MyWebSite\bin\System.Data.SqlServerCe.dll).
Adding file (MyWebSite\bin\System.Web.Helpers.dll).
Adding file (MyWebSite\bin\System.Web.Mvc.dll).
Adding file (MyWebSite\bin\System.Web.Razor.dll).
Adding file (MyWebSite\bin\System.Web.WebPages.Deployment.dll).
Adding file (MyWebSite\bin\System.Web.WebPages.dll).
Adding file (MyWebSite\bin\System.Web.WebPages.Razor.dll).
Adding file (MyWebSite\Config\log4net.config).
Adding file (MyWebSite\Config\Sample.Host.config).
Adding file (MyWebSite\Config\Sample.HostComponents.config).
Adding file (MyWebSite\Global.asax).
Adding file (MyWebSite\Media\OrchardLogo.png).
Adding file (MyWebSite\Refresh.html).
Adding file (MyWebSite\Web.config).
Adding ACL's for path (MyWebSite)
Adding ACL's for path (MyWebSite)
Publish is successfully deployed.

Site was published successfully

That collection of files tells me a couple things.  First, that Azure didn't seem to be able to access nuget to get all the missing packages.  At the 3 minute mark of this David Ebbo video, clearly it is an ability that Azure is supposed to have.  Second, it perhaps couldn't correctly itnerpret the Orchard.sln file...since it didn't grab the global.asax file from the Orchard.Web project.

But I can't help but also notice that long before I did the web-deploy, and long after I had done the GIT deploy, my Azure portal page was *forever* saying "updating configuration for for web site".  I had no idea what configuration it was referring to.  Eventually that message was replaced with a message that said "Failed saving changes for web site".  I wonder if that pertained to ACL issues.  After all, the web deploy log shown above seemed to think it needed to set those values.  Perhaps Azure was trying to copy files around and could not?

With all this information at hand, what change(s) do I need to make to my GIT repository of Orchard source, in order for an Azure "web site" deployment to succeed using a push from GIT? 

p.s. Even after the web deploy, my site still isn't working.  I have a YSOD to work through, but I bet it is some mistake I made.  I'll update later after I've had time to look at it.

Coordinator
Oct 2, 2012 at 4:22 AM

See http://orchard.codeplex.com/discussions/358786