Tagged: Sidekick

Automate Sitecore Content Synchronization using Sidekick PowerShell

  
Sitecore-Content-Sidekick-Powershell.png

I wanted to set up a daily Sitecore content synchronization to lower environments to ensure they are updated with the latest content from Production every morning.

The Sitecore Sidekick PowerShell module came to the rescue – Thank you Jeff Darchuk for the excellent module! One of its key advantages is that it eliminates the need to pass usernames or passwords for higher environments. 

https://github.com/JeffDarchuk/SitecoreSidekick?tab=readme-ov-file#scripting-sidekick

Installation:

Simply copy the Sidekick folder from the URL below and paste it into your PowerShell Modules on a Windows machine.

https://github.com/JeffDarchuk/SitecoreSidekick/tree/master/Scripting

Basically, it should reside in one of the paths found under $env:PSModulePath

Example: C:\Users\[USER]\Documents\WindowsPowerShell\Modules\SitecoreSidekick

P.S. I hope you have the Sidekick module installed, it needs a SharedSecret to communicate to the higher environments.

Content Sync:

After successfully installing the Sidekick PowerShell module, I created the following script to sync the Home page and its children from the Production environment to the QA environment.

 

Similarly, I created the following script for the Data folder on the SXA site, excluding the Sitewide Configuration item.

Scheduling:

With the scripts ready, I have scheduled both using Powershell Scripts Command to run every 12 hours to fetch items.

Sitecore-Sidekick-Content-Sync-Powershell.png

 

Sitecore-Sidekick-Content-Sync-Powershell-2.png

Hope this helps.

Happy Sitecoring!

0

Sitecore Sidekick Installation and Setup

Blog-Sitecore-Sidekick-Install-Setup.png

 

 

 

 

 

 

 

 

 

 

 

 

 

While working on a Sitecore 10.2.1 XM project, we relied on packaging content from upper environments or restoring the database to pull content locally, which was quite time-consuming.

The Sitecore Sidekick module (a big thanks to Jeff Darchuk) was a lifesaver for quickly pulling content into local or lower environments.

The latest Sidekick version is 1.7 and I was wondering which version will be compatible with Sitecore 10.2.1 and realized it doesn’t matter! 

Installation 

In NuGet, install the following modules in one of the Foundation projects or create a new helix module.

  • SitecoreSidekickFoundation
  • SitecoreSidekickContentMigrator
  • SitecoreSidekickCore
  • SitecoreSidekickAuditLog
  • SitecoreSidekickEditingContext

Sitecore-sidekick-install-download-content-migration-1.png

Note: You can skip AuditLog and EditingContext if don’t want it.

After installation, you will see the following DLLs in the bin folder

Sitecore-sidekick-install-download-content-migration-2.png

Configuration

  • Create a folder Sidekick under App_Config/Include in the Foundation layer.
  • Add the following Config files as it is, no changes are needed.

Sitecore-sidekick-install-download-content-migration-3.png

AuthenticationSecret – Generate a random GUID

Server List

<server desc="QA">https://[your_qa_cm_url]</server>

<server desc="QA">https://[your_qa_cm_url]</server>

<server desc="QA">https://[your_qa_cm_url]</server>

 

Publish the solution, now you will see Side Sidekick added to the menu bar!

Sitecore-sidekick-install-download-content-migration-4.png

Sitecore-sidekick-install-download-content-migration-5.png

 

Content Migrator

It is ready to pull content (make sure it’s deployed to higher environments)

Sitecore-sidekick-install-download-content-migration-6.png

 

Audit Log 

It’s quite helpful to review all content changes in graphic and detailed mode.

Sitecore-sidekick-install-download-content-migration-7.png

Sitecore-sidekick-install-download-content-migration-8-1.png

 

Editing Context

Quickly edit content without switching between databases using Editing Context.

Sitecore-sidekick-install-download-content-migration-9.png

References

  • https://jeffdarchuk.com/2016/10/24/sitecore-sidekick-content-migrator/
  • https://kamsar.net/index.php/category/Unicorn/

Hope this helps.

Happy Sitecoring!

1

Sitecore Sidekick – Upgrade

I was working on a Sitecore 9.0.2 client project and the Sitecore Sidekick(1.4.4 version) was already installed. When I tried to initiate the Sidekick and it was throwing an error –

Method not found: Void Rainbow.Storage.IDataStore.Save(Rainbow.Model.IItemData) SitecoreSidekick.Shared.IoC.Container.Resolve(Object[] args) +776
ScsContentMigrator.Core.ContentItemInstaller..ctor() +313
ScsContentMigrator.&lt;&gt;c.&lt;InitializeContainer&gt;b__5_4(Object[] args) +31
SitecoreSidekick.Shared.IoC.Container.Resolve(Object[] args) +117

While researching the error, came to know that I need to update Rainbow and Unicorn (If you use Unicorn in your project to serialize items make sure you install the No Rainbow package as this will not overwrite Unicorn’s Rainbow DLL files but rather utilize whatever version Unicorn is using (Sidekick can work with any version). You can skip if your project doesn’t use it) packages as it wasn’t compatible with the versions that were installed.

I was wondering what version of these packages(SideKick, Rainbow, and Unicorn) will be compatible with Sitecore 9.0.2 and realized it doesn’t matter! 

So decided to update the Sidekick(it automatically updates Rainbow) and Unicorn with the latest version via NuGet. Make sure to update all installed Sidekick packages to up-to-date. In my case, I updated the below ones – 

  • SitecoreSidekickFoundation
  • SitecoreSidekickContentMigrator
  • SitecoreSidekickCore
  • SitecoreSidekickAuditLog
  • SitecoreSidekickEditingContext

It automatically updated all the dependencies like below

Now updating Unicorn(Skip if your project doesn’t use it for serialization)  

All packages and it’s dependencies were successfully installed and deployed to QA and UAT environments(it needs to be deployed to the servers in order to make the contract) and the Sidekick started working.

Now we were able to pull content from any environment!

Installing via Sitecore Package

It is not recommended, If you like to install it in environments directly without check-in to source control, you can install it as a package. Download the latest package at the root of the repo.

References

  • https://jeffdarchuk.com/2016/10/24/sitecore-sidekick-content-migrator/
  • https://kamsar.net/index.php/category/Unicorn/

Hope this helps someone. 

Happy Sitecoring!

 

0