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.
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.
Key Settings:-
- Roles – Content Management and Content Delivery (i.e deploy code to all servers)
- Package Feed – The external feed added previously to the TeamCity Build server
- 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.
- Install to – Root of Website directory configured in IIS.
- 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.
Key Settings:-
- Roles – Content Management only the Content Management server requires the update package.
- Package Feed – The external feed added previously to the TeamCity Build server
- Package ID – Name of the TDS NuGet package to deploy.
Install the .update package into Sitecore using Sitecore.Ship, Curl and PowerShell.
Key Settings:-
- Roles – _Content Managemen_t only the Content Management server requires the update package.
- Run on – Set to deployment target means PowerShell script will be executed on the Octopus tentacle.
- 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.
Key Settings:- {#Install&ConfigureOctopusDeploy-KeySettings:-.2}
- Roles – Content Management only need to execute the publish on the Content Management server.
- Run on – Set to deployment target means PowerShell script will be executed on the Octopus tentacle.
- 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!