Sitecore 9 has recently been released, and many things have changed, including the way you install it in your local machine for development. The Sitecore Install Framework is a very flexible tool that automates the installation and configuration of a Sitecore instance in any of the supported environments (XM1, XP0, XP1, Cloud XM1, Cloud XP1). The following guide will focus on a local XP0 development environment (Sitecore with xDB and xConnect).
[Update: Some of these steps have been improved in the general release.]
This guide is intended for development environments based on Microsoft Windows 10. We will be using the New-SelfSignedCertificate enhanced command that is included with Windows 10 to generate the certificates for Sitecore, Solr and xConnect. Remember that these certificates are self-signed, and not intended for a Production or public-facing environment. The additional tools you will need in your machine are:
- Microsoft Visual Studio 2015 or later, with the latest updates installed.
- .NET Framework 4.6.2
- SQL Server 2014 or later. If using SQL Server for xDB, make sure you have version 2016 SP1.
- Apache Solr 6.6.0 with SSL enabled. We have a post that guides you on how to install a Solr instance with an SSL certificate for secure connections (https), so please check it out before proceeding.
- IIS with the following add-ons installed using Web Platform Installer (WebPI):
- Web Deploy 3.6 for Hosting Servers
- Microsoft SQL Server Data-Tier Application Framework (DACFx)
If using SQL Server 2016 SP1 for xDB, set the contained database authentication in SQL Server by running this SQL script:
Contained database authentication
sp_configure'contained database authentication', 1; GO RECONFIGURE; GO
Sitecore 9 REQUIRES that everything is secured using SSL certificates, even in local development environments. Unless you or your team has paid for certificates to use in your machine, most developers need to generate their own self-signed certificates. You can check our guide on how to use the New-SelfSignedCertificate PowerShell command, and generate one certificate for your Sitecore development site. You will need a certificate also for your local Solr instance, for this please refer to our Apache Solr with SSL guide. Finally, you will need a special certificate for xConnect. Follow these steps to create this certificate:
Open a PowerShell window in Administrator mode and enter:
New-SelfSignedCertificate -CertStoreLocation cert:\LocalMachine\My -Subject "<YOUR-COMPUTER-NAME>" -FriendlyName "xConnectCert" -KeyExportPolicy Exportable -KeyProtection None -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter (Get-Date).AddYears(10)
In the response of this command, make sure to copy the Thumbprint of the new certificate. You will need it for the installation process.
- Open the “Manage computer certificates” admin panel in Windows, and locate the certificate under Personal/Certificates
- Copy the certificate to Trusted Root Certification Authorities/Certificates
Sitecore 9 Installation
Install the Sitecore Install Framework. In the distribution ZIP file, locate the SitecoreInstallFramework x.x.x rev xxxxx.zip file, and unzip it under
C:\Program Files\WindowsPowerShell\Modules\SitecoreInstallFramework. Validate the install by starting a PowerShell session in admin mode, and execute:
Get-Module SitecoreInstallFramework -ListAvailable
From the distribution ZIP file, locate the Sitecore WDP OnPrem XP0 packages ZIP file, usually located under Software/Sitecore Experience Platform
Extract the contents of the file to your source installation folder (for this example, C:\Projects\Sitecore9)
From the distribution ZIP file, locate the deployment configurations ZIP under
Deployment/On-premise deployment - Sitecore Install Framework/Configurations
In the configurations ZIP, extract to the source installation folder. Refer to documentation for details, but for XP0 locate and extract the following configurations:
- Make sure you have a valid license.xml, and copy it to the source installation folder.
- Edit the JSON files with your installation information. Add default values to parameters if needed to avoid entering those values during the install process.
In the source installation folder, you will want to execute first the Solr configurations, and after the configurations for Sitecore and xConnect:
Invoke-SitecoreInstall -Path .\sitecore-solr.json Invoke-SitecoreInstall -Path .\xconnect-solr.json Invoke-SitecoreInstall -Path .\sitecore-XP0.json Invoke-SitecoreInstall -Path .\xconnect-XP0.json
NOTE: when executing the Solr configurations, the script will stop and start the Solr service. But Solr might not come up and running fast enough for the scripts, and it might cause an error when trying to create the cores in Solr admin. If this happens, after the error, wait some time (so Solr finishes starting up) and execute the task that creates the cores:
Invoke-SitecoreInstall -Path .\sitecore-solr.json -Tasks "CreateCores" Invoke-SitecoreInstall -Path .\xconnect-solr.json -Tasks "CreateCores"
Another solution is to edit the -solr.json files and look for the “StartSolr” task. Increase the “PostDelay” value.