Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Loading...
ARCHIVED This content is retired and no longer maintained. See the latest version here.

Recommended reading 

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

Requirements

  • An Azure Management Portal account with login details.
  • A specific cloud-enabled license. See the EPiServer License Center to get this.
  • Deploying to cloud-based websites requires that each deployed application and module is designed for cloud use.

Setting up a cloud website

Like an Episerver CMS webite 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 for storing of the file binary data. Load balancing is applied and the Azure Service Bus manages events between the CMS websites.

The following steps show how to create an Episerver Commerce website running in an Azure Apps environment.

  1. Create a site.
    1. In Visual Studio, select Tools > Extensions and Updates menu. In the dialog, select Online and Search EPiServer CMS Visual Studio Extension then install extenstion. Refer to Visual Studio Gallery for more information about EPiServer Extension.
    2. Create a new project by selecting New > Project > Visual C#, and then EPiServer > EPiServer Web Site. In the dialog select Empty, uncheck "Add EPiServer Search", to use search functionality when running in Azure see section "Search in Azure" on Deploying to Azure Web Apps.
    3. Install the NuGet package EPiServer.Commerce, to latest version (or 8.12 at least).
    4. Install the NuGet package EPiServer.Commerce.Azure to the project.
    5. Add the cloud license to the website, this will be 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 successfuly 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, you need to do 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 matching with your Azure Storage name (in connectionStrings.config) and basePath is "<container where you want to store build info>".

        Example of search config in Mediachase.Search.config, defined for using Lucene on Azure:

        XML
        <?xml version="1.0" encoding="utf-8"?>
        	<Mediachase.Search>
        	<SearchProviders defaultProvider="LuceneAzureSearchProvider">
        	<providers>      
        	<add name="LuceneSearchProvider" type="Mediachase.Search.Providers.Lucene.LuceneSearchProviderMediachase.Search.LuceneSearchProvider" 
        	queryBuilderType="Mediachase.Search.Providers.Lucene.LuceneSearchQueryBuilder, Mediachase.Search.LuceneSearchProvider"
        	storage="<your_physical_path_index>" simulateFaceting="true"/>
        	<add name="LuceneAzureSearchProvider" type="Mediachase.Search.Providers.Lucene.LuceneAzureSearchProvider, Mediachase.Search.LuceneAzureSearchProvider"
        	queryBuilderType="Mediachase.Search.Providers.Lucene.LuceneSearchQueryBuilder, Mediachase.Search.LuceneSearchProvider" 
        	storage="indexcontainer" connectionStringName="EPiServerAzureBlobs" simulateFaceting="true"/>
        	</providers>
        	</SearchProviders>
        	<Indexers basePath="indexcontainer" connectionStringName="EPiServerAzureBlobs"> 
        	<add name="catalog" type="Mediachase.Search.Extensions.Indexers.CatalogIndexBuilder, Mediachase.Search.Extensions"/>
        	</Indexers>
        </Mediachase.Search> 

        Note: You need to install Episerver.Commerce.Azure to use Mediachase.Search.LuceneAzureSearchProvider . 

Related topics

Do you find this information helpful? Please log in to provide feedback.

Last updated: Oct 12, 2015

Recommended reading