Challenge 01 - Install the Azure DocumentDB migration extension for VS Code and Deploy Azure Document DB

< Previous Challenge - Home - Next Challenge >

Introduction

Now that you’ve gotten your source MongoDB application and database working, you will next be installing the Azure Document DB Migration Extension in Visual Studio Code so that you can migrate the data from your source MongoDB to Azure Document DB in the next challenge. You will also be trying out the Azure DocumentDB extension for VS Code.

Prerequisites

You should have already completed the steps in Challenge 0 to set up your source MongoDB database and the sample application.

Description

First, you will install the Azure DocumentDB Migration extension in Visual Studio Code.

Next, you will deploy Azure Document DB.

NOTE: If you are using GitHub Codespaces, the az login command will use a Device Code to login. If your organization’s Azure policy prevents this, follow these steps first before you run the deployment:

cd infra 
chmod +x deploy-target-db.sh
./deploy-target-db.sh --administratorLogin mflixadmin --administratorPassword <password>

Optional: If you need to, you can specify the resourceGroupName and location as arguments to the deploy-target-db.sh script as follows. Note: It defaults to rg-mflix-documentdb and eastus2 for those, respectively:

cd infra 
chmod +x deploy-target-db.sh
./deploy-target-db.sh --resourceGroupName <your_resource_group_name> --location westus --administratorLogin mflixadmin --administratorPassword <password>

The deployment will take some time. While this is deploying, use the DocumentDB for VS Code extension to connect to your source MongoDB database and explore the data:

Once you’ve connected, explore the collections within the database. You should see:

Open Documents within the movies collection. What do you see?

Success Criteria

To complete this challenge successfully, you should be able to:

Learning Resources