Kentico CMS 7.0 Windows Azure Deployment Guide

Azure Storage overview

Azure Storage overview

Previous topic Next topic Mail us feedback on this topic!  

Azure Storage overview

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

When your application is deployed on Windows Azure, it is not possible to store files locally on individual instances (virtual machines in the cloud). The environment is dynamic and the application will be moved between different instances as necessary. For this reason, Kentico CMS stores its file system using the Blob service of a Windows Azure storage account, which allows it to be persistent and durable.

 

The entire file system of an application is stored within a single container. Individual files are then saved within the container as blobs (binary large objects). Containers cannot be nested within each other, but the folder hierarchy is simulated using blob prefixes. As a result, the application's files use the same structure as a standard Kentico CMS website.

 

Even though blob names are case sensitive, all file paths are converted to lower case before being processed, so path resolving behaviour should be just like that of a local file system. The only scenario that requires additional attention is when you need to import existing files into the CMS that were copied to the storage account manually. The names of such files will usually not be completely in lower case, which may prevent the system from reading them correctly.

 

This situation will typically be encountered when importing files into a Media library, when using the File import or with other features that utilize a file system dialog. To solve the issue, you can select the given folder in the appropriate part of the interface and click the Prepare for import button above the file list.

 

azureguide_clip0031

 

The names of all files contained in the folder will be converted to lower case, and you can then import them into the system as needed.

 

If you encounter any file‑related problems when using a Windows Azure storage account, you can monitor its input/output operations through the debugging features of Kentico CMS. To enable the logging of such operations, turn on the appropriate settings in the Site Manager -> Settings -> System -> Debug -> IO category (or add the CMSDebugFiles key to your web.config and set its value to true).

 

If you then go to Site Manager -> Administration -> System -> Debug, select the IO tab and choose the Azure blob option from the Operation type drop‑down list, you can view recent input and output operations related to files stored on the given storage account.

 

azureguide_clip0029

 

 

 

Exploring your Windows Azure storage account

 

We recommend downloading and using CloudBerry Explorer for Azure Blob Storage, which allows you to connect to a storage account and browse the file content of its blob service.

 

This way, you can view and manage the files stored by your application just like you would with a file system hosted on‑premise.

 

Storage configuration

 

You can specify several settings that affect your application's file storage:

 

The CMSAzureRootContainer setting specifies the name of the blob container that will serve as the root of the application's file system. The default value is cmsroot. You can set a different value in cases where you need to separate the files of multiple websites that use the same storage account.

 

You can use the CMSAzurePublicContainer setting to indicate whether the blob container used to store the application's file system should be public. If set to true, anyone will be allowed to access files directly through the URL of the appropriate blob service, for example:

 

http://<AccountName>.blob.core.windows.net/cmsroot/corporatesite/media/imagelibrary/logo.png

 

The two settings described above can be entered into the <ConfigurationSettings> section of the roles in the application's service configuration file (they must also be declared in the service definition):

 

<Setting name="CMSAzureRootContainer" value="Site2Root"/>
<Setting name="CMSAzurePublicContainer" value="true"/>

 

Additionally, if you open the website and go to Site Manager -> Settings -> Cloud services, you can set the value of the Redirect files to Windows Azure storage setting. If enabled, requests for files that are saved on a Windows Azure storage account will be redirected to the appropriate URL of the given account's blob service.