Top Banner
50

Continuous Delivery with Sitecore

May 08, 2015

Download

Technology

Every month, Sitecore brings together developers from across the North West to share learning's and discuss their experiences of working with the platform.

As Sitecore partners, we’ve been involved with plenty of these meet ups in the past, and so were pleased to not only host, but also present at, the latest user group event.

In July, Computerlovers’ Richard and Ben talked about what it’s like to work with Sitecore in an agile environment whilst adopting a continuous delivery approach.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Continuous Delivery with Sitecore
Page 2: Continuous Delivery with Sitecore
Page 3: Continuous Delivery with Sitecore
Page 4: Continuous Delivery with Sitecore

What is it ?

Why do we do it ?

How do we do it ?

Integrating with Sitecore ?

What’s next ?

Q & A

Page 5: Continuous Delivery with Sitecore
Page 6: Continuous Delivery with Sitecore
Page 7: Continuous Delivery with Sitecore

Test

Deploy

Promote Feedback

Implement

Build

Page 8: Continuous Delivery with Sitecore
Page 9: Continuous Delivery with Sitecore

Lots of good stuff out there

Recent User group presentation & blog posts

Lee Cook (Aqueduct) Continuous Delivery

Kern Herskind - Exploring Sitecore Item Serialisation

Alexander Doroshenko - Sitecore Continuous Deployment: From Zero to Hero

Page 10: Continuous Delivery with Sitecore
Page 11: Continuous Delivery with Sitecore
Page 12: Continuous Delivery with Sitecore

It fits with our Agile approach

Reduce Cycle time

Takes the pain out of releases

Automating the mundane leaves more time to innovate

Continuous Feedback leads to Continuous Improvement

Page 13: Continuous Delivery with Sitecore
Page 14: Continuous Delivery with Sitecore

2 week Sprint Cycle Deploy to UAT at the end of the sprint Automated Functional & Regression

Tests Client Approval Deploy to Production

Page 15: Continuous Delivery with Sitecore

Product Backlog

Sprint Backlog Release

Daily Scrum

Sprint (2 weeks)

Sprint review & Retrospective

Page 16: Continuous Delivery with Sitecore

Team City Build Server Solution built on every check-in Run Unit Tests Run Functional Tests Alert dev team on failure

Page 17: Continuous Delivery with Sitecore

Visual Studio, SlowCheetah, Config Transforms

NUnit SVN (Moving to Git) Team City Nant, Powershell, Psake, Powercore Sitecore Courier Octopus Deploy

Page 18: Continuous Delivery with Sitecore

Cucumber Capybara with Selenium 2 (webdriver)

and Poltergeist drivers Selenium grid 2 hub/nodes for

testing in parallel against both desktop and mobile browsers.

Page 19: Continuous Delivery with Sitecore
Page 20: Continuous Delivery with Sitecore

Code is the easy part Config transforms

Multiple environments Different Server Profiles (CA/CD)

Code reliant on templates/content items

Page 21: Continuous Delivery with Sitecore
Page 22: Continuous Delivery with Sitecore

Add Transforms to any xml file Preview Transformations Transforms run at build time Works with Octopus Deploy

Page 23: Continuous Delivery with Sitecore
Page 24: Continuous Delivery with Sitecore

Any config file will be merged at runtime – transform files will break Sitecore

3 Options: Maintain config per environment Manipulate with Powershell Single transformation file run against

all .config files in includes folder

Page 25: Continuous Delivery with Sitecore
Page 26: Continuous Delivery with Sitecore
Page 27: Continuous Delivery with Sitecore

Manually create and install packages Automate Package creation installation TDS Unicorn Courier – more on this later

Page 28: Continuous Delivery with Sitecore
Page 29: Continuous Delivery with Sitecore

Cruise Control Nant Build Scripts

packaged executable

Nant Deploy Script Custom config replacements per environment Manual Package creation

All templates and layouts Slow prone to errors

Page 30: Continuous Delivery with Sitecore

Team City Octopus Deploy Packages

Sitecore courier + custom pipeline Creates update packages delta changes Reduce package size Quicker to transfer Quicker to install Quicker to publish

Page 31: Continuous Delivery with Sitecore

Introduce internal QA environment Allows existing and new process to run in parallel Test deployment process Introduce more functional testing

Page 32: Continuous Delivery with Sitecore

• Build • Unit Tests • Smoke Tests

Dev

• Functional Regression Tests

• Client Approval

UAT • Release

Prod

4hrs

4hrs Total: 8hrs

Page 33: Continuous Delivery with Sitecore

• Build • Unit Tests

Dev

• Automated Functional Tests

• Smoke Tests

QA • External Functional / Regression Tests

• Client Approval

UAT

• Release

Prod

0hrs

1 hr

1hr

Total: 2hrs

Page 34: Continuous Delivery with Sitecore
Page 35: Continuous Delivery with Sitecore
Page 36: Continuous Delivery with Sitecore
Page 37: Continuous Delivery with Sitecore
Page 38: Continuous Delivery with Sitecore
Page 39: Continuous Delivery with Sitecore

Templates & Layouts serialised to disk automatically on save/move/delete Item’s checked into source control with code Build runner generates a differential package against release tag Update package included in the nuget package Deployed and installed as part of release to each environment Release tag updated after release to production Next sprints work differential against last release

Page 40: Continuous Delivery with Sitecore
Page 41: Continuous Delivery with Sitecore
Page 42: Continuous Delivery with Sitecore

Courier called using PSake via Runner. Build Parameters can be passed or use

defaults

Page 43: Continuous Delivery with Sitecore
Page 44: Continuous Delivery with Sitecore

Courier can install any item Templates, Layouts, System Items and Content Items

But should you? Risk of overwriting user content

Content packages created and installed manually Use defensive coding – If a sublayout requires a particular content item that

isn’t deployed then hide the component

Page 45: Continuous Delivery with Sitecore

Localised developer serialisation folders Committed to Subversion/Git Differential package generated using Courier and Serialisation tag

Sitecore Serialisation Issues

Path Length

Page 46: Continuous Delivery with Sitecore
Page 47: Continuous Delivery with Sitecore

Moved to Team City

Automated Deployment Steps through Octopus to QA

Deployment time down from 4hrs to approx 1hr

Per sprint saves approx 1 day developer effort.

Bolstered internal Testing Suite

Reduced Cycle Time for issue resolution

Page 48: Continuous Delivery with Sitecore

Git – Feature Branching

Automated deployments to Oxfam environments

Automatic load balancer switching – zero downtime

Increased flexibility to release

One click deployment

Page 49: Continuous Delivery with Sitecore
Page 50: Continuous Delivery with Sitecore

SDN (http://sdn.sitecore.net )

Team City (http://www.jetbrains.com/teamcity)

Octopus Deploy (http://octopusdeploy.com)

SlowCheetah (http://visualstudiogallery.msdn.microsoft.com/69023d00-a4f9-4a34-a6cd-7e854ba318b5)

Sitecore-PowerCore (https://github.com/adoprog/Sitecore-PowerCore)

Sitecore Courier (http://sitecorecourier.codeplex.com)

Sitecore Continuous Deployment: From Zero to Hero (http://sitecoresnippets.blogspot.co.uk/2013/05/sitecore-continuos-deployment-from-zero.html#.Ueahq_nVDzw)