Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Azure icon

Deploying an Azure Cosmos DB Instance

As modern, cloud-based apps have evolved, they've required data storage to adapt with them. Often the exact schema needed is not known up front and will probably change over time. Services such as Azure Cosmos DB have risen to the challenge to meet this need, providing multi-model, globally distributed, efficient NoSQL databases. In this hands-on lab scenario, you are the DBA for Awesome Company. A new video game is in development that will require a cloud database backend. Your solution will need to have the ability to replicate globally as the game is released to new countries, maintain fast and consistent performance so that there is no game lag, and have guaranteed availability so players can game whenever they want. Performing the actions of this lab will help you become familiar with how to deploy Azure Cosmos DB. **Note:** *It will take a significant amount of time for the deployment to finish. Please allot at least an hour for total lab time.*

Azure icon

Path Info

Clock icon Intermediate
Clock icon 1h 0m
Clock icon Jun 05, 2020

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Log in to the Azure Portal

    Log in to the Azure Portal using the provided credentials.

  2. Challenge

    Create an Azure Cosmos DB Account

    1. Click the three-line menu icon in the top left corner of the page, and click Azure Cosmos DB.
    2. Click Add.
    3. Select the resource group the lab created for you.
    4. Provide an account name (must be unique).
    5. For API, leave it as Core(SQL).
    6. For Apply Free Tier Discount, click Do Not Apply.
    7. For Location, select the region (US) West US.
    8. Leave all the other values at their defaults, and click Review + create.
    9. Verify all is well, and click Create.
    10. Once the deployment is complete, click Go to resource.

    Note: The deployment could take up to 15 minutes. Feel free to carry out other tasks while you wait. Also, at times the deployment screen does not accurately report that it is finished. To mitigate this, check the status on the resource's overview page.

  3. Challenge

    Create the Database and Container

    1. Click on Data Explorer in the left-hand menu.
    2. Click New Container.
    3. Enter the following values:
      • Database id: Players
      • Container id: Profiles
      • Partition key: /team
    4. Leave all other values at their defaults, and click OK.
  4. Challenge

    Add Items to the Database

    1. Expand the Players database, expand Profiles, and click on Items.

    2. Click New Item.

    3. Enter the following text into the document area on the right:

          "id": "1",
          "team": "blue",
          "gamerTag": "Lando Commando",
          "statusMessage": "glhf :)",
          "isOnline": true
    4. Click Save.

    5. Repeat the above steps with the following values:

      • id: 2
      • team: red
      • gamerTag: delmarDB
      • statusMessage: select * from victory
      • isOnline: false
  5. Challenge

    Query the Items

    1. By default, all your items are selected.

    2. Click Edit Filter.

    3. Replace the default query with the following:

      WHERE = 'red'
    4. Notice only our red team member is returned.

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans