Azure CosmosDB

Azure CosmosDB is a fully managed NoSQL database service built for fast and predictable performance, high availability, elastic scaling, global distribution, and ease of development. Redakt CMS offers CosmosDB integration through a NuGet package.

In addition to CosmosDB, the Redakt Azure package also includes an Azure Blob Storage file store module and an Azure Service Bus module.

Installation

Install the Azure package with the NuGet package manager or the Package Manager Console.

PM> Install-Package Redakt.Data.Azure

Register CosmosDB services in the ConfigureServices method in your project's Startup.cs file.

public void ConfigureServices(IServiceCollection services)
{
    // ... framework and other services here

    services.AddRedakt(this.Configuration, builder =>
    {
        builder.AddCosmosDbDataStore();
        // ... other Redakt services
    });
}

Configuration

The CosmosDB data store is configured through the appsettings.json file. Any configuration that is not included in the appsettings.json file will be set to its following default values.

{
    "Redakt": {
        "DataStore": {
            "AzureCosmosDB": {
                "EndpointUri": "",
                "PrimaryKey": "",
                "DatabaseName": ""
            }
        }
    }
}

Endpoint URI & Primary Key

Required. These settings are found in the Azure Portal, and are used to connect to your CosmosDB instance.

Azure Portal CosmosDB keys

Database Name

Required. The database name in your CosmosDB instance. CosmosDB databases are not created automatically by Redakt CMS, it is therefore necessary to create a database in the Azure Portal before starting installation of your Redakt CMS project.