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.
Deploying the Commerce Engine involves the following tasks:
To compile the Commerce Engine:
Install the Sitecore Commerce SDK by unzipping the
Sitecore.Commerce.SDK.1.x.xxxx.zip
file, located at the root of the Sitecore Commerce release package.Open a command prompt and run the restore command from the SDK root folder:
dotnet restore
Note
By default, the
dotnet.exe
is installed underc:\Program Files\dotnet
if the path has not been added automatically.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.
To create the SitecoreCommerce_Global
and SitecoreCommerce_SharedEnvironments
databases:
Open SQL Server Management Studio.
Run the
CommerceServicesDbScript.sql
script (located in the Sitecore SDK directory).
To install the Commerce Server Engine service:
Open IIS Manager.
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.
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
calledCommerceAuthoring
and set the Physical Path to this new folder.
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.Verify that you can retrieve metadata from the Commerce Engine service via the following URL: http://localhost:5000/api/$metadata.