Sitecore Commerce powered by Commerce Server 8.1 – Developer Machine Installation Guide

This guide is aimed at complementing the Sitecore Reference Storefront Quick Setup Guide which is primarily used to setup local developer machines and used in our training sessions. It goes through a lot of the pre-setup required.

Ensure your computer matches these system requirements: http://commercesdn.sitecore.net/SCpbCS81/SitecoreCommerceConnectGuide/en-us/index.html#Concepts/c_SystemRequirements.html

This guide does not cover the installation of SQL Server or Visual Studio so have them installed before you move forward.

Step 1 – Download all the necessary packages

Note: download them to your Downloads folder.

    1. MongoDB – Check these two links for which version is currently supported link1, link2. Download the necessary version here. For this post I’ve downloaded the latest version which isn’t supported yet.
    2. Robomongo – This is one of many tools you can use to manage your Mongo DB. Download the necessary version here.
    3. Sitecore Instance Manager (SIM) – This is a great dev tool for quickly spinning up Sitecore XP sites. Download here.
    4. Sitecore XP (SC) – Download here. Using SIM, it can also download Sitecore so you don’t need to.
    5. Get a copy of your Sitecore license.xml file.
    6. 4 x Sitecore Commerce downloads. Download here.
      image
      Including:
      1. Commerce Server (CS) – the core commerce engine.
      2. Sitecore Commerce Connect (SCC)– The eCommerce framework used to connect Sitecore to any External Commerce System (ECS).
      3. Sitecore Commerce Server Connect – The integration logic between SCC and CS.
      4. Sitecore Merchandising Manager – the Sitecore SPEAK interface used to manage Catalogs and Inventory.
    7. Sitecore Reference Storefront – this is the reference eCommerce implementation of Sitecore Commerce. Download here.

I recommend you download the latest version of the necessary files and ensure their compatibility through the links provided. My download folder looks like this:

image

Step 2 – Install MongoDB

    1. Double click the mongodb msi from your downloads folder, and click Next.
      image
    2. Click Accept the license agreement, and click Next.
      image
    3. Select Complete, and click Next.
      image
    4. Click Install.
      image
    5. Click Finish.
      image

Step 3 – Configure MongoDB as a Service

Note: this was taken almost verbatim from the MongoDB Documentation found here. 

    1. Open a command prompt as Administrator

      Press the Win key, type cmd.exe, and press Ctrl + Shift + Enter to run the Command Prompt as Administrator.

      Execute the remaining steps from the Administrator command prompt.

    2. Create directories.

      mkdir c:mongodbdatadb
      mkdir c:mongodbdatalog

    3. Create a configuration file.

      Create a file at C:mongodbmongod.cfg and paste the below into it (make any necessary path changes).

      systemLog:
          destination: file
          path: c:mongodbdatalogmongod.log
      storage:
          dbPath: c:mongodbdatadb

    4. Install the MongoDB service

      From the administrator command prompt started earlier run this command:

      "C:Program FilesMongoDBServer3.2binmongod.exe" –config "C:mongodbmongod.cfg" –install

    5. Start the service

      From the administrator command prompt started earlier run this command:

      net start MongoDB

Step 4 – Install Sitecore Instance Manager (SIM)

    1. Create folder

      From the administrator command prompt started earlier run this command:

      mkdir "C:SIM Resources"

    2. Copy your license.xml file to folder C:SIM Resources.
    3. Double click SIM.Tool.application from the downloads folder.
      image
    4. Click Install.
      image
      Wait for the download
      image
    5. Click Next.
      image
    6. Click Next.
      image
    7. Enter C:Hosts as the folder location, and click Next.
      image
    8. Enter C:SIM Resources and C:SIM Resourceslicense.xml in the necessary fields, and click Next.
      image
    9. Enter Data Source=.;User ID=sitecore;Password=sitecore123, and click Next.
      image

      Note: Make sure you have configured the user in SQL Server.

    10. Click Grant, and then click Next.
      image
    11. Click Finish.
      image

      From this point you can either copy a previously downloaded zip of Sitecore XP to C:SIM Resources or you can follow the following steps to download Sitecore XP from SIM.

      image

    12. Once SIM launches, click GetSitecore.
      image
    13. Click Next.
      image
    14. Click Next
      image
    15. Select the Sitecore CMS 8.1 (Update-X), and click Next.
      image
    16. Enter your SDN username and password, and click Next.
      image
      Wait for the download to finish
      image

Step 5 – Complete these pre-requisites

    • IIS Configuration
      1. From the start menu, search for Add and Remove Programs and open it.
      2. Click Turn Windows features on or off.
        image
      3. Click through until the select below can be made:
        image
    • Disable loopback check
      1. Click the start button, search and open regedit.exe.
      2. Add a DWORD 32 registry key called DisableLoopbackCheck with a decimal value of 1 at location:
        HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsa
        image
    • Create a self-signed SSL certificate in IIS using the following command in PowerShell: New-SelfSignedCertificate -DnsName *.commerce.local CertStoreLocation cert:LocalMachineMy
    • Install Windows Identity Foundation 3.5. In powershell run this command:
      install-windowsfeature windows-identity-foundation
    • Set the startup type of the COMSysApp to demand by executing the following command in the command prompt: sc config COMSysApp start= demand

Step 6 – Continue your Storefront install 

Continue your install using Sitecore Reference Storefront Quick Setup Guide make note of some of the corrections:

    • Step 1 –> point 5
      References to AXCSServices should be CSServices.
    • Step 3 –> point 1
      If the PowerShell scripts aren’t registered for you follow these stesp to import the CSPS module
      1. Upgrade Powershell to version 5.
      2. Set ExecutionPolicy to Unrestricted in order to import the module : Set-ExecutionPolicy Unrestricted –scope CurrentUser
      3. Import module : Import-Module CSPS
      4. Continue to run the commands to configure the CS site
    • Step 3 –> point 2
      1. Is missing the creation of the catalog webservice so run this command.
        New-CSWebService -Name “CSSolutionStorefrontsite” -Resource Catalog -IISSite “CSServices”;
      2. If needed, change the app pool the services are running under, by default they are running under the default app pool.
    • Step 3 –> point 5
      Following the links to install Profile Encryption Keys.
      1. Point 5
        The config file is located here WebsiteApp_ConfigCommerceServer.Core.config
      2. Point 6
        The change here goes into the web.config file but its the config file located in the profiles web service
        C:HostsCSServicesCSSolutionStorefrontsite_ProfilesWebServiceWeb.config
    • Step 3 –> point 6
      When deploying the dacpac file you might need to change:
      1. the TartgetServerName from 127.0.0.1 to localhost
      2. fully quality the location of the dacpac file – it’s a relative path by default.
      3. if your SQL Server has an instance name you will also need to add that.
    • Step 4 –> point 4.
      If you are using a different host entry to cs.reference.storefront.com you will need to replace this in WebsiteApp_ConfigIncludeReference.StorefrontReference.Storefront.config
      image
    • After the install confirm these content settings in the reference storefront
      1. For content item /sitecore/Commerce/Catalog Management/Catalogs, tick Adventure Works Catalog in the Selected Catalog field.image
      2. For content item /sitecore/content/Storefront/Home, select Adventure Works Catalog in the Catalogs field.
        image
      3. For content item /sitecore/content/Storefront/Home, select Adventure Works Catalog in the Catalogs field.
        For content item /sitecore/content/Storefront/Home, select sitecore/media library/Images/Adventure Works in the field Product Images, Catalog Images, and Default Image.
        image
      4. For content item /sitecore/content/Storefront/Home/Product catalog, select /sitecore/Commerce/Catalog Management/Catalogs/Adventure Works Catalog/Departments in the field CategoryDatasource
        image
      5. Now re-index and publish.

Step 7 – Setup Development Environment 

    1. Download the storefront source code from GitHub here. You can either fork the repo or just download a copy.
    2. Once you have a clone of the repo, open the solution called Reference-StorefrontStorefrontCommerce.Server.Storefront.sln
    3. To get it building you will need to copy some dll’s from the bin folder of your recent Sitecore website install and from the install location of Commerce Server.
      C:Program Files (x86)Commerce Server 11Assemblies

      These dll’s will need be copied here
      Reference-StorefrontStorefrontLib
      The resulting folders should look like this:
      image
      and
      image

Advertisements