Last updated: Oct 24 2016

Area: Episerver Commerce Applies to versions: 10 and higher
Other versions:

Deploying Commerce to Azure Web Apps

This topic describes how to set up an Episerver Commerce site to run on Azure Web Sites. In this scenario, a Commerce Core site is installed, and you can apply most steps to sites via the Visual Studio extension and installing NuGet packages. See Azure Web Apps for information about Azure.

Requirements

Setting up a cloud website

Like an Episerver CMS website on Azure, you can run the Commerce website on an Azure Web Site environment with multiple instances. The website instances share the same Azure SQL database, and the BLOB storage in Azure is used to store the file binary data. Load balancing is applied, and the Azure Service Bus manages events among the CMS websites.

Follow these steps to create an Episerver Commerce website in an Azure Apps environment.

  1. Create a site.
    1. In Visual Studio, select Tools > Extensions and Updates menu. In the dialog, select Online, search for EPiServer CMS Visual Studio Extension then install the extension. See Visual Studio Gallery for  information about the Episerver Extension.
    2. Create a new project by selecting New > Project > Visual C#, then EPiServer > EPiServer Web Site. In the dialog select Empty and uncheck Add EPiServer Search to use search functionality when running in Azure. See "Search in Azure" in Deploying to Azure Web Apps.
    3. Install the latest version of the EPiServer.Commerce NuGet package.
    4. Install the EPiServer.Commerce.Azure NuGet package to the project.
    5. Add the cloud license to the website. This is used and activated later, when deploying the website to Azure.

  2. Create Azure resources. See Creating Azure resources in Deploying to Azure Web Apps.
  3. Update configurations. See Updating configuration in Deploying to Azure Web Apps.
  4. Deploy the Episerver site. See Deploying in Deploying to Azure Web Apps.
    1. Because Commerce has two databases, add two scripts in the Add SQL Script step:
      • EPiServer.Cms.Core.sql under [SolutionDir]\packages\EPServer.CMS.Core.x\tools\ to EPiServerDB
      • EPiServer.Commerce.sql under [SolutionDir]\packages\EPiServer.Commerce.Core.x\tools\ to EcfSqlConnection
    2. When the database is successfully created, run the Update-EPiDatabase command in the Package Manager Console.

  5. Change the site URL. See Changing the site URL section on Deploying to Azure Web Apps.
  6. Build the site index.
    1. Build the content index. See Search in Azure section on Deploying to Azure Web Apps.
    2. Rebuild the catalog index.
      1. Access Commerce Manager.
      2. Go to Administration > System Settings > Search Index.
      3. Click Rebuild Index. The catalog index is restored in your storage.

        Note: If you are using LuceneSearchProvider as default search provider, complete the following additional steps.

      4. Open Mediachase.Search.config, in SearchProviders, and set the defaultProvider attribute to LuceneAzureSearchProvider.
      5. Set your connectionStringName so that the provider has the name="LuceneAzureSearchProvider" matching with your Azure Storage name (in connectionStrings.config) and storage="<container you want to index>".
      6. Set the connectionStringName in Indexers tab to match your Azure Storage name (in connectionStrings.config) and basePath is "<container where you want to store build info>".

        The following example shows search config in Mediachase.Search.config, defined for using Lucene on Azure.

  7.  To improve the user interface experience enable WebSocket support.

Related topics

Comments