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.

Deploy Site Code Octopus Settings

 

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 Management 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 – https://curl.haxx.se/download.html

 

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

 

Site Publish

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Key Settings:-

  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!

6 thoughts on “Continuous Delivery with Sitecore, TDS, Git, Team City, Octopus and Sitecore Ship Part 2

  1. You are a genious! I have been looking about ways to prevent timeouts. Your post gave me the answer:curl!!

    I am currently using sitecore courrier to create my update package. I created a package installer using the DiffInstaller and gave it a parameter called mode(0 for InstallMode.Install and 1 for InstallMode.Update) install will overwrite all items while update will only insert non existent items.

    Disabling indexing is a fast way to install packages over http as it will not analyze package entries. SitecoreShip has this indexing option. Many thanks for this post!!!

  2. On the step where you “Deploy the NuGet package containing the .update file of your TDS items” are you using a custom install directory? I don’t see my .update package in the C:\Octopus\Applications\$environment path. I see a folder called \bin\Package_OctopusQA which has an .update package when I build the solution, but I don’t see that in the NuGet package that gets generated by TDS.

    I’d appreciate any guidance you can provide.

    1. Hi,

      Sorry for the delay picking this up.

      The folder should exist on your deployment target, for the TDS packages your Content Management server should contain this path.

      1. No problem. Thanks for the follow-up. I realized I missed a step and forgot to create a .nuspec file to package up the .update file from TDS. Thanks for both of the blog posts. I really appreciate the guidance in setting up our configuration.

        Justin

Leave a Reply

Your email address will not be published. Required fields are marked *

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