commerce

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

This one is a summary of my own experience for Sitecore Experience Commerce 9.2 Initial Release (aka Sitecore XC 9.2.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.

Note: personally, I wanted to use my own install directory rather than the default one

Setup Prerequisites

Please refer to the Sitecore Experience Commerce 9 Compatibility Table for the software and version 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 \storefront920.identityserver.local\Config\production\Sitecore.IdentityServer.Host.xml and then add a new AllowCorsOriginsGroup to that file like this if not yet
    • xc920_3.png
    • DON’T FORGET to do IIS reset
  6. create a new folder D:\sc920_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:\sc920_com_install
  8. download Sitecore Experience Accelerator 1.9.0 for Sitecore 9.2 (Note: must log into https://dev.sitecore.net/ before downloading) and put it into D:\sc920_com_install
  9. download Sitecore PowerShell Extension 5.0 for Sitecore 9.2 then put it into  D:\sc920_com_install
  10. download and unzip Packages for On Premise WDP 2019.07-4.0.165 (Note: must log into https://dev.sitecore.net/ before downloading) then put it into D:\sc920_com_install
  11. unzip D:\sc920_com_install\SIF.Sitecore.Commerce.3.0.28 and then rename D:\sc920_com_install\SIF.Sitecore.Commerce.3.0.28 to D:\sc920_com_install\SIF for a better practice
  12. override the following files in order to inject the custom install directory of Sitecore Identity Server
    • open raw and then copy / paste Master_SingleServer.json into D:\sc920_com_install\SIF\Configuration\Commerce
    • xc920_6
    • open raw and then copy / paste IdentityServer.Config.json into D:\sc920_com_install\SIF\Configuration\Commerce\IdentityServer
    • xc920_7
    • (optional) download + unzip  Configuration.zip and then copy / paste all to D:\sc920_com_install\SIF
    • Note: we cannot use CommerceInstallRoot parameter in this case, otherwise you may get the issue “Cannot find path \CommerceOps_Sc920.local\wwwroot\config.json because it does not exist”
    • xc920_4
  13. download sc920_com_install.ps1 and put it into D:\sc920_com_install\SIF then open it to correct the following parameters:
    • $SiteNamePrefix
    • $ScInstallDirectory
    • $SiteHostHeaderName
    • $SqlServer
    • $SqlUser
    • $SqlPass
    • $SolrUrl
    • $SolrRoot
    • $SolrService
  14. (optional) correct the SitecoreUserName and SitecoreUserPassword of your Sitecore XP 9.2.0 instance if you’re using others rather than the default ones
      • xc920_17.png
  15. (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 83-84 of sc920_com_install.ps1
    • xc920_16
  16. let’s install it
    • Note: ensure that there is NO custom AllowedCorsOriginsGroup in D:\sc920_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:\sc920_com_install\SIF
    • execute .\sc920_com_install
    • xc920_18
    • hopefully there is nothing can stop the installation process now
    • xc920_14
  17. open a browser then navigate to https://storefront920.local/, you would see the default page of Sitecore webiste. 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://storefront920.local/sitecore/
    • access /sitecore/content/Sitecore/Storefront/Settings/Site Grouping/Storefront
    • update Host Name to storefront920.local and Database to master
    • xc920_20
    • (optional) not check the checkbox Cache Html and select Yes for Disable Browser Caching for a better practice
    • sc910com_17
    • refresh https://storefront920.local/ and then add some products, you would see something like this
    • xc920_13
  18. DO NOT forget to perform Post-Installation Steps

The recommendation

We can remove the tasks completed from D:\sc920_com_install\SIF\Configuration\Commerce\Master_SingleServer.json and re-do Step 16 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?

  • open D:\sc920_com_install\SIF\sc920_com_install.ps1 and uncomment the line 103 + comment out the line 100 then save it
  • xc920_15.png
  • Note: DO NOT FORGET to restore D:\sc920_com_install\SIF\Configuration\Commerce\Master_SingleServer.json if you already edited it for removing the tasks completed via the install operations
  • open Windows PowerShell (run as administrator)
  • change directory to D:\sc920_com_install\SIF
  • execute .\sc920_com_install
  • xc920_10
  • hopefully, it runs well and cleans everything up

Note: some known issues

  1. The service cannot accept control messages at this time
    • xc920_11
    • my suggestion 1: access IIS, start storefront920.local site and storefront920.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
  2. The remote server returned an error : (400) Bad Request
    • xc920_12
    • my suggestion 1: you should perform Step 12 or ensure that \storefront920.identityserver.local\Config\production\Sitecore.Commerce.IdentityServer.Host.xml is existent
    • xc920_8
    • my suggestion 2: try doing IIS Reset and then perform the current install step again
  3. Cannot validate argument on parameter ‘Source’. The ” Test-Path $_ ” validation script for the argument with value “D:\sc920_com_install\SIF\SiteUtilityPages” did not return a result of True
    • xc920_19
    • somehow SiteUtilityPages folder is removed after performing some tasks so we have to restore it by copying SiteUtilityPages from SIF.Sitecore.Commerce.3.0.28.zip and then paste it to D:\sc920_com_install\SIF
  4. The MERGE statement attempted to UPDATE or DELETE the same row more than once
    • xc920_21.png
    • my suggestion is to remove all prior tasks completed + Module-HabitatImages task itself (in this case) from D:\sc920_com_install\SIF\Configuration\Commerce\Master_SingleServer.json and re-do Step 16

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!

2 thoughts on “Sitecore Commerce 9.2 Initial Release – Step by step Install Guide on your machine

  1. Hello, Thanks for this nice article. I am trying to install commerce following steps mentioned in this article and receive following error whilst I execute the script. The script execution stops literally in a second. Checked logs but couldn’t find anything useful.
    Script stops with following, are you able to suggest what might be the issue-

    Resetting registered extensions
    Registering ConfigFunction extension ‘And’ => ‘Invoke-AndConfigFunction’
    Registering Task extension ‘AppPool’ => ‘Invoke-AppPoolTask’
    Registering Task extension ‘Command’ => ‘Invoke-CommandTask’
    Registering ConfigFunction extension ‘Concat’ => ‘Invoke-ConcatConfigFunction’
    Registering Task extension ‘Copy’ => ‘Invoke-CopyTask’
    Registering Task extension ‘CreateService’ => ‘Invoke-CreateServiceTask’
    Registering Task extension ‘DownloadFile’ => ‘Invoke-DownloadFileTask’
    Registering Task extension ‘EnsurePath’ => ‘Invoke-EnsurePathTask’
    Registering ConfigFunction extension ‘Environment’ => ‘Invoke-EnvironmentConfigFunction’
    Registering ConfigFunction extension ‘Equal’ => ‘Invoke-EqualConfigFunction’
    Registering Task extension ‘FilePermissions’ => ‘Invoke-FilePermissionsTask’
    Registering ConfigFunction extension ‘GetCertificate’ => ‘Invoke-GetCertificateConfigFunction’
    Registering ConfigFunction extension ‘GetCertificateThumbprint’ => ‘Invoke-GetCertificateThumbprintConfigFunction’
    Registering Task extension ‘HostHeader’ => ‘Invoke-HostHeaderTask’
    Registering Task extension ‘HttpRequest’ => ‘Invoke-HttpRequestTask’
    Registering ConfigFunction extension ‘If’ => ‘Invoke-IfConfigFunction’
    Registering Task extension ‘IISConfiguration’ => ‘Invoke-IISConfigurationTask’
    Registering Task extension ‘IoXml’ => ‘Invoke-IoXmlTask’
    Registering ConfigFunction extension ‘Join’ => ‘Invoke-JoinConfigFunction’
    Registering ConfigFunction extension ‘JoinPath’ => ‘Invoke-JoinPathConfigFunction’
    Registering Task extension ‘ManageAppPool’ => ‘Invoke-ManageAppPoolTask’
    Registering Task extension ‘ManageService’ => ‘Invoke-ManageServiceTask’
    Registering Task extension ‘ManageSolrConfig’ => ‘Invoke-ManageSolrConfigTask’
    Registering Task extension ‘ManageSolrCore’ => ‘Invoke-ManageSolrCoreTask’
    Registering Task extension ‘ManageSolrSchema’ => ‘Invoke-ManageSolrSchemaTask’
    Registering Task extension ‘ManageWebsite’ => ‘Invoke-ManageWebsiteTask’
    Registering ConfigFunction extension ‘Not’ => ‘Invoke-NotConfigFunction’
    Registering ConfigFunction extension ‘Or’ => ‘Invoke-OrConfigFunction’
    Registering ConfigFunction extension ‘ReadJson’ => ‘Invoke-ReadJsonConfigFunction’
    Registering Task extension ‘RemoveService’ => ‘Invoke-RemoveServiceTask’
    Registering ConfigFunction extension ‘ResolveCertificatePath’ => ‘Invoke-ResolveCertificatePathConfigFunction’
    Registering ConfigFunction extension ‘ResolvePath’ => ‘Invoke-ResolvePathConfigFunction’
    Registering Task extension ‘SetXml’ => ‘Invoke-SetXmlTask’
    Registering Task extension ‘SitecoreUrl’ => ‘Invoke-SitecoreUrlTask’
    Registering ConfigFunction extension ‘SqlConnectionString’ => ‘Invoke-SqlConnectionStringConfigFunction’
    Registering Task extension ‘TransformXmlDoc’ => ‘Invoke-TransformXmlDocTask’
    Registering Task extension ‘Unpack’ => ‘Invoke-UnpackTask’
    Registering Task extension ‘WebBinding’ => ‘Invoke-WebBindingTask’
    Registering Task extension ‘WebDeploy’ => ‘Invoke-WebDeployTask’
    Registering Task extension ‘WebRequest’ => ‘Invoke-WebRequestTask’
    Registering Task extension ‘WebsiteClientCert’ => ‘Invoke-WebsiteClientCertTask’
    Registering Task extension ‘WebSite’ => ‘Invoke-WebSiteTask’
    Registering Task extension ‘SitecoreConfiguration’ => ‘Install-SitecoreConfiguration’
    Registering Task extension ‘ImportCertificate’ => ‘Import-Certificate’
    Registering Task extension ‘AddWebFeatureHSTS’ => ‘Add-WebFeatureHSTS’
    Registering Task extension ‘AddWebFeatureHTTPSOnly’ => ‘Add-WebFeatureHTTPSOnly’
    Registering Task extension ‘AddWebFeatureSSL’ => ‘Add-WebFeatureSSL’
    Registering Task extension ‘GetWebFeature’ => ‘Get-WebFeature’
    Registering Task extension ‘NewRootCertificate’ => ‘New-RootCertificate’
    Registering Task extension ‘NewSignedCertificate’ => ‘New-SignedCertificate’
    Registering Task extension ‘RemoveWebFeatureHSTS’ => ‘Remove-WebFeatureHSTS’
    Registering Task extension ‘RemoveWebFeatureHTTPSOnly’ => ‘Remove-WebFeatureHTTPSOnly’
    Registering Task extension ‘RemoveWebFeatureSSL’ => ‘Remove-WebFeatureSSL’
    Registering Task extension ‘TestWebFeatureHSTS’ => ‘Test-WebFeatureHSTS’
    Registering Task extension ‘TestWebFeatureHTTPSOnly’ => ‘Test-WebFeatureHTTPSOnly’
    Registering Task extension ‘TestWebFeatureSSL’ => ‘Test-WebFeatureSSL’
    Registering task parameter map
    WarningAction => Continue
    Verbose => Continue
    InformationAction => Continue
    WhatIf => False
    Debug => SilentlyContinue
    ErrorAction => Stop
    Configuration contains no tasks
    [TIME] 00:00:01
    [TIME] 00:00:01

    Windows PowerShell transcript end
    End time: 20190823044312

    Like

Leave a Reply to sandeepvpote Cancel 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.