Create an Azure Cosmos DB for MongoDB vCore cluster by using the Azure portal – Free Tier

  • Thread starter Thread starter Suniti_0020
  • Start date Start date
S

Suniti_0020

I’m Suniti, a Microsoft Learn Student Ambassador, and in this blog, we'll explore how to create and know to run workloads using Azure Cosmos DB by setting up a MongoDB vCore cluster with the free tier.



In this QuickStart, you create a new Azure Cosmos DB for MongoDB vCore cluster. This cluster contains all your MongoDB resources: databases, collections, and documents. The cluster provides a unique endpoint for various tools and SDKs to connect to Azure Cosmos DB and perform everyday operations.

Prerequisites :

  1. An Azure Account with Active Subscription. Create an Account here.

Understanding basic terminologies:

  • Azure Subscription - An active Azure subscription is a logical container that allows users to provision resources in Azure, such as databases, virtual machines, and more.
  • Resource Groups - In Azure, a resource group is a logical container that holds related resources for an Azure solution. Resource groups are used to manage resources as a single entity based on lifecycle and security.
  • Resource - A manageable item that is available through Azure. Virtual machines, storage accounts, web apps, databases, and virtual networks are examples of resources.
  • Cluster - A cluster in Azure refers to a group of interconnected virtual machines (VMs) or physical servers that work together to perform a specific task or workload

Create a vCore Cluster


Create a MongoDB cluster by using Azure Cosmos DB for MongoDB vCore.

  1. Sign in to Azure Portal
  2. Create a Resource Group
    1. Select Resource groups
    2. Select Create
    3. Enter the following values:
      • Subscription: Select your Azure subscription
      • Resource group: Enter a new resource group name
      • Region Select an Azure location
    4. Select Review + Create
    5. Select Create
  1. Create Azure Cosmos DB Resource
    1. Search and Select Azure Cosmos DB resource. > Choose "Create" from Menu panel.
      Screenshot 2024-09-30 170550.png

    2. Select "Azure Cosmos DB for MongoDB".
      Screenshot 2024-09-30 170614.png

    3. Select the Architecture – vCore cluster (Recommended) for this blog
      Screenshot 2024-09-30 170633.png

    4. Enter the following values :
      • Subscription : Pick your existing Azure subscription.
      • Resource Group : Select the resource group that you create above.
      • Cluster name : Enter a name for your Azure Cosmos DB for MongoDB cluster.
      • Select “Free Tier”.
      • Location : Select the location closest to you.
      • MongoDB version : Go for the latest version of MongoDB.
      • Setup Administrator account : Create an admin user account and password. Which you will use in your API to access the database.
        Screenshot 2024-09-30 170659.png


    5. Select Next: Global distribution (preview).
    6. Click Next: Networking. Under the Firewall rules section on the Networking tab, select Allow public access from Azure services and resources within Azure to this cluster. Additionally, add a firewall rule to grant access to your client device or applications for connecting to the cluster.
    7. Hit “Review + Create” > “Create”.
    8. Review the settings you provide, and then select Create. It takes a few minutes to create the cluster. Wait for the portal page to display Your deployment is complete before moving on.
    9. Select Go to resource to go to the Azure Cosmos DB for MongoDB cluster page.
  2. Congratulations, you've successfully created your first vCore Cluster with Cosmos DB for MongoDB!



Key Benefits of Azure Cosmos DB for MongoDB Free Tier

  • Zero Upfront Costs: With the free tier, you can get started with Azure Cosmos DB for MongoDB without any initial financial commitment, allowing you to explore and experiment for as long as you need without worrying about costs.
  • Effortless Onboarding: Setting up is simple—just choose the "Free Tier" option from the dropdown menu during cluster provisioning. This streamlined process ensures that you can get started quickly and easily.
  • Generous Storage (32GB): The free tier offers a substantial 32GB of storage, providing ample space to handle evaluations or small-scale production workloads without the risk of running out of disk space.
  • Seamless Upgrade Path: As your needs grow, upgrading to a paid tier is hassle-free. You can transition smoothly while keeping your data, connection strings, and firewall settings intact, ensuring that scaling your application is a smooth and uninterrupted process.



What are the options to migrate data from MongoDB to vCore-based Azure Cosmos DB for MongoDB?


1. Azure Data Studio ( Online )

The Azure Cosmos DB for MongoDB migration extension assists in migrating your MongoDB workloads to Azure Cosmos DB. With this extension, you can:

  • Conduct a comprehensive assessment of your workload to identify the steps needed for migrating to vCore-based Azure Cosmos DB for MongoDB.
  • Execute the migration by selecting specific databases and collections, smoothly transitioning them to vCore-based Azure Cosmos DB for MongoDB.

2. Native MongoDB (Offline)

You can use the native MongoDB tools such as mongodump/mongorestore, mongoexport/mongoimport to migrate datasets offline (without replicating live changes) to vCore-based Azure Cosmos DB for MongoDB offering.



Conclusion


In this blog, we've explored how to create an Azure Cosmos DB for MongoDB vCore cluster using the free tier, highlighting its key benefits like zero upfront costs, effortless onboarding, and seamless scalability. Azure Cosmos DB offers a powerful, fully managed solution to help you scale your MongoDB workloads with ease. Whether you're just starting out or looking to migrate existing workloads, Cosmos DB provides the flexibility and performance needed for modern application development.

Thank you for following along, and feel free to explore the resources section for more information on migrating your data and making the most of Azure Cosmos DB



Resources

  1. Quickstart: Create a new cluster - Azure Cosmos DB for MongoDB vCore | Microsoft Learn
  2. Azure Cosmos DB for MongoDB migration extension (preview) - Azure Data Studio | Microsoft Learn
  3. Azure Cosmos DB for MongoDB migration extension (preview) - Azure Data Studio | Microsoft Learn
  4. Migrate MongoDB using MongoDB native tools - Azure Cosmos DB for MongoDB vCore | Microsoft Learn
  5. Azure Cosmos DB for MongoDB migration extension (preview) - Azure Data Studio | Microsoft Learn
  6. Azure Cosmos DB for MongoDB migration extension FAQ (preview) - Azure Data Studio | Microsoft Learn
  7. Create Your Azure Free Account Or Pay As You Go | Microsoft Azure
  8. Use Azure Cosmos DB for Free
  9. Azure Cosmos DB for MongoDB - YouTube
  10. GitHub - Azure-Samples/azure-cosmosdb-mongodb-api-nodejs-bookstore: CosmosDB Bookstore is a sample books catalog application that demonstrates the capabilities of Azure Cosmos DB API for MongoDB.

Continue reading...
 
Back
Top