0

I'm playing around with Unicorn and Transparent Sync. I've found it is pretty awesome, but I had some questions on best practices.

  1. Getting mixed signals for production use. I like the idea of templates/renderings being file deploys instead of having to run a separate sync or powershell command.
  2. Is there any way to publish automatically to the 'web' DB? I know it can on sync operations, but obviously with Transparent Sync enabled, those events do not get triggered (unless I'm missing something).

I've looked to find these answers, but I assume I just must be missing it.

2 Answers 2

1

The problem that you have with Transparent sync in production is that the file system becomes the source of record for your data. This is an issue because it bypasses functionality in Sitecore related to syncing.

From Kam;'s article http://kamsar.net/index.php/2015/10/Unicorn-Introducing-Transparent-Sync/

Because Transparent Sync bypasses the normal sync process, transparent sync also bypasses anything that is hooked to sync. This would include things like custom evaluators (like NewItemsOnlyEvaluator) and the sync event pipelines. If you are relying on these customizations, turn transparent sync off for the configurations that use them.

Transparent Sync is great for development because as soon as you pull your update from source control, its automatically synced into your dev environment.

Currently when I use Unicorn in production, I turn off the Unicorn data providers, forcing me to use /Unicorn.aspx and syncing the deployment to Sitecore. I do this with a transformation to my Unicorn.config release file.

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <sitecore>
    <dataProviders xdt:Transform="RemoveAll">

    </dataProviders>
    <databases xdt:Transform="RemoveAll">

    </databases>
  </sitecore>
</configuration>
0

Getting mixed signals for production use. I like the idea of templates/renderings being file deploys instead of having to run a separate sync or powershell command.

Can you clarify what you mean? In general, you always have to trigger external task somehow, it will be either gulp or powershell script.

Of course, it is possible to create a sitecore scheduled task to check if files were updated and run the Unicorn sync, but I don't think that it is good idea for production server.

Is there any way to publish automatically to the 'web' DB? I know it can on sync operations, but obviously with Transparent Sync enabled, those events do not get triggered (unless I'm missing something).

  • You need to create a custom web service (either asmx or mvc route, etc) on the sitecore side that will trigger the publish and a customized task to trigger this service after the deployment/unicorn sync is done
  • Or you can use Sitecore publish agent
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.