All Sitecore documentation directs users to use the SIF or SIF-less tools to install Sitecore.
This isn't a valid approach in certain circumstances such as CI pipeline builds or environments where installing Powershell modules is not possible/permitted.
Through a lot of wasted hours, hair pulling and odd feedback from Sitecore support I managed to get Sitecore up and running.
The situation I was dealing with was a hosting environment running Windows Server 2012 R2 that didn't allow me to install the SIF Powershell module. I also had pre-existing certificates I wanted to use for client certificate authentication with xConnect.
My solution to this was to use the SIF tool to install Sitecore locally, then copy it up. Instead of using SIF to do the installation locally, you could also download the "ZIP archive of the Sitecore site root folder" and work with that.
Topologies
A short note on topologies as they were not explained in an obvious manner.
- XP0 refers to a "standalone" installation, this installs all of Sitecore XP on one instance and all Sitecore xConnect in one instance instead of breaking them up into their delivery/management/processing/reporting roles. This is what you would most likely use during development.
- XP1 breaks XP0 into its smaller components. This allows you to distribute the processing of Sitecore amongst multiple hosts rather than running everything on the one server.
- XM is similar to XP1 in that it breaks the packages down, however it only includes the CD and CM components.
The topology I am working with in this installation is XP0.
Installation
This is the process I followed.
- Install SIF on your local development machine
- Install Java
- Install SOLR locally
- Download the "Packages for XP Single" archive
- Run SIF for xconnect-solr.json
- Run SIF for sitecore-solr.json
- Run SIF for xconnect-xp0.json
- Run SIF for sitecore-xp0.json
At this point you should have Sitecore running at http://sitecore9-website/ and xConnect running at https://sitecore9-xconnect/ on your local machine. The next step is to package this up and deploy it to a remote hosting environment.
- Backup and archive all the databases (prefixed with
SC90_
) - Archive the
C:\inetpub\wwwroot\sitecore9-website\
folder - Archive the
C:\inetpub\wwwroot\sitecore9-xconnect\
folder - Archive the
C:\solr\solr-6.6.2\server\solr\SC90_*
folders - Copy all these archives to their intended destination
- Install your certificate on the servers that will run Sitecore and xConnect, ensure you're using a certificate that includes its private key (i.e., a p12/pfx certificate)
- On the Sitecore XP server, extract the sitecore9-website archive to its destination
- Create an IIS website pointed at that directory
- On the xConnect server, extract the sitecore9-xconnect archive to its destination
- Create an IIS website pointed at that directory
- This website will need an SSL binding
- This website will also need to be configured to handle client certificates
- Open IIS Manager
- Browse to the website
- Open SSL Settings
- Check the "Require SSL" box
- Change "Client certificates" to "Require"
- Restore all the databases on the database server
- Update the
[__ShardManagement].[ShardsGlobal]
table in theSC90_Xdb.Collection.ShardMapManager
database- The
[ServerName]
field will need to be updated
- The
- Update the connection strings in the sitecore9-website and sitecore9-xconnect websites
- The xConnect connection strings in the sitecore9-website will need to be updated to point at the new sitecore9-xconnect site
- Update the SOLR endpoint URL, this can be patched in to the
ContentSearch.Solr.ServiceBaseAddress
Sitecore setting
Now the websites should be running in their intended environment. The next step is to setup the background xConnect services.
- Download the nssm tool on the server that will be running the services.
- Update the ConnectionStrings.config file in the
sitecore9-xconnect\App_data\jobs\continuous\*
folders - Run
nssm.exe install "Sitecore XConnect IndexWorker" full-path-to\sitecore9-xconnect\App_data\jobs\continuous\IndexWorker\XConnectSearchIndexer.exe
- Run
nssm.exe install "Sitecore XConnect AutomationEngine" full-path-to\sitecore9-xconnect\App_data\jobs\continuous\AutomationEngine\maengine.exe
- Run
net start "Sitecore XConnect IndexWorker"
- Run
net start "Sitecore XConnect AutomationEngine"
Finally, the Sitecore environment should now be running in a stable state. In my instance the sitecore9-website folder will be dynamic and change on each deployment of the application; the original sitecore9-website folder will be used as a template where our updates will be deployed into.
The assumptions made for this process are below.
- Sitecore will be running at http://sitecore9-website/
- xConnect will be running at https://sitecore9-xconnect/
- SOLR will be running at https://solr:8983/solr/
- The database server will be running on the local machine
- The database
sa
password is "password"
- The database
- The certificate used for client authentication is called "sitecore-certificate"
Gotcha's
- Make sure you have no intermediary certificates sitting in your "Trusted Root Certification Authorities", Thanks Dan
- Make sure the appropriate users have access to the private key of your certificate (lazy way would be to give "Everyone" access, less lazy would be to give "IIS_IUSERS" access)
- Not using SIF will mean that you have to manually configure the database sharding for xDB
- In environments outside production you may receive an error similar to below. Ensure you have SQL Server Data Tools in Visual Studio 2015 installed, as per the installation guide. Thanks Grant
- Ensure that "contained database authentication" is enabled. Link
Recommendations
- I am currently investigating the use of Docker (Windows Containers) for most of this.