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 

Deploying Commerce to Amazon

This topic describes how to set up an Episerver Commerce site (8.0 and higher) to run on Amazon Web Services (AWS). In this scenario, a Commerce core website is installed, and most steps can be applied through NuGet packages.

Note: This document does not describe how to create/update a working Episerver Commerce website, which is required for the Amazon deployment. See Installing Episerver updates to do this.

Requirements

  • The AWS Management Console requires an account with login details.
  • A specific cloud-enabled license. See the Episerver License Center to add this license to the Commerce website.
  • Deploying to cloud-based websites requires that each deployed application and module is designed for cloud.
  • For the website to work properly with Amazon, create databases with collation SQL_Latin1_General_CP1_CI_AS. When you create a new Commerce site, first create the databases with the correct collation. Then, when you create the site using Deployment Center, use the Install site without database option and make sure to point to these databases instead of creating new ones.

Cloud website setup

Like an Episerver CMS webite on Amazon, you can run the Commerce website in an AWS Elastic Beanstalk environment with caching and multiple instances. The website instances share the same Amazon SQL instance, and the S3 storage in Amazon stores the file binary data. Load balancing is applied, and the Amazon SNS manages events between the Commerce websites.

Using Auto Scaling, you can scale automatically through configuration.

Follow these  steps create an Episerver Commerce website running in an Amazon environment.

  1. Create Amazon resources.
    1. Log in to the AWS Management Console.
    2. Create an S3 storage bucket.

      When you run on Amazon, store the media (such as images) in the S3 storage to enable elastic scaling. See also Creating a Bucket in the AWS documentation.

      1. In the AWS Management Console, select S3 from the Services menu.
      2. Select Create Bucket in the upper right corner and, in the dialog, select a region and provide a name.
    3. Create an SNS Topic.

      To scale for running on several instances, set up an SNS Topic to handle messages between site instances. See also Create a Topic in the AWS documentation.

      1. In the AWS Management Console, and select SNS from the Services menu.
      2. Click Create New Topicand, in the dialog, select a name.
    4. Create an RDS SQL instance.
      See also Creating a DB Instance Running the Microsoft SQL Server Database Engine.
      1. Open the AWS management console and select RDS in the Services menu.
      2. Click on Launch a DB Instance and, in the engine selection, select sqlserver-web (or another Sql server option).
      3. In the details view, provide the identifier name, size, login user and password.
      4. In the additonal config, select the VPC security group previously created, and finish the wizard to create the DB instance.
    5. Create a Security Group.
      See also Amazon EC2 Security Groups in the AWS documentation.
      1. Open the AWS management console and select Services > EC2.
      2. Select Network & Security > Security Groups in the left menu.
      3. Click Create Security Group, provide a name and a description, and click Create.
      4. In the list, select the created group and select the Inbound tab in the lower panel.
      5. Select MS SQL from the rule dropdown, click Add Rule, then Apply Rule Changes.
  2. Upgrade and prepare the website.

    See Installing Episerver to install a Commerce website. When you have a project with a working website, continue with the following steps.

    1. Open the Episerver Commerce front-end site project using Visual Studio.
    2. Upgrade the Commerce site to the latest version (minimum version 8.0).
    3. Install the Nuget package EPiServer.Packaging.UI.
    4. Run Move-EPiServerProtectedModules in the Package Manager Console.
    5. Install the NuGet package EPiServer.Amazon to the project.

      Note: If you are installing CommerceManager besides the Episerver Commerce Core, continue with the following steps; otherwise, skip to Step C. Configure updates.

    6. Install the NuGet package EPiServer.Commerce.UI.ManagerIntegration to the front-end site.
    7. Open the Mediachase.ConsoleManagerUpdate project, and upgrade it to the latest version (or 8.0 at least; see Installing Episerver updates).
    8. Install the NuGet package EPiServer.Amazon to the Mediachase.ConsoleManagerUpdate project.
  3. Configure updates.
    1. Map BLOB and Event providers.

      Open EPiServerFramework.config and note the configuration under the episerver.framework section to map Blob/Event providers to Amazon.

      XML

      <blob defaultProvider="s3blobs">
      
      <providers>
      
      <add name="s3blobs" type="EPiServer.Amazon.Blobs.AmazonBlobProvider,EPiServer.Amazon"
      
      accessKey="{your_access_key}" secretKey="{your_secret_key}" region="{region_code}" bucket="mysitemedia"/>
      
      </providers>
      
      </blob>
      
      <event defaultProvider="amazonevents">
      
      <providers>
      <add name="amazonevents" type="EPiServer.Amazon.Events.AmazonEventProvider,EPiServer.Amazon"
      
      accessKey="{your_access_key}" secretKey="{your_secret_key}" region="{region_code}" topic="mysiteevents"/>
      
      </providers>
      
      </event>
    2. Configure search.

      Note: When hosting in Amazon, use a scalable search solution such as Episerver Find. Because this is also a hosted service that you connect to, it works the same way as when your site runs on-premises. See the Configuring Episerver Find search provider to install and configure Episerver Find for Commerce.

      The Commerce website is ready for deployment to Amazon.

  4. Deploy the Commerce website.
    1. Migrate the database to Amazon RDS SQL instance.

      Note: In EPiServer Commerce, you need to migrate two databases, and you need to change both the connectionStrings.config in the front-end and back-end sites. See Migrating Commerce databases to Amazon.

      Open connectionStrings.config, change the connection string for EPiServerDB, EcfSqlConnection to the connection string from Amazone RDS SQL Database. Keep the setting MultipleActiveResultSets=true.

      XML

      <connectionStrings>
      
      <add name="EPiServerDB" connectionString="Data Source={your_database_server_for_front_end};Initial Catalog={database_name_for_front_end};
      
      Integrated Security=False;User ID={user_id};Password={password};MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
      
      <add name="EcfSqlConnection" connectionString="Data Source={your_database_server_for_back_end};Initial Catalog={database_name_for_back_end};
      
      Integrated Security=False;User ID={user_id};Password={password};MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
      
      </connectionStrings>
    2. Deploy the website to Windows AWS Elastic Beanstalk.

      See also For .NET Developers section in the AWS Elastic Beanstalk - Getting Started.

      Note: You need two websites: one for the Episerver Commerce front-end site, and one for Commerce Manager.

    3. Transfer the BLOBs to the S3 storage bucket.

      Transfer the website BLOBs to the S3 Bucket. Typically, Episerver BLOBs are stored in C:\EPiServer\<MyEPiServerSite>\appdata\blobs. See also Add an Object to a Bucket.

  5. Activate the cloud license.
    1. See Changing the site URL section in Deploying to Amazon websites to configure the website URL.
    2. Activate the cloud license by going to the Admin view in CMS, then the Config tab, Manage Websites and the Cloud License tab.
  6. Build the site index.
    1. Build the content index.
      See Search in Amazon section on Deploying to Amazon to build a content index.
    2. Rebuild the catalog index.
      Go to Commerce Manager, and Administration > System Settings > Search Index. Click Rebuild Index. The catalog index is restored on your Episerver Find indexes.

Related topics

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

Last updated: Oct 12, 2015

Recommended reading