Continuous Delivery with Sitecore, TDS, Git, Team City, Octopus and Sitecore Ship Part 2

Continuous Delivery with Sitecore Part 2 – Octopus Deploy Setup

 

In Part 2 I’ll walk through the Octopus Deploy configuration where we use PowerShell, Sitecore.Ship and Curl to install the Team Development for Sitecore Packages and publish the changes, if you are looking for the TeamCity configuration see Part 1

 

Configure Octopus to be able to read the NuGet feed from TeamCity.

 

Nuget-Feed

See the TeamCity documentation for more details on how to set up TeamCity as a NuGet server and to get your URL.

 

Deploy the Sitecore code created by OctoPack in the Build Solution step on TeamCity.

DeploySiteCode-1

 

Key Settings:-

  1. Roles – Content Management and Content Delivery (i.e deploy code to all servers)
  2. Package Feed – The external feed added previously to the TeamCity Build server
  3. Package ID – Name of the code package to deploy. You can search the TeamCity feed in Octopus by going to Library -> External Feeds. Click the test button next to the feed you created.
  4. Install to – Root of Website directory configured in IIS.
  5. Target Files – List of files for Octopus to parse and replace with configured Octopus variables.

 

Deploy the NuGet package containing the .update file of your TDS items.

Deploy-TDS-Package

 

Key Settings:-

  1. Roles – Content Management only the Content Management server requires the update package.
  2. Package Feed – The external feed added previously to the TeamCity Build server
  3. Package ID – Name of the TDS NuGet package to deploy.

 

Install the .update package into Sitecore using Sitecore.Ship, Curl and PowerShell.

 

Install-TDS-UpdatePacakge

 

Key Settings:-

  1. Roles – _Content Managemen_t only the Content Management server requires the update package.
  2. Run on – Set to deployment target means PowerShell script will be executed on the Octopus tentacle.
  3. Script Type – PowerShell

 

Note – Each Server where you wish to execute this script will need Curl installed – <a href="https://curl.haxx.se/download.html" target="blank">https://curl.haxx.se/download.html_

 

Run a Publish in Sitecore using Sitecore.Ship, Curl and PowerShell.

 

Site-Publish

 

Key Settings:- {#Install&ConfigureOctopusDeploy-KeySettings:-.2}

  1. Roles – Content Management only need to execute the publish on the Content Management server.
  2. Run on – Set to deployment target means PowerShell script will be executed on the Octopus tentacle.
  3. Script Type – PowerShell

Note – Each Server where you wish to execute this script will need Curl installed – https://curl.haxx.se/download.html

 

With the steps from this post and Part 1 you will have a build process in place that will take your code, build it, run the unit tests, create the required NuGet packages and deploy them to the appropriate server roles, install the .update package and publish the changes. Happy Deployments!