Tutorial on Microsoft Azure Account and Cosmos DB

Beginner guide for exploring Microsoft Azure service in a free trial

tong eric
Bina Nusantara IT Division
5 min readJun 30, 2022

--

Photo by realfish on Unsplash

Microsoft Azure, formerly known as Windows Azure, is Microsoft’s public cloud computing platform. It provides a range of cloud services, including computing, analytics, storage, and networking. Users can pick and choose from these services to develop and scale new applications, or run existing applications in the public cloud.

Microsoft charges for Azure on a pay-as-you-go basis, meaning subscribers receive a bill each month that only charges them for the specific resources they have used. For those payment calculations and charges, you will need the resource name Azure Subscription. In this tutorial, we will be discussing how to use a Microsoft Azure account subscription and create an underlying Cosmos DB as an example for using the Azure service.

What is Cosmos DB

Before we start our Tutorial we should know What is Cosmos DB. Azure Cosmos DB is Microsoft’s globally distributed, multi-model database service. Cosmos DB enables you to elastically and independently scale throughput and storage across any number of Azure regions worldwide. You can elastically scale throughput and storage, and take advantage of fast, single-digit-millisecond data access using your favorite API including SQL, MongoDB, Cassandra, Tables, or Gremlin. Cosmos DB provides comprehensive service level agreements (SLAs) for throughput, latency, availability, and consistency guarantees, something no other database service offers.

Simply Azure Cosmos DB is one of the Microsoft database services that is classified as NoSQL. Internally, Cosmos DB stores “items” in “containers”, with these two concepts being surfaced differently depending on the API used (these would be “documents” in “collections” when using the MongoDB-compatible API, for example). Containers are grouped in “databases”, which are analogous to the namespaces above containers. Containers are schema-agnostic, which means that no schema is enforced when adding items.

How to Create Azure Cosmos DB

In order to create and use Azure Cosmos DB, You have to own a Microsoft Account first. In this case, you can use a Microsoft account yourself. FYI Cosmos DB is NOT a free service, you will have to pay per month for the quantity of Cosmos DB you use. The Payment of Cosmos DB has to be done with a Subscription

Subscription in Azure

There are a lot of types of subscriptions that you can do in Microsoft Azure. Here we will explain 2 of them, a Free trial subscription and an Azure for Students Starter Subscription.

Azure for Students Starter Subscription

Azure for Students Starter Subscription gets you started with the Azure products you need to develop in the cloud at no cost to you. For using this subscription you have to use an account that is provided by BINUS.

First, go to the portal.azure.com

Log in with your Microsoft account as usual

After login you will find the homepage of Azure Portal, Azure portal is a portal to view and manage every service of your Microsoft Account. Here click Subscription button that we mark or you can search for Subscription if it didn’t appear.

On this page you can view all your Subscriptions, you can have multiple subscriptions in one account. Click add Subscription in the left Corner.

Select Azure for Students Starter, and then fill out the form for the First name, Last name, Email, and Phone. And then accept the Agreement for Policy. Here are the first Azure subscriptions you have made. In Azure for Students, you will get about 100 USD credit for 12 months.

Free Trial Subscription

The step for getting Free Trial Subscription is the same as Azure for Student subscription, You just need to select for free trial option in the last step. This option is for people who want to try but are not a student anymore. For a free trial, you will get a 200 USD Credit for 12 months.

Create Cosmos DB

After we create a subscription we can use it to access other services in Microsoft Azure. let's try it on creating your first Cosmos DB.First search for Cosmos DB in Azure portal Homepage.

Click Add for Cosmos Database in Left Corner.

Fill the form with the below information

Subscription: Subscription that you want to use for this Cosmos DB. Pick your subscription (Free trial or Azure for Students).

Resource Group: Logical collections of virtual machines, storage accounts, virtual networks, web apps, databases, and/or database servers. Click “Create new” to create a new Resource group

Account Name: Username for This Cosmos DB

Location: Pick the nearest location for good performance

After that click next for Networking

Here is the setting for your cosmos DB Firewall, you can set it for allowed all networks or set it to Only specific IPs that can connect to your Cosmos DB.

After that click Create and Congratulation, You have Created your first Cosmos DB

You can check your Cosmos DB connection string, endpoint, Primary key, etc on the Overview page, you can also view and add your data from the data explorer

Summary

To summarize, in this tutorial, we learn about

  • What is Azure Subscription and how to create a free trial subscription for learning purposes
  • How to use subscription to create other services in Microsoft Azure

Thanks for reading and hope this article help on your purpose.

--

--