marketplace

Sitecore Commerce 8.2.1 demo installation guide Part 2

In this series of posts I’m gonna walk you through installation of Sitecore Commerce 8.2.1 + Reference Storefront.

Part 2 – Configuration

In this part I’ll set up and configure Sitecore, Commerce Server and Commerce Server Web Services

First lets set up Commerce Server Site by creating CommerceServer.Core.config .

Navigate to C:\inetpub\wwwroot\store\Website\App_Config  and use CommerceServer.Core.config.example  that should be already there.

Config file contains Commerce Server Site configuration. Use following values:
  • Commerce server site name: CFSolutionStorefrontSite
Now open Powershell as admin and navigate to sitecore website instance C:\inetpub\wwwroot\store\Website .
Run Initialize-CSSite  (its cmdlet  that will prepare Commerce Server Site in Commerce Server based on web configuration of sitecore)
  • it will automatically create site at Commerce Server
  • it will automatically create resources there
  • it will automatically create DBs
  • it will automatically grand permissions in IIS, Dbs
  • do other magic

Setting up Web Services for Commerce Server Desktop Applications

While your admin powershell is still warm navigate to already prepared folder at C:\inetpub\CSServices
  • run New-CSWebService -Name "CFSolutionStorefrontSite" -Resource Catalog -IISSite "csservices";
  • run New-CSWebService -Name "CFSolutionStorefrontSite" -Resource Orders -IISSite "csservices";
  • run New-CSWebService -Name "CFSolutionStorefrontSite" -Resource Profiles -IISSite "csservices";
  • run New-CSWebService -Name "CFSolutionStorefrontSite" -Resource Marketing -IISSite "csservices";

These magic cmdlets will automatically

  1. create & deploy new web application for web service,
  2. add identity to AzMan for resources
  3. add resource to Commerce Server
I’ve bumped into issue that those web services were created under Default App Pool with Administrator User. According to documentation there are plenty of flags that can configure identity properly, feel free to check it or fix it manually as I did:
  • run Grant-CSManagementPermissions -Name "CFSolutionStorefrontSite" -Identity "WIN-1BUHRDDGT1K\CSFndRuntimeUser";

Run Set-CSSiteResourceProperty -Name "CFSolutionStorefrontSite" -Resource "Inventory" -PropertyName "f_display_oos_skus" -PropertyValue $true;

(last command is not necessary at this point but while PS is still warm…it’ll allow inventory subsystem to display out of stock SKUs)

Now set application pool for each created web service to CSServices
Its good to check if all permissions were properly set, so use win -> run -> azman.msc right click on Authorization Manager and browse following XMLs:
  • C:\inetpub\wwwroot\CSServices\CSSolutionStorefrontSite_CatalogWebService\CatalogAuthorizationStore.xml
  • C:\inetpub\wwwroot\CSServices\CSSolutionStorefrontSite_MarketingWebService\MarketingAuthorizationStore.xml
  • C:\inetpub\wwwroot\CSServices\CSSolutionStorefrontSite_OrdersWebService\OrdersAuthorizationStore.xml
  • C:\inetpub\wwwroot\CSServices\CSSolutionStorefrontSite_ProfilesWebService\ProfilesAuthorizationStore.xml
After that add service user Win-1BUHRDDGT1K\CSFndRuntimeUser into these locations
  • CatalogAuthorizationStore.xml > CatalogInventorySystem > Role Assignments
    • Administrator
    • CatalogAdministrator
  • MarketingAuthorizationStore.xml > MarketingSystem > Role Assignments
    • MarketingAdministrator
  • OrdersAuthorizationStore.xml > OrderSystem > Role Assignments
    • OrdersAdministrator
  • ProfilesAuthorizationStore.xml > ProfileSystem > Role Assignments
    • ProfileAdministrator

Good.

Check and set proper web service configuration

In IIS enable anonymous and windows authentication for CSService site but disable anonymous authentication for all created web services & enable only windows authentication for all sub-web services
  • set NTLM provider at first place:
    • IIS > server > Sites > csservices > Authentication
    • windows authentication > Providers

In order to make it work in local environment its needed to use registry hack:

  1. open regedit
  2. navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0
  3. add multistring entry named BackConnectionHostNames
  4. set value with hostname of your Commerce Server WebServices CSServices and ignore error message
Time to perform simple test.
Web services should be accessible for you and for Commerce Server as well so lets check that out.
In IIS > server > Sites > CSServices switch to content view and try to browse each sub-webservice by browsing *.asmx file
If credentials are asked, use your username and password Administrator/Admin1234. You should be asked just once, and after that you should see the “old” ws definition web page… If so, everything is fine.

Configure Profile System Encryption

Now lets get back to black screen of cmd as Admin. Navigate to C:\Program Files (x86)\Commerce Server 11\Tools>

and
  1. run ProfileKeyManager.exe /kn /o "c:\profileEncryptionKeys.xml" /f
  2. run ProfileKeyManager.exe /ke /kf "c:\profileEncryptionKeys.xml" /reg HKEY_LOCAL_MACHINE\SOFTWARE\CommerceServer\Encryption\Keys\CFSolutionStorefrontSite /f
  3. run ProfileKeyManager.exe /ke /kf "c:\profileEncryptionKeys.xml" /reg HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\CommerceServer\Encryption\Keys\CFSolutionStorefrontSite /f
Now check C:\inetpub\wwwroot\store\Website\App_Config\CommerceServer.Core.config  file at configuration > CommerceServer > profiles > encryption > keys
They have to be set accordingly:

Values of private and public must match with created key and registry address (check that also to make sure its correct)
This have to be exact (without spaces)
Navigate to C:\inetpub\wwwroot\CSServices\CSSolutionStorefrontSite_ProfilesWebService  and open Web.config  to check  element configuration > CommerceServer > profilesWebService
Add following attributes:

This should be same as in previous configuration

Now its time to merge sample config files with our real use case:

merge file Merge.CommerceServer.config from C:\inetpub\wwwroot\store\Website\MergeFiles into C:\inetpub\wwwroot\store\Website\Web.config
There is nothing difficult just make sure that you merge conflicting sections:
  1. caching section
  2. change default provider of profile
  3. add new cs provider
  4. add new properties in profile

At this point we’re missing just Reference Storefront site at Sitecore and Commerce Server Engine.

Lets continue in next part 3.

One thought on “Sitecore Commerce 8.2.1 demo installation guide Part 2”

Leave a Reply

Your email address will not be published. Required fields are marked *