GithubHelp home page GithubHelp logo

Comments (5)

cassidydotdk avatar cassidydotdk commented on July 2, 2024

I don't know why you would deploy Unicorn configs to a role that isn't Standalone or ContentManagement is the reverse question 🙃

Generally the error you describe only appears if you deploy Unicorn configs to servers configured for the CD server role only. And the clear recommendation is, that Unicorn has no business at all being deployed to public facing server instances.

That said, if for some reason, you want to continue deploying Unicorn to CD, you would need to change this site definition role requirement. A better solution would be to just delete the Unicorn config on CD.

from unicorn.

liquid-interactive-tech avatar liquid-interactive-tech commented on July 2, 2024

@cassidydotdk while I completely agree with your philosophy, the file in question, Unicorn.config, includes a comment at the top stating:

This file should be present on all environments Unicorn is present on. It is safe to leave on Content Delivery servers, as it changes no stock Sitecore configuration.

for this reason, the file should be corrected so that it can in fact, be safe to leave on Content Delivery servers

from unicorn.

cassidydotdk avatar cassidydotdk commented on July 2, 2024

Actually it's the comment that's in error :-)

from unicorn.

liquid-interactive-tech avatar liquid-interactive-tech commented on July 2, 2024

I strongly feel that it can be inferred that the philosophy that these Unicorn configuration files are intended to work in all environments out-of-the-box, based on the fact that other configuration files already include explicit "role:require" attributes, indicating that the intention is to compensate for every potential role, including ContentDelivery.

I feel that it would support future adopters better to simply add the role:require as my original post had recommended, keeping to the same mantra appearing throughout the rest of the files. The expectation that developers would need to modify the base module out-of-the-box to prevent a 500 error in a common scenario seems undesirable.

from unicorn.

cassidydotdk avatar cassidydotdk commented on July 2, 2024

The philosophy of the Unicorn.config file is, that - like the product itself - it should work on Sitecore versions at least 8.0 through to today. role:require is not available prior to 9.x or so, I forget exactly when it was introduced by Sitecore.

There is not and has never been a "hands-off" approach to these configuration files. Some amount of tinkering was always required, whether it was to enable/disable certain files, remove certain files from deployment to specific environments, disabling the dataprovider for anything not local dev, and so on.

This file should be removed on content delivery environments.

This file should be removed in ANY deployed instance (CE or CD) that does not act as a source for serialized item updates.

This file should be removed when deploying to Content Delivery environments to remove all Unicorn UI elements, which are not needed in CD.

The fact that the top comment is misleading in Unicorn.config is an oversight from when the unicorn site was introduced.

There are various ways people in the community goes about handling their setups. Here are a few.

You could also add a config file of your own, if you're uncomfortable modifying the supplied files. Using a patch:delete to remove the unicorn <site> definition and insert your own with whatever role:require you like.

from unicorn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.