Create an Azure Cosmos DB for MongoDB vCore cluster by using the Azure portal – Free Tier
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 :
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.
Sign in to Azure Portal
Create a Resource Group
Select Resource groups
Select Create
Enter the following values:
Subscription: Select your Azure subscription
Resource group: Enter a new resource group name
Region Select an Azure location
Select Review + Create
Select Create
Create Azure Cosmos DB Resource
Search and Select Azure Cosmos DB resource. > Choose “Create” from Menu panel.
Select “Azure Cosmos DB for MongoDB“.
Select the Architecture – vCore cluster (Recommended) for this blog
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.
Select Next: Global distribution (preview).
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.
Hit “Review + Create” > “Create”.
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.
Select Go to resource to go to the Azure Cosmos DB for MongoDB cluster page.
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.
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
Quickstart: Create a new cluster – Azure Cosmos DB for MongoDB vCore | Microsoft Learn
Azure Cosmos DB for MongoDB migration extension (preview) – Azure Data Studio | Microsoft Learn
Azure Cosmos DB for MongoDB migration extension (preview) – Azure Data Studio | Microsoft Learn
Migrate MongoDB using MongoDB native tools – Azure Cosmos DB for MongoDB vCore | Microsoft Learn
Azure Cosmos DB for MongoDB migration extension (preview) – Azure Data Studio | Microsoft Learn
Azure Cosmos DB for MongoDB migration extension FAQ (preview) – Azure Data Studio | Microsoft Learn
Create Your Azure Free Account Or Pay As You Go | Microsoft Azure
Use Azure Cosmos DB for Free
Azure Cosmos DB for MongoDB – YouTube
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.
Microsoft Tech Community – Latest Blogs –Read More