After the recent launch of Sitecore 9 I couldn’t wait to get my hands dirty. Which has driven me to write a series of 5 blog posts about my 5 first days with Sitecore 9 and hopefully to help you in getting started with the new Sitecore 9 features.
The first post of the blog post series is around setting up your first Sitecore 9 instance, what you need to lookout for and how you make it go as smoothly as possible.
One of the first things you will notice is that the standard installation process has changed with the introduction of the Sitecore Installation Framework (SIF) and that it seems daunting at first. In this blog post I will outline why you do not need to worry and why it is actually fairly easy to set up your first instance using SIF.
Why should I be interested in Sitecore 9?
Aside from the fact that it is a new Sitecore version which you should make yourself familiar with, there are also a number of benefits in Sitecore 9:
- xConnect: It is finally here , xConnect, the new way of connecting to XDB
- Federated Login: it is now possible out of the box to use federated login providers like Azure AD for both backend and frontend login
- Experience Forms: The new forms module is here, much easier to style and customize
- Marketing Automation: The new marketing automation is here, no more engagement automation
- Dynamic Placeholders: no more need to install your custom implementation of Dynamic Placeholders
- Configuration Patching: a new way of determining what configuration should be used on what kind of server.
SIF? Why not just use SIM?
For the people knowing SIM: you are probably wondering why we are not using SIM for the installation. The answer to that is quite easy:
- The latest version of SIM can only install the CM part of Sitecore and not xConnect
- You should at least understand how SIF works so that you can install an instance according to production standards
This doesn’t mean you should never use SIM but it is a good idea to at least install Sitecore 9 using SIF once to get familiar with it.
This blog post around your first day with Sitecore 9 does make a couple of assumptions:
- You are using SQL Server 2016 as an XDB
- You have your environment ready according to the pre-requisites of the described in chapter 2.1 of the official installation guide
- Your search provider is going to be SOLR
Solr as a service with SSL Enabled
For Sitecore 9 it is recommended to run Solr as a service and required to run it with ssl. To set all this up follow the following steps
Ssl setup solr
- Download the right version of SOLR 6.6.2( since 6.6.1 has a bug which blocks the Sitecore install)
- Extract this to the folder of your choice, for example C:\solr-662
- Open command line as an administrator and navigate to: C:\Solr-662\server\etc
- Now we need to use keytool to generate the ssl files. If you have never used keytool before add your Java bin folder (for example, C:\Program Files\Java\jre1.8.0_121\bin\keytool.exe) to your PATH (This PC > Properties > Advanced System Settings > Environment Variables, then select Path and Edit). Now restart the command line as an administrator
- Now run the following command:
“keytool -genkeypair -alias solr-ssl -keyalg RSA -keysize 2048 -keypass secret -storepass secret -validity 9999 -keystore solr-ssl.keystore.jks -ext SAN=DNS:localhost, IP:127.0.0.1 -dname “CN=localhost, OU=Organizational Unit, O=Organization, L=Location, ST=State, C=Country””
- Now generate the ps12 file:
“keytool -importkeystore -srckeystore solr-ssl.keystore.jks -destkeystore solr-ssl.keystore.p12 -srcstoretype jks -deststoretype pkcs12”
- Now open the solr file “bin\solr.in.cmd” and add the following lines:
REM Require clients to authenticate
REM Enable clients to authenticate (but not require)
- Double click the ps12 file and install the certificate to your local machine store
Setup Solr as a service
- Download NSSM at https://nssm.cc/download
- Run “c:\Program Files\nssm\win64\nssm” install solr662
- Follow the settings below:
- Now click Install service, you should get the message that the service was installed succesfully.
- Service should now be running:
Install the SIF framework
To install the SIF framework you can use the nuget module for powershell and Sitecores nugget feed. To do this follow the following steps:
- Add the Sitecore Powershell gallery so that powershell can find the SIF modules:
Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
- Install the base SIF framework:
- Install the Sitecore fundamentals module to enable the install of a dev environment:
Installing your first Sitecore dev instance
To install Sitecore 9 itself I would recommend using the script provided by Perficient at https://blogs.perficient.com/microsoft/2017/10/how-to-install-sitecore-9-with-the-sitecore-install-framework/
This powershell script automates all the steps for you and takes away most of the tedious configuration work.
You just need a couple of steps:
- Download Sitecore 9 installation files(Packages for XP Single) and extract them to a folder, per example “C:\Sitecore\Install\”
- Fill in the parameters at the top of perficients script:
$prefix = "sc90"
$PSScriptRoot = "C:\Sitecore\Install\Sitecore 9.0.0 rev. 171002"
$XConnectCollectionService = "$prefix.xconnect"
$sitecoreSiteName = "$prefix.local"
$SolrUrl = "https://localhost:8983/solr"
$SolrRoot = "C:\solr-662"
$SolrService = "solr662"
$SqlServer = "localhost"
$SqlAdminUser = "sc90"
$SqlAdminPassword = "password"
- Now run the installer!
- Your first instance should be up at http://sc90.local/sitecore if you let the parameters at their defaults
- Don’t forget to execute the post deployments steps:
- Chapter “6.1 Add a Recognized User to the xDB Shard Databases” of the installation guide which basically is about running the script below in SQL (replace the parameters as needed):
Keep in mind that when running the script you need to enable “SQL CMD” mode (In the application bar, on the Query tab, click SQLCMD Mode) otherwise you will just get a lot of errors.
- Chapter “6.2 Rebuild the Search Indexes and the Link Databases”.
So now that your first Sitecore 9 instance is up and running we can now dive into the more fun stuff like using and customizing Experience Forms which I will cover in my following blog post on Sitecore 9