Deploy the Commerce Engine

The Sitecore Commerce Engine is built as a thin ASP.NET Core application, and can be hosted in IIS to run as a service using DNX. This includes global policies, global entities, and tracks any created environments. The Sitecore Commerce Engine is also extensible by plugging into the Bootstrap Pipeline, which allows plugins to initialize and populate their own artifacts. Worker processes only need a link to the policy store to bootstrap.

Compile the Commerce Engine

To compile the Commerce Engine:

  1. Install the Sitecore Commerce SDK by unzipping the file, located at the root of the Sitecore Commerce release package.
  2. Open a command prompt and run the restore command from the SDK root folder:
    dotnet restore
    Note: By default, the dotnet.exe is installed under c:\Program Files\dotnet if the path has not been added automatically.
  3. Run the publish command to create a build of the Sitecore Commerce Engine in a local folder. For example:
    dotnet publish .\Sitecore.Commerce.Engine -o c:\Deploy\Sitecore.Commerce
    Note: Make sure that the installed version of the .NET Framework is the DevPack/SDK edition, not the Runtime edition. The dotnet publish command will fail if only the Runtime edition is installed.

Create the Commerce Server databases

To create the SitecoreCommerce_Global and SitecoreCommerce_SharedEnvironments databases:
  1. Open SQL Server Management Studio.
  2. Run the CommerceServicesDbScript.sql script (located in the Sitecore SDK directory).

Install the Commerce Engine service

To install the Commerce Server Engine service:

  1. Open IIS Manager.
  2. Create a new Application Pool called CommerceAuthoring and set the following:
    • Select No Managed Code for the .NET CLR Version of the App Pool.
    • Select Integrated for Managed pipeline mode.
    • Set the Identity to use the same user account that you used for Commerce Server as the identity.
  3. Create a new IIS Site called CommerceAuthoring:
    • Keep the default binding settings with the exception of the port, which is set to 5000.
    • Set the Application Pool to the application pool you created in step 2.
    • Create a new folder in C:\inetpub called CommerceAuthoring and set the Physical Path to this new folder.
  4. Copy the contents of the c:\Deploy\Sitecore.Commerce folder (created when you compiled the Commerce Server Engine) to the new physical directory you created in step 3.
  5. Verify that you can retrieve metadata from the Commerce Engine service via the following URL: http://localhost:5000/api/$metadata.