commerce

Sitecore Commerce 9.1 Initial Release – Step by step Install Guide on your machine

This one is a summary of my own experience for Sitecore Experience Commerce 9.1 Initial Release (aka Sitecore XC 9.1.0) installation on my machine. I’ve had much experience in the following ones:

so I decided to go only with:

I do hope that this blog post is helpful for your own journey as well.

Setup Prerequisites

Step-by-step guide

  1. install the ones below if not yet 😀
  2. rebuild the Link databases for the master and core databases if not yet:
    • on the Sitecore Launchpad, click Control Panel, and in the Database section, click Rebuild Link Databases
    •  select the master and core databases and then click Rebuild
    • sc9com_1
  3. rebuild the search indexes if not yet:
    • on the Sitecore Launchpad, click Control Panel, and in the Indexing section, click Indexing manager
    •  in the Indexing Manager dialog box, click Select all, and then click Rebuild
    • sxc902_7
  4. ensure that Experience Analytics is working properly
    • This slideshow requires JavaScript.

    • Note: if there is any error
      • option 1: you will have to solve it before installing XC by opening the Sitecore log and then having a look at the error messages (normally, they’re certificate issues)
      • option 2: you may want to disable xDB and then fix the error later after installing XC successfully
  5. (optional) once it’s configured for HTTPS/SSL so we should open \storefront910.identityserver.local\Config\production\Sitecore.IdentityServer.Host.xml and then add a new AllowCorsOriginsGroup to that file like this if not yet
    • sc910com_11.png
    • DON’T FORGET to do IIS reset
  6. create a new folder D:\sc910_com_install
  7. download MSBuild Microsoft Visual Studio Web targets (available from Nuget) then extract the Web targets package, copy the \tools\VSToolsPath\Web\Microsoft.Web.XmlTransform.dll file into D:\sc910_com_install
  8. download Sitecore Experience Accelerator 1.8.1 for Sitecore 9.1.1 (Note: must log into https://dev.sitecore.net/ before downloading) and put it into D:\sc910_com_install
  9. (optional) download Sitecore Powershell Extensions 4.7.2 then put it into  D:\sc910_com_install
    • Note: if you go with Sitecore Powershell Extensions 5.0, you will probably see NO default Storefront site in Sitecore
  10. download and unzip Packages for On Premise 2019.04-3.0.163 (Note: must log into https://dev.sitecore.net/ before downloading) then put it into D:\sc910_com_install
  11. unzip D:\sc910_com_install\SIF.Sitecore.Commerce.2.0.19 and then rename D:\sc910_com_install\SIF.Sitecore.Commerce.2.0.19 to D:\sc910_com_install\SIF for a better practice
  12. unzip the D:\sc910_com_install\Sitecore.BizFX.2.0.3.zip
  13. unzip the D:\sc910_com_install\Sitecore.Commerce.Engine.SDK.3.0.40.zip file then copy the D:\sc910_com_install\Sitecore.Commerce.Engine.SDK.3.0.40\Sitecore.Commerce.Engine.DB.dacpac file into D:\sc910_com_install
  14. download sc910_com_install.ps1 and put it into D:\sc910_com_install\SIF then open it to correct the following parameters:
    • $Prefix
    • $ScInstallDirectory
    • $SiteHostHeaderName
    • $SqlServer
    • $SolrUrl
    • $SolrRoot
    • $SolrService
  15. (optional) correct the SitecoreUserName and SitecoreUserPassword of your Sitecore 9.1.1 instance if you’re using others rather than the default ones
    • sc910com_19
  16. (optional) you can specify any local account (note: it will be created automatically if non-existent) to be set up for the various application pools that are created as part of the deployment at line 80-81 of sc910_com_install.ps1
    • sc910com_4
  17. (optional) open D:\sc910_com_install\SIF\Configuration\Commerce\Connect\Connect_MarketingAutomation.json to correct the name of Marketing Automation Service (the windows service)
    • sc910com_12
  18. (optional) you may get timeout exceptions so I suggest to edit D:\sc910_com_install\SIF\Modules\SitecoreUtilityTasks\SitecoreUtilityTasks.psm1 in order to increase the execution timeout
  19. let’s install it
    • Note: ensure that there is NO custom AllowedCorsOriginsGroup in D:\sc910_com_install\SIF\IdentityServer\Sitecore.Commerce.IdentityServer.Host.xml (they’re added automatically in prior installations)
      • sc910com_10.png
    • launch PowerShell as an administrator
    • change directory to D:\sc910_com_install\SIF
    • execute .\sc910_com_install
    • sc910com_5
    • hopefully there is nothing can stop the installation process now
    • sc910com_6
  20. open a browser then navigate to https://storefront910.local/, you would see the default page of Sitecore webiste (note: somehow, it would be a blank page if we created SOLR SXA cores before installing). That’s because we don’t use the default host name sxa.storefront.com so we need to correct it inside Sitecore
    • log into https://storefront910.local/sitecore/
    • access /sitecore/content/Sitecore/Storefront/Settings/Site Grouping/Storefront
    • update Host Name to storefront910.local and Database to master
    • sc910com_9
    • (optional) not check the checkbox Cache Html and select Yes for Disable Browser Caching for a better practice
    • sc910com_17
    • refresh https://storefront910.local/ and then add some products, you would see something like this
    • sc910com_18
  21. DO NOT forget to perform Post-Installation Steps

The recommendation

We can remove the tasks completed from D:\sc910_com_install\SIF\Configuration\Commerce\Master_SingleServer.json and re-do Step 19 if there is something wrong (especially for Note: some known issues below) so that we are able to save a lot of time 😀

How to uninstall it?

  • download sc910_com_uninstall.ps1 and put it into D:\sc910_com_install then open it to correct 07 parameters below:
    1. $ScInstallDirectory
    2. $Prefix
    3. $SolrService
    4. $PathToSolr
    5. $SqlServer
    6. $SqlAccount
    7. $SqlPassword
  • launch PowerShell as an administrator
  • change directory to  D:\sc910_com_install
  • execute .\sc910_com_uninstall
    • sc910com_7
  • hopefully, it runs well and cleans everything up

Note: some known issues

  1. Cannot create a file when that file already exists
    • sc910com_1
    • my suggestion: ensure that the site bindings are unique (Ex: host name, port)
  2. The service cannot accept control messages at this time
    • xc903_7.png
    • access IIS, start storefront910.local site and storefront910.local application pool manually (note: you may need to do it several times) if they’re in STOP status, somehow IIS cannot restart those ones after stopping them
  3. No catalog data available + Illegal recursion detected: GetModel
  4. the layout for the requested document was not found
    • This slideshow requires JavaScript.

       

    • log into https://storefront910.local/sitecore/
    • access /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/Storefront/Catalog Configuration
    • ensure to uncheck the checkbox Use Direct Navigation
    • sc910com_15

Got issues?

Please send your issues (with screenshots if possible) to viet.hoang.sitecore@gmail.com so that I have a chance to understand your problem and be able to suggest the solution.

Happy Sitecore Commerce Installation!

3 thoughts on “Sitecore Commerce 9.1 Initial Release – Step by step Install Guide on your machine

  1. Great post! I had a minor issue with password other than ‘b’ in the config file causing issues with sync content items during InitializeCommerceEngineUsingHost. I switched my password back to b and everything worked. Thanks

    Liked by 1 person

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.