Thursday 22 August 2019

Sitecore Commerce: DevOps Tasks Trigger from Sitecore Experience Platform


I have recently started playing and learning Sitecore Commerce. There are few tasks like configuration and administration of Sitecore commerce is needed, there is a special role DevOps associated to perform those tasks.

The DevOps role is an instance of the Commerce Engine that is internal and only available to DevOps personnel. This role can be assigned higher privileges allowing DevOps personnel to perform maintenance tasks that are not permitted to other roles (for example, bootstrapping and environment initialization functions). Sitecore has given lots of  OOTB Postman Collections.  Which is really good for extending pipeline and Pipeline blocks.

I found that it can be painful when you need to run a task very quickly and efficiently on production. There is a possibility to make a mistake in request and it will be time-consuming too.

Sitecore Commerce requires the Sitecore PowerShell module, SXA, and SXA storefront(if you are using it.) So I thought it is better to trigger a few tasks like  Bootstrapping, Rebuild index tasks, Purge tasks, Minion Task(Pending order task, Release order task, Waiting for order task, etc ) from Sitecore directly. This package provides a Sitecore package with PowerShell script.

Note: This module tested on Sitecore 9.1 update 1 released with Sitecore Commerce 9.1 and Powershell 5.0 

There are a few steps to perform

1.  Install-Package (do not install on production without testing to local/dev/test environment)

How to Use it

1. After installing Package go to "/sitecore/system/Modules/PowerShell/Script Library/Commerce DevOps/Commerce DevOps Settings"

And update setting as per your need.


2. Create a new user based on "Sitecore\Commerce Dev  Ops" role
3. Log in with a new user 
4. You can see a new area in a control panel 

5. To Bootstrap environment Click on "Bootstrap Commerce Environment," It will challenge you to enter a password (if you set default password in setting item it will appear if you have not set up default it will be blank).

6. To Run Minon Click on Minion Tasks.  It will give a drop-down list of tasks to select one.


7. You can see task run successfully or not, To see the result  click on "View Script result"


Happy Commercing !!