Development and deployment

29 okt 2014, last update: 24 Jun 2017

Sitecore Development and Deployment setup

In this article we describe the tools you can use to add Sitecore items to version control systems like git, svn or TFS. And the tool for automatically deployment to Development, Test, QA, and Production Environments.

When developing on your local Sitecore you want probably versioning and backup your Templates, layout, and other Sitecore items, and synchronize the master and core database with the other developers on the project. There are multiple ways to setup your development workstation. Below I describe the best and most common setups.

Like every .Net project you can use a buildserver, TeamCity, Bamboo, Jenkins, TFS e.t.c. Specific for a Sitecore project you make a choose how to handle the Sitecore items. Serialization to disk is in most cases the preferred. And how to do a deployment create manual or automatically a package. Create a package with only Sitecore items or create a package which also contains the files you created. On an environment with separated Content Management and Content Delivery Servers you need a different deployment. On a CD server you don’t run a package with Sitecore items you only needs the files. The Sitecore database items will be published to the web databases which the CM servers use. It is not necessary to package the files into a Sitecore Package. For the files you can use a standard .NET Publish web tool, MSBuild, Octopus Deploy, or just copy manual the files.

Basically serialization is a standard feature of Sitecore if you don’t have the Serialize buttons in your CMS as an admin, go to the My Toolbar tab, push the Customize button and add the Serialize buttons. Or use this url: /sitecore/admin/serialization.aspx for Serialize and revert databases and Synchronize Sitecore databases with filesystem. The default location is a folder serialization in the Sitecore Data folder. sitecore 6 serializating items and whole database part 2

Best practice

  •  Put only your own files in version control. Don’t  turn whole Sitecore in.
  •  Serialize only your own items and in most cases you don’t need the items below the Content node in version control.

1 very simple development setup

Use one database server, All developers uses the same database. To recover a crash backup the SQL server database regularly.

2 simple development setup with serialization of items

Serialization the items using the default Sitecore Serialization or better use Sitecore Development Toolkit just do automatically serialization on save events and deserialize on startup. For Sitecore 6.4.1 and higher

  • Sitecore items in same version system as code
  • Automatically creating packages with Sitecore Courier based on the serialized items, possible to make an Incremental packages

3 Unicorn

Unicorn is a create serialization tool for Sitecore 6.5 rev.121009 and higher. Not working on older 6.5 revisions. In the configuration you choose which items and sub items must be automatically serialized. Deserialize can be done via the unicorn admin page.

  • Sitecore items in same version system as code
  • Automatically creating packages with Sitecore Courier based on the serialized items, possible to make an Incremental packages
  • Possible to use Unicorn for deployment instead of package

 4 TDS

Team Development for Sitecore from Hedgehog is a commercial serialization and package tool. With a Visual Studio plugin, you can do the synchronization inside visual studio. And create packages with files and items and separated Packages for CMS and CM.  Every developer need a license and update every year.

  • Sitecore items in same version system as code
  • Automatically creating packages based on the serialized items, possible to make incremental packages

Installing a Sitecore Package

Of course you can do manual upload and install a package. For Sitecore update packages Sitecore have a admin page /sitecore/admin/UpdateInstallationWizard.aspx not really usefully for automate the process. You can use the InstallPackages.aspx on https://github.com/adoprog/Sitecore-Deployment-Helpers. If you also want to upload te package than use Sitecore ship a lightweight tool to install Sitecore Update packages via HTTP requests.

Publish the Sitecore database items

You can use powershell or use my Parameter driven publish deployment tool

On automatically deployment or scripted Sitecore releases you would properly also do a scripted publish. Or maybe just publish to the one that is removed from the load balancer and wait until the publish is finished. With this publish module you can do that, just give your wishes in the querystring parameters of the url to the module. With a second script IsPublishTaskRunning.aspx you can poll and see when the publish is done.

https://marketplace.sitecore.net/Modules/Parameter_driven_publish_deployment_tool.aspx

 

Tools

Simple package installer script, publish and create extranet users for testing purpose
Sitecore Admin Scripts for Development and Deploying

The module allows for hosting PowerShell within the Sitecore Desktop environment. A powerful scripting tool for the Sitecore administrator
Sitecore PowerShell Extensions

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

This module automatically serializes all item changes into serialization folder on file system, and also asynchronously deserializes items while application starts.
Sitecore Development Toolkit

Unicorn is a utility for Sitecore that solves the issue of moving templates, renderings, and other database items between Sitecore instances.
Unicorn

Team Development for Sitecore (TDS) brings all of your Sitecore objects into Visual Studio. Imagine having all the benefits of a Source Control Management System fully integrated into your Sitecore Development environment. Now you are able to take advantage of the value Visual Studio Team System (VSTS), Subversion, or many other Source Code Management Systems offer to you on your Sitecore-based projects.
Team Development for Sitecore

Sitecore Package Deployer from Hedgehog it uses a Sitecore Job to automatically deploy .update packages from a file system folder on the Sitecore server. https://github.com/HedgehogDevelopment/SitecorePackageDeployer

Sitecore Courier analyzes differences between content trees in Sitecore and creates update packages automatically. This module can be integrated with your TFS or CC.net builds as well.
Sitecore Courier

Sitecore.Ship is a lightweight means to install Sitecore Update packages via HTTP requests.
Sitecore Ship

A publish tool for scripted Sitecore releases, parameter driven choose one or more webdatabases. And a tool for checking when the publish is done.
Parameter_driven_publish_deployment_tool

Small deployment helper pages for such things as: installing packages, publishing, etc (old and not updated)
https://github.com/adoprog/Sitecore-Deployment-Helpers Or see https://github.com/jbluemink/Sitecore-Admin-Scripts-for-Development-and-Deploying for updated and other tools.

Octopus Deploy, Octopus works with your build server to enable reliable, secure, automated releases of Sitecore ASP.NET applications into test, staging and production environments, whether they are in the cloud or on-premises.
https://octopus.com/

Razl from Hedgehog allows developers to have a complete side by side comparison between two Sitecore databases.
https://www.hhogdev.com/products/razl.aspx

Toolcore (Fortis Collections) is a set of easy to use APIs, services and executables. The main aim of these tools are to help enable automation of Sitecore processes in Continuous Integration and Delivery scenarios. Small tools for enabling remote update package installation and publishing.
http://fortis.ws/fortis-collection/toolcore/

Install Sitecore packages files command line. It support both the .zip and .update files.
https://github.com/VGBenjamin/PackageInstaller

Blogs

MSBuild Quick way to deploy web application to multiple environment.

Unicorn Auto deploy Sitecore items using Unicorn and TeamCity

TDS Continuous Integration & Deployment With Sitecore

TDS Automating Sitecore deployments with TFS and TDS

TDS Setting up a Sitecore solution part 2 TDS and build configurations

Setting Up a Sitecore Solution – Part 2 TDS and Build Configurations - See more at: http://jockstothecore.com/setting-up-a-sitecore-solution-part-2-tds-and-build-configurations/#sthash.OHxxJfMc.dpuf
Setting Up a Sitecore Solution – Part 2 TDS and Build Configurations - See more at: http://jockstothecore.com/setting-up-a-sitecore-solution-part-2-tds-and-build-configurations/#sthash.OHxxJfMc.dpuf

PowerShell with PowerCore extension Sitecore Continuos Deployment: From Zero to Hero

TDS and Octopus Setup a continuous integration for Sitecore with TDS - TFS 2013 and Octopus - Step 3: Configure octopus

PowerShell http://blog.najmanowicz.com/2014/11/03/update-to-state-of-knowledge-for-powershell-extensions-for-sitecore-november-2014

Overview of Tools http://cardinalcore.co.uk/2015/07/15/why-tfs-is-the-probably-the-worst-choice-for-sitecore/

Description of a a continuous integration & delivery process with TDS and Fortis Collection Toolcore http://goblinrockets.com/2015/11/15/update-2-continuous-integration-deployment-sitecore-publishing/

Continuous integration with Gulp and Sitecore powershell extensions and TeamCity part1 part2