SQL Azure Scale-Out
Created by Orckestra
SQL Azure Scale-Out Setup Guide
- Introduction
- Pre-Installation and Installation Steps
- Configuring Media File Synchronization
- Configuring Data Change Synchronization
- Verifying the Correct Configuration of Synchronization
Configuring Media File Synchronization
To configure media files synchronization:
- Create a container in Azure blob storage
- Get the connection string to the blob storage
- Specify the blob connection string in Web.config
- Configure the media file provider in Composite.config
Creating a container in Azure blob storage
For synchronization, you first need to create a container in Azure blob storage. This is where the scaled-out C1 CMS website will store its media files (instead of the standard place at ~/App_Data/Media):
- Log into the Microsoft Azure management portal.
- Choose an existing blob storage account or, if needed, create a new one.
- Add a storage container (for example, "c1mediafiles") where synchronized media files will be stored.
- Make sure the container has the “Private” access.
Figure 4: Creating a new container on Microsoft Azure
Getting the blob connection string
In the following steps you’ll configure your website to synchronize media file. For this, you need to know the connection string to the blob storage where you’ve created a dedicated container (as described in the step above).
- In the Microsoft Azure management portal, select the blob storage with the container.
- Click “Manage Keys”.
- Make a note of, or copy, the storage account name and storage access key.
Figure 5: Getting the values for the blob connection string on Microsoft Azure
Specifying the blob connection string in Web.config
Now you need to specify the blob connection string in Web.config:
- Edit ~/Web.config.
- Add the blob storage connection string with some name, for example, "c1media":
<configuration> <!-- skipped --> <connectionStrings> <!-- skipped --> <add name="c1media" connectionString="DefaultEndpointsProtocol=https;AccountName=[AccountName];AccountKey=[AccessKey]" /> </connectionStrings> </configuration>
Listing 1: Specifying the blob connection string in Web.config
where:
- [AccountName] is the name of the blob storage account
- [AccessKey] is the access key to the blob storage account
Configuring the media file provider in Composite.config
Finally, you need to replace the default media provider in Composite.config with the Azure media provider using the name of the blob connection string you've added in Web.config and the name of container you’ve created in the blob storage:
- Edit ~/App_Data/Composite/Composite.config.
- Search for name="MediaFileDataProvider" to locate the default media provider.
- Comment out this media file provider.
- Add a reference to AzureMediaProvider as shown below:
<configuration> <!-- skipped --> <Composite.Data.Plugins.DataProviderConfiguration defaultDynamicTypeDataProviderName="…"> <DataProviderPlugins> <!-- skipped --> <!-- <add rootDirectory="~/App_Data/Media" storeId="MediaArchive" storeDescription="Media Archive Files" storeTitle="Media Archive" type="Composite.Plugins.Data.DataProviders.MediaFileProvider.MediaFileProvider, Composite, Version=1.0.3037.13741, Culture=neutral, PublicKeyToken=null" name="MediaFileDataProvider" /> --> <add rootDirectory="~/App_Data/Media" storeId="MediaArchive" storeDescription="Media Archive Files" storeTitle="Media Archive" type="Composite.Azure.ScaleOut.AzureMediaProvider.AzureMediaDataProvider, Composite.Azure.ScaleOut.AzureMediaProvider" name="MediaFileDataProvider" blobStorageConnectionStringName="[BlobConnectionStringName]" blobContainer="[BlobContainerName]" /> </DataProviderPlugins> </configuration>
Listing 2: Configuring media file provider in Composite.config
where:
- [BlobConnectionStringName] is the name of the blob connection string added in Web.config (see above).
- [BlobContainerName] is the name of the container created in the blob storage (see above).
For example:
<add … blobStorageConnectionStringName="c1media" blobContainer="c1mediafiles" />
Listing 3: Example of the media file provider configured in Composite.config