![]() ![]() Enter ‘ BookstoreDB’ as your database name and Books as your collection name. In your Cosmos DB account, head into your Data Explorer and click ‘ New Collection’. But to keep things simple, we can do this in the portal. In the original blog post, we would create our Database and Collection via the Mongo Shell. Once our account is set up, we can create our Database and collection we need for this tutorial. Feel free to grab a cup of tea while you wait. You configuration should look like the figure below:Ĭlick Review+Create, then Create to create your Cosmos DB account. Availability Zones - Disable this for now.Version - This is the version of the MongoDB wire protocol that the account will support.I have written articles on how throughput works in Cosmos DB if you are interested, but for now choose ‘ Serverless’ (still in preview at time of writing). Capacity Mode - In a nutshell, this is how throughput will be provisioned in this account.I’ve chosen Australia East as that’s the datacenter close to me, but pick a datacenter close to you. Location - Where we want to provision the account.Since this is a Mongo DB API tutorial, pick the ‘ Azure Cosmos DB for MongoDB API’ option. ![]() It needs to be unique across Azure, so make it a good one :)ĪPI - Azure Cosmos DB is a multi-model database, but when we create a Cosmos DB account, we can only pick one API and that will be the API for the lifetime of the account. Account Name - This will be the name of your account.For this tutorial, you can create a new one or add your account to an existing one. Resource Group - Resource groups in Azure are a logical collection of resources.On the ‘Create Azure Cosmos DB Account’ page, provide the following configuration: Look for Azure Cosmos DB and click ‘New’. Login to Azure and click on Create a resource. Setting up an Account with the MongoDB API We can also gain the benefits of Azure Cosmos DB, such as Turnkey distribution and elastic scalability in both throughput and storage. We can change our applications to use Azure Cosmos DB without having to make significant changes to our codebase. This is great if we already have applications that use MongoDB. ![]() How does Azure Cosmos DB support a MongoDB API?Īzure Cosmos DB implements the wire protocol for MongoDB, allowing us to use client drivers and tools that we’re used to, but allow us to host our data in Azure Cosmos DB. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |