Publishing Orchard on Azure Web Sites using Git

Topics: General, Installing Orchard
Aug 9, 2013 at 12:03 PM
Orchard was last updated in git 10 months ago - https://github.com/AzureWebSites/OrchardCMS

Is this no longer a recommended way of deploying Orchard on git? - http://sebastienros.com/publishing-orchard-on-azure-web-sites-using-git
Coordinator
Aug 9, 2013 at 3:31 PM
Use the new https://git01.codeplex.com/orchard instead. This will always be up to date from now on, because it's now the master repo.
Aug 10, 2013 at 6:23 AM
I tried using the source code unchanged but Azure didn't know what solution/project to deploy and it failed. I solved that error by adding a .deployment file:
[config]
project = src/Orchard.Web/Orchard.Web.csproj
After adding that file it deployed successfully but I get a new error message when I view the website:
None of the constructors found with 'Autofac.Core.Activators.Reflection.DefaultConstructorFinder' on type 'Orchard.Environment.DefaultOrchardShell' can be invoked with the available services and parameters:
Cannot resolve parameter 'Orchard.Mvc.Routes.IRoutePublisher routePublisher' of constructor 'Void .ctor(System.Func`1[Autofac.Features.OwnedInstances.Owned`1[Orchard.Environment.IOrchardShellEvents]], System.Collections.Generic.IEnumerable`1[Orchard.Mvc.Routes.IRouteProvider], System.Collections.Generic.IEnumerable`1[Orchard.WebApi.Routes.IHttpRouteProvider], Orchard.Mvc.Routes.IRoutePublisher, System.Collections.Generic.IEnumerable`1[Orchard.Mvc.ModelBinders.IModelBinderProvider], Orchard.Mvc.ModelBinders.IModelBinderPublisher, Orchard.Tasks.ISweepGenerator)'.
How do I fix this error?

Do you have updated instructions for installing from Git onto Azure? Contents of the repository is different to the one on GitHub and there are additional steps required.
Aug 10, 2013 at 12:17 PM
Also, I don't know much about Orchard but won't these lines in the .gitignore prevent modules and themes from being pushed to Azure? Aren't these the directories where modules and themes are installed?
src/Orchard.Azure/Orchard.Azure.Web/Modules/
src/Orchard.Azure/Orchard.Azure.Web/Themes/
Coordinator
Aug 11, 2013 at 7:41 AM
You still need whatever is pushed to Azure to be compiled. In particular, here it seems like the framework and core are not compiled.
Developer
Aug 11, 2013 at 10:15 AM
You need to compile the whole Orchard.Azure.sln, not Orchard.Web.csproj solely.
Aug 11, 2013 at 11:34 PM
How do I do that? The .deployment file lets you specify either a directory or a project - https://github.com/projectkudu/kudu/wiki/Customizing-deployments

What about the .gitignore file I pointed out? It looks like it has been explicitly setup to exclude any customizations made to Orchard which is a problem when pushing to a deployed website. It will also exclude any compiled dlls.

Can I ask why aren't you are changing things? It was a simple and elegant process and you're changing it to push complexity to the user.
Coordinator
Aug 12, 2013 at 12:29 AM
I don't think the git repo that you point Azure to can be the main Orchard repo: Kudu doesn't know how to compile a solution, does it? So it seems like the most automated you could achieve would be by having a CI server build from the core repo, into a "built" repo, and that's what you point Azure to.
Coordinator
Aug 12, 2013 at 12:31 AM
Edited Aug 12, 2013 at 12:31 AM
Oh, and we are not really changing things. Those were two different things, built for different purposes. The built repo is still there, it's just that we don't have the bandwidth to maintain it. If someone wants to take that over, in particular using a CI server like I described above, that would be great.
Aug 12, 2013 at 7:12 AM
Kudu (the Azure git deployment engine) is able to compile web projects:
https://github.com/projectkudu/kudu/wiki/Deployment

So any thoughts on how to make this work?
Coordinator
Aug 12, 2013 at 8:09 AM
Projects, yes, not solutions. I explained how to make it work.
Aug 12, 2013 at 10:48 AM
I'm just going to deploy from the built files in the zip. Using git was to simplify things, not make it more complicated.
Coordinator
Aug 12, 2013 at 10:22 PM
I will update the Kudu repository ASAP. It still makes sense even if we are on git now. It's a different distribution, with different settings.
I am sick right now so you will have to wait for tomorrow unfortunately.
Coordinator
Aug 12, 2013 at 10:29 PM
Thanks. Do you think it could be automated through the CI server so you don't have to manage this too much going forward?
Aug 15, 2013 at 1:49 PM
Edited Aug 15, 2013 at 1:49 PM
ooo, a kudu repo update would be awesome :) get well soon though seb,
Aug 28, 2013 at 6:48 PM
Just curious, what settings are different between a "normal" tree and the Kudu repository?
Coordinator
Aug 28, 2013 at 8:01 PM
It's not settings that are different, it's the contents: Kudu will need the web site only, not the whole source code.