Sunday 22 May 2022

Sitecore Publishing Service - Quick Guide

Sitecore Publishing Service

The Sitecore Publishing Service (SPS) module integrates with the opt-in Publishing Service, supporting high-performance publishing in large-scale Sitecore setups. The Publishing Service module is an optional replacement for the existing Sitecore publishing methods. This module increases publishing throughput, reduces the amount of time spent publishing large volumes of items, and offers greater data consistency and reliability. The module also improves the user experience and provides better visual feedback to the user on the state of the publishing system.


Publishing Module

The Sitecore Publishing Module is distributed as a standard Sitecore package.

Installation Guide.

Check Compatibility Table for SPS: Sitecore Publishing Service – compatibility tables

I am installing Sitecore Publishing Service 4.3.0 for Sitecore 9.3 version.

Download these two zip files.

  1. Sitecore Publishing Service: Sitecore Publishing Service
  2. Sitecore Publishing Service Module: Sitecore Publishing Service Module
The SPS module comes in 2 parts. The hosting service and the Sitecore package.

Manual Installation

  1. Extract the Sitecore Publishing Service to a folder of your choice. For example: C:\inetpub\wwwroot\sitecorepublishing
  2. In IIS, create a new site pointing to the folder 
  3. Start the IIS Manager and in the Connections panel, expand Sites. Right-click Sites and then click Add Website.
  4. In the Add Website dialog, fill in the required fields


  5. In the IIS Manager, right-click the application pool for the website that you created, and then click Basic Settings.
  6. In the Edit Application Pool dialog, in the .NET CLR version field, select No Managed 
    Code.

    Add in your host file the domain along with the respective IP address as follows:

    127.0.0.1   sitecorepublishing

You need to update the connection strings of the Sitecore Instance you want to use. For example, I have a Sitecore instance name sc931. So, I go to the website/App_Config folder and edit the ConnectionStrings.config by adding the attribute ‘MultipleActiveResultSets=True’ to the Core, Master, and Web databases.

Core

connectionString=”user id={userId};password={Password};Data Source={Datasource};Database=sc931_Core;MultipleActiveResultSets=True;“

Master

connectionString=”user id={userId};password={Password};Data Source={Datasource};Database=sc931_Master;MultipleActiveResultSets=True;“

Web

connectionString=”user id={userId};password={Password};Data Source={Datasource};Database=sc931_Web;MultipleActiveResultSets=True;“


Once this is completed, we need to make the Host Service access the database of the Sitecore Instance. Go to path C:\inetpub\wwwroot\sitecorepublishing\config\global and create a file name sc.connectionstring.xml and paste the following connections in it. 


The above connection string will allow the Host service to get access to the databases of the Sitecore Instance. When upgrading the database schema. Please see the following steps for the creation and up-gradation of the databases:

  1. Open the Command Prompt with Admin rights.
  2. Navigate to the directory of the publishing host service.Example: cd  C:\inetpub\wwwroot\sitecorepublishing
  3. Run the command
    Sitecore.Framework.Publishing.Host.exe schema list
    Sitecore.Framework.Publishing.Host.exe schema upgrade --force
To see if the Host Service has been installed and configured correctly, go to the following URL http://{site url}/api/publishing/operations/status and we need to have a response of {“status”:0}. If you receive any other value, check the application logs for further details. All logs files are here C:\inetpub\wwwroot\sitecorepublishing\logs.

Note: If you are not able to see any logs file then go to web.config file and change the value of "stdoutLogEnabled" to "True".
<aspNetCore processPath=".\Sitecore.Framework.Publishing.Host.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" />


The configuration of the Host Service has been completed. Now Install the Sitecore Publishing Service module on your Sitecore Instance. Once this is installed, from the Launchpad you will see the Publishing Icon. But before clicking on the Publishing Icon, you need to specify the link between the Host Service and the Publishing Module. To do so, create a new configuration file and name it z.PublishingService.config. In the config file, paste the setting for the link as shown below:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
    <sitecore>
        <settings>
            <setting name="PublishingService.UrlRoot" value="http://sitecorepublishing/"></setting>
            </settings>
        </sitecore>
</configuration>

Place the configuration file to the path ‘Website/App_Config/Include/‘. Reload your Sitecore Instance and click on the publishing icon to navigate to the Publishing Dashboard.


This is the Publishing Dashboard, where you see the Active, Queued, and Recent Jobs.







No comments:

Post a Comment

Sitecore Publishing Service 7.0 Installation Guide

  About the Publishing Service module The Publishing Service module is an optional replacement for the existing Sitecore publishing methods....