Sitecore Commerce 8.2.1 demo installation guide Part 4

This is last part of series posts describing how to install Sitecore Commerce 8.2.1 + Reference Storefront.

Part 4 – Installation of Commerce Engine

First think to do is to unzip into temporary folder. Open command prompt, navigate to that temporary folder
  • without hesitation run dotnet restore
  • after successful restoration publish those sources using dotnet publish .\Sitecore.Commerce.Engine -o c:\Deploy\Sitecore.Commerce
  • create folder at C:\inetpub\CommerceAuthoring  this is where sitecore commerce engine web app will reside.
  • copy content of Deploy folder to CommerceAuthoring folder
Now we need to prepare new sql db for Commerce Engine so run CommerceServicesDbScript.sql in Sql Management Studio (file should be present in SDK)
Before running that sql make sure that its using correct user (its declared into variable at 2 places. Just review it and run it, if something goes wrong, just fix that file and re-run it)
Now create new Application pool CommerceAuthoring with following properties:
  • use No Managed Code for CLR
  • use Integrated for Managed pipeline mode
  • set identity to CSFndRuntimeUser (same as for commerce server)

App pool is useless without site so lets create one:

  • create new IIS Site called CommerceAuthoring
  • change binding to port 5000
  • set physical path to folder C:\inetpub\CommerceAuthoring

Lets check if Commerce Engine application is doing fine by browsing  http://localhost:5000/api/$metadata

If content is displayed its fine. It should just retrievemetadata from  ODATA api.

Now you’ll configure Commerce Server Engine. At this point it does not contain any data. Before proceeding you need to register at to get credentials for test payment gateway. Register and retrieve MerchantId, PublicKey, and PrivateKey values.

Edit file PlugIn.Habitat.CommerceAuthoring-1.0.0.json  in C:\inetpub\CommerceAuthoring\wwwroot\data\Environments
Find Plugin.Sample.Payments.Braintree.BraintreeClientPolicy, Plugin.Sample.Payments.Braintree  and change it to following

Now its last time to check if our commerce server web services are available, because Commerce Engine will use them:

  • browse http://localhost:1004/CFSolutionStorefrontSite_CatalogWebService/CatalogWebService.asmx

Back to Commerce Engine configuration check and fix connection strings in C:\inetpub\CommerceAuthoring\wwwroot\bootstrap\Global.json

Check and fix all connection string in C:\inetpub\CommerceAuthoring\wwwroot\data\Environment\*.json

Yes, its long and tedious but necessary.

Now if you’ll make mistake here, you’ll have to drop created Commerce Engine database and perform everything again, so double check connection strings and braintree credentials, backup config files. Bootstrapping will basically grab all those json files and push it into database.

Bootstrap Commerce Server Engine

In browser run http://localhost:5000/commerceops/Bootstrap()
there shouldn’t be any error message
Now initialize environments

In browser run :

  • http://localhost:5000/commerceops/InitializeEnvironment(environment='AdventureWorksShops')
  • http://localhost:5000/commerceops/InitializeEnvironment(environment='HabitatAuthoring')

Again there should be only good status codes in response messages.

Restart IIS Commerce Authoring service

Last Step

Visit  open content editor and navigate into /sitecore/Commerce/Catalog Management/Catalogs . There check Habitat_Master catalog, save all and publish all. After that reindex all indexes (Control Panel > Indexing) and enjoy!

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

Leave a Reply

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