Sitecore Ship installation and configuration to support Sitecore update package deployments (like TDS), in a CI/CD pipeline

Te following steps describe how to install and configure Sitecore.Ship in a Sitecore instance, on prem or Azure PaaS, to accept .update packages installation over an HTTP request.

After you have Sitecore.Ship configured you can automate package deployments in different ways, like in combination with Powershell in a CI/CD tool like Azure Devops, Octopus Deploy, etc.

NOTE: The step were tested on Sitecore 9.0.0 and 9.0.1.

Step-by-step guide

First download Sitecore.Ship.Aspnet nuget package and deploy its DLLs to the website/bin folder in your Sitecore instance

https://www.nuget.org/packages/Sitecore.Ship.AspNet/

Insert new section definition in the web.config

<section name="packageInstallation" type="Sitecore.Ship.Infrastructure.Configuration.PackageInstallationConfiguration, Sitecore.Ship.Infrastructure" />

Add the following handler at system.webServer/handlers

<remove name="Sitecore.Ship" />
<add name="Sitecore.Ship" verb="*" type="Sitecore.Ship.AspNet.SitecoreShipHttpHandler, Sitecore.Ship.AspNet" path="/services/*" />

Append this httpHandler at system.web/httpHandlers or the sections if doesn’t exist

<httpHandlers>
  <add verb="*" type="Sitecore.Ship.AspNet.SitecoreShipHttpHandler, Sitecore.Ship.AspNet" path="/services/*" />
</httpHandlers>

At the end of the web.config insert the Sitecore ship config section (here we can restrict access to the endpoint with a list of allowed IP addresses):

<packageInstallation enabled="true" allowRemote="false" allowPackageStreaming="false" recordInstallationHistory="false" />

Finally create a new config file inside the folder App_config/Include with the name ship.config, and the content as bellow (this is to tell sitecore to ignore request to /sitecore/* path)

<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
  <sitecore>
    <settings>
      <setting name="IgnoreUrlPrefixes" set:value="/services/|/sitecore/default.aspx|/trace.axd|/webresource.axd|/sitecore/shell/Controls/Rich Text Editor/Telerik.Web.UI.DialogHandler.aspx|/sitecore/shell/applications/content manager/telerik.web.ui.dialoghandler.aspx|/sitecore/shell/Controls/Rich Text Editor/Telerik.Web.UI.SpellCheckHandler.axd|/Telerik.Web.UI.WebResource.axd|/sitecore/admin/upgrade/|/layouts/testing" />
    </settings>
  </sitecore>
</configuration>

And that’s all!

For documentation on how to use Sitecore.Ship endpoints and parameters, follow this links:

https://sitecoreship.docs.apiary.io/

https://github.com/kevinobee/Sitecore.Ship

This is an example of how to send a publish request (smart publish) to Sitecore, and should be similar for uploading a package


Also published on Medium.

One response to “Sitecore Ship installation and configuration to support Sitecore update package deployments (like TDS), in a CI/CD pipeline

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.