Monday, June 25, 2018

Sitecore Publishing Server and Sitecore Publishing Service

       Install.Net Core https://www.microsoft.com/net/download/windows

2     Install Windows Server Hosting

      Download Sitecore Publishing Service 2.2.0 rev. 171220 from https://dev.sitecore.net/Downloads/Sitecore_Publishing_Service.aspx

3.      Extract the Downloaded Sitecore Publishing Service inside the wwwroot directory
C:\inetpub\wwwroot\PublishingService
4.   Once extracted, open the Internet Information Services (IIS) to setup the site. Follow the below steps to create and configure the host service:
1.      Right click on the Sites to add a new website.
2.      Fill in the different fields from the opened popup.
Now, go to the Application Pools. Right click on your new created site app pool and select the Basic Settings to update the .NET CLR version to No Managed Code.
Add in your host file the domain along with the respective IP address. Mine is as follows:
127.0.0.1    local.publishingservice.com
5.            You need to update the connection strings of the Sitecore Instance you want to use.
Example, I have a Sitecore instance name MyWebsite. 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= MyWebsiteSitecore_Core;MultipleActiveResultSets=True;“
Master
connectionString=”user id={userId};password={Password};Data Source={Datasource};Database= MyWebsiteSitecore_Master;MultipleActiveResultSets=True;“
Web
connectionString=”user id={userId};password={Password};Data Source={Datasource};Database= MyWebsiteSitecore_Web;MultipleActiveResultSets=True;“

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

{
"Sitecore":{
               "Publishing":{
                              "ConnectionStrings":{
                                             "core": "Data Source=.\\SQLEXPRESS;Initial Catalog=MyWebsiteSitecore_Core;Integrated Security=False;User ID={userId};;Password={Password};;MultipleActiveResultSets=True",
                                             "master": "Data Source=.\\SQLEXPRESS;Initial Catalog=MyWebsiteSitecore_Master;Integrated Security=False;User ID={userId};;Password={Password};;MultipleActiveResultSets=True",
                                             "web": "Data Source=.\\SQLEXPRESS;Initial Catalog=MyWebsiteSitecore_Web;Integrated Security=False;User ID={userId};Password={Password};;MultipleActiveResultSets=True"
                                             }
                              }
               }
}

6.      The connection string will allow the Host service to gain access to the databases of the Sitecore Instance. When the schematool.exe has run, it will upgrade and also install the databases. Please see below steps to create and upgrade the databases:
6.1             Open the Command Prompt with Admin rights.
6.2             Navigate to the directory of the publishing host service. Example: cd C:\inetpub\wwwroot\PublishingService
6.3             Run the commands.
1.      .\Sitecore.Framework.Publishing.Host
2.      .\Sitecore.Framework.Publishing.Host.exe schema list
3.      .\Sitecore.Framework.Publishing.Host.exe schema upgrade –force
4.      .\Sitecore.Framework.Publishing.Host.exe schema list
5.      .\Sitecore.Framework.Publishing.Host.exe –environment development


7.      run the following in the browser http://{site url}/api/publishing/operations/status

and you need to have a response of {“status”:0}


8.    The configuration of the Host Service has completed. 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 link as shown below:

http://{your site url here}/




9.      Place the configuration file to the path ‘Website/App_Config/Include/‘.
10.   Reload your Sitecore Instance.
11.   Click on the publishing icon to navigate to the Publishing Dashboard.
12.   If no errors are shown, then the module has been installed properly. This module will now override the default publishing manager.                                  
                                            

2 comments: