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

Image for post
Image for post

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.

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

Insert new section definition in the web.config

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

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/*" />
Image for post
Image for post

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>
Image for post
Image for post

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" />
Image for post
Image for post

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>
Image for post
Image for post

And that’s all!

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

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

Image for post
Image for post

Originally published at Raul Ruiz’s Blog.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store