How would I go about publishing Orchard.Core so I could deploy to a web host? - orchardcms

In Orchard 1.x, my setup was the following:
Cloned Orchard 1.x and kept it clean (unedited) and updated on my local repo.
Publish that clone of Orchard 1.x to another local repo that I would keep clean and update from the clone above as necessary.
Create multiple clones for different landlord/tenant sites of the Publish of Orchard 1.x, and set each up remotely in separate Bitbucket repositories. These would have staging/production branches.
The above is just a simplistic version of what I actually did.
With Orchard.Core, since it's currently in Beta 2 (or 3, I think), documentation is still being created. In some instances of documentation, I get the impression I can do a similar thing as the directions are to download the source and reference the appropriate NuGet packages. But I don't see much of anything specific about publish/deploy (except some information from blog posts from about a year ago - which is likely stale).
On the other hand, I see some blog posts mentioning that all you really need to do is reference the NuGet packages to run a site locally, but there is no further insight into the publish/deploy scenario. I can infer that maybe just publishing that might be sufficient, but I am not sure.
As it's still in beta, I have no intention of pushing Orchard.Core out on a live site. I just want to start preparing for when 2.0 arrives. I can test out locally whether or not what I did with Orchard 1.x will work with Orchard.Core, but I want to make sure I do it correctly. Just concerned I might be missing something.
Can anyone confirm the publish/deploy steps for Orchard.Core currently? Any insight is appreciated.

Yes, you can publish the application.
Then, if you are on Windows and want to host it on IIS, you will need install the .NET Core Framework and the ANCM (ASP.NET Core hosting module).
In IIS, create a site pointing to the publish folder, with an application pool with 'No Managed Code' for '.NET CLR version' and 'Integrated' for 'Managed Pipeline Mode'.

Related

How to build an external class library for use with a solution in a CI Pipeline in Azure DevOps?

I've requested to my Team Lead that we start integrating a CI/CD pipeline into most, if not all, of our projects. Our newest project relies heavily on our own, external class library that is referenced in the solution ; it is under "Dependencies" as a project reference.
The project runs fine when I build it in my machine using Visual Studio 2019, and before we needed to integrate an external library, it would build and release fine using our Azure DevOps pipelines.
However, with the addition of an external class library, when I try to run a build through Azure DevOps, I get the following error:
The project file ....csproj was not found.
I fully understand why it can't find it - because I need to pull in the external class library and build that first! There doesn't seem to be a lot of online material (not that I could find anyway!) that describes solutions to this other than "use nuget" ; unfortunately, it is a requirement from my Team Lead that this is not a route we go down - which has lead to a long couple of days!
With this in mind, I can't find another way to do this in Azure DevOps. I have looked into some sort of PowerShell command but to no avail thus far.
Has anyone run into this issue before with external class libraries in DevOps and can give me advice on the best way to approach it?
Generally speaking in 99,99% cases keeping a direct reference to the project is not a good idea. You can end up with really unmaintainable CI/CD logic and/or with dll versions mismatches during deployments. Actually I am an Architect in the project where I tried to fix that issue by migrating all dependencies to the NuGet server.
Azure Artifacts
You mentioned, that you are using Azure DevOps as main CI/CD tool, so this is a great opportunity to introduce Azure Artifacts as internal nuget server which is a part of Azure DevOps. For the first 2 GB it is free, here you have pricing details.
Alternatives
If for some reason you cant use Azure Artifacts, I recommend some alernatives:
MyGet
ProGet
Own nuget server
More information about alternatives you can find in this article.

How would I host deb packages?

I'm currently working on a github project mainly focused on windows users, written in Java. Install4j allows for easy .deb/.rpm etc. package conversion...
We could just ditribute the .deb on the download side, but when looking at gitlab a while ago, I saw, that Gitlab is using packagecloud.io as a hosting service for their packages (usingtheir own domain), so they can be updated using apt-get.
My question is, if there is a free service working just like packagecloud.io (not launchpad or similar with baazar and that advanced stuff) which can either be hosted on our own server or a public server. Or if there even is a downloadable version of packagecloud.io which we could use on our own server.
You can configure Travis CI to run extra commands when the build succeeds. You can put in some conditions, so that the deploy stage will only be run if commit happens to have a tag name. See the deployment documentation to get going.
A number of providers are officially supported, among which PackageCloud.io.
You might find the dpl utility useful, as it assists with writing and testing deployment settings.
Check out OpenRepo: https://github.com/openkilt/openrepo
I think this is what you're asking for. This is a package hosting server that can make packages available for both Debian (APT) and Red Hat (RPM) files.

Themes in Orchard hosted in Azure

I've been setting up Orchard 1.8 in an Azure Cloud Service. I've got it working, but I'm now confused as to how to use it.
Installing themes via the gallery fails silently. The devs say this is because Orchard on Azure doesn't support the theme gallery, and suggest adding new themes to the project and uploading a new package (https://orchard.codeplex.com/discussions/453688). Ignoring that this requires any designers that want to make minor CSS changes now need Visual Studio, access to the entire source code, and then wait through a 20 minute deploy, this just doesn't seem possible.
This post explains how the Azure emulator doesn't work with Orchard. So now I'm confused; what is the expected workflow for a brand new Orchard site hosted on Azure if I can't make changes to the site in production or staging but cannot run it locally either. I'm aware I could run it without the Azure emulator on regular IIS but that seems to be too far removed from the production environment to be a good test.
I was drawn to Orchard originally because it had great documentation and supports MVC Web API, but this seems so fundamental that now I'm not so sure. I feel like every time something goes wrong they'll always be doubt whether it's working as designed or if there is an Azure idiosyncrasy going on.
I'd love to hear from anyone who's had an Orchard site from scratch in Azure, I'm hoping I've just missed something simple with this.
Thanks,
Tom
You should never install modules or themes on a production server. Instead, install those on your dev machine, build the package and then deploy. If you don't want to deal with the heaviness of cloud services, don't use cloud services. Azure Web Sites are about a million times easier to use, and they work great. They allow for what you're asking for.

Setting up Umbraco project with nuget in vs 2012 error

I'm trying to set up a development project in vs 2012 with nuget and Umbraco. I am aware of the several recipe's, amongst the better Umbraco for beginners: Setup Umbraco on localhost together with VS 2012 and uSiteBuilder.
When I am using this procedure I install Umbraco with nuget and build it without problems, but when I hit F5 I get the same error continously: "Could not load type Umbraco.Web.UmbracoApplication" which global.asax inherits from!
What is wrong, what am I missing here...? Thanks in advance /Finn
A bit late, but I had the same problem and the reason for that are missing dll's. Referenced libraries weren't copied to bin folder.
It is not the best or easiest way of setting the project up.
Instead of creating a WebForm project, create an empty MVC4 project and then install the Umbraco CMS from NuGet. This way you won't have to remove anything. It will also by default use IIS Express, so there is no need to change the project properties.
You don't even have to use the NuGet console. You can use the package manager and just search for Umbraco.
Well it seems like an unprofessional oversight from my point! I just forgot to give security access to the relevant folders to network service.
You might have to build and clean the solution a couple of times if you get exposed to the YSOD error: "Cannot create/shadow copy 'filename' when that file already exists" when you hit F5! This error might occur if you hit F5 too quickly after a build, in this case asp.net is probably not finished with whatever it has to complete, and the file is locked.
#Digbyswift: I do not agree with you! Whether you set up your project as an MVC or Webforms application, it doesn't matter. What is important though, is that you use empty applications, as if you don't there will probably be some references/dependencies that you have to delete in order to get the application running! And default server will be the vs dev server, which in my opinion is by far the best and easiest to use untill you are ready to deploy your application. I agree thouhg that using the package-manager from visual studio is the easiest way to come around installing Umbraco.
Following these steps and hints you should use no more than a couple of minutes from installing Umbraco untill you have the wellcome screen and is ready to set up db etc...
Cheers Finn...

How to deploy with git the Orchard CMS and customs modules to Azure WebSite and Storage?

I have git repository with a custom module and many other modules linked (Contrib.Taxonomies [modified], Contrib.ImageField, DotLess, FeaturedItemSlider and other) and custom theme. It is merged with Orchard 1.5.x branch. Currently the module only works with Orchard 1.5.1. I hope to upgrade to Orchard 1.7. The module uses Nuget to get some packages. It uses .deployment:
[config]
project= src\Orchard.Web
I want to deploy to Azure WebSite and use Azure storage. I'd like to use git deployment of Azure WebSite.
How to do it correctly? I've been trying some help topics for some days and I get some errors every now and then. What are correct steps to do it?
It looks like I need to modify source code of Orchard.Azure so that it can be used in Azure WebSite.
Also if I deploy branch with all source code it takes about 900MB on Azure WebSite. If I deploy build\stage it takes about 300MB. So I tried to deploy separate repository (submodule of the first) but I failed to build it as it has nuget dependencies.
Thank you
Recently there have been new changes made to Orchard cms and it has new implementation for Azure services. It now requires to be merged with 1.x branch as this func seems to be released in 1.7.1. Also there are a set of new articles related to Azure-Orchard func: http://goo.gl/u5neLv and http://goo.gl/Lr5D9M and http://goo.gl/StvavC .

Resources