Updating Sitecore 9 with Helix to 9.0 update 1 (rev. 171219)
I am currently developing a greenfield Helix-based solution on Sitecore 9. That is a challenging but thrilling path, resulting in nicely setup working platform with "one-click install + one click deploy" process, perfectly suitable for continuous integration.
However, as soon as 9.0 update 1 has been released, I started anticipating upgrading my solution to that revision, but for a week or so we've been missing NuGet packages for the latest version. Since January 18-th they have been released so finally it became possible to update the solution. Below there are few things I have done to make it work.
Phase 1. Choosing an update approach to take.
There are few options:
- *.update file with actual version
- upgrade zip archive with only changes + pdf guidance on how to update
- SIF archive with CMS, xConnect and corresponding configuration *.json files
For sanity purposes, I prefer to fully uninstall the previous version and reinstall the updated afterwards, rather than overwrite things. Thanks to a flexibility of Helix, now developer should not worry about losing an existing state, as soon as everything is checked into a version control system - gulp script will pick the latest changes and do that job for us. That's why approach number 3 becomes a choice.
As I am keeping web folder under source control (just clean install of each version in order to easily restore that state) it makes sense to move .git folder outside from web folder before we go with uninstall, as it obviously will remove entire web folder. After as we remove the previous version, and newer version settles there, one can return .git folder back and immediately benefit from seeing the difference between two versions. I will cover that below during stage 2. So, to uninstall, open PowerShell and do:
.\uninstall-xp0.ps1
Once complete, got to the next phase.
Phase 2. Preparing and installing new version
First of all, download Sitecore 9.0 Update 1 XPSingle from SDN download page. Since we're doing that for our development environment, make sure you get OnPrem edition, rather than Cloud.
Obviously, to install newer version one need to update Sitecore Install Framework that supports particular version. Luckily, Sitecore Installer knows everything it should regarding how to install the version. PowerShell (with admin rights):
Update-Module SitecoreInstallFramework
If for some reason it breaks with execution policy exception, modify current user appropriate permissions:
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
Copy Sitecore packages for both CMS and Xconnet into build/assets folder, along with previous version packages. In my case, these files:
Sitecore 9.0.1 rev. 171219 (OnPrem)_single.scwdp.zip and Sitecore 9.0.1 rev. 171219 (OnPrem)_xp0xconnect.scwdp.zip
and also replace *.json scripts from XP0 Configuration files 9.0.1 rev. 171219.zip
Then, quite important, update version details at settings.ps1 script:
$SitecoreVersion = "9.0.1 rev. 171219" $InstallerVersion = "1.1.0"
install-xp0.ps1and wait till it finishes. Warning: do not open Sitecore after it installs.
Autofixture 3.51.0BuildWebCompiler 1.11.375EnterpriseLibrary.* 6.0.1304FluentAssertions 4.19.4GlassMapper 4.5.0.4HtmlAgilityPack 1.4.9.5Kamsar.WebConsole 2.0.0Lucene.Net 3.0.3MicroCHAP 1.2.2.2Moq 4.8.1Mvp.Xml 2.3.0netDumbster 2.0.0.1Newtonsoft.Json 9.0.1NSubstitute 3.1.0Rainbow.* 2.0.0SharpZipLib 0.86.0Sitecore.FakeDb.* 1.7.2Unicorn.* 4.0.3xunit 2.3.1
Microsoft.Extensions.DependencyInjection 1.0.0System.Reflection 4.1.0Newtonsoft.Json 9.0.1HtmlAgilityPack 1.4.9.5System.Net.Http 4.0.0Castle.Core 3.3.3





