Skip to main content

๐Ÿ‘ Setup

GitHub Codespacesโ€‹

You will be working in GitHub Codespaces throughout this lab. A codespace is a cloud-hosted, containerized development environment that comes pre-configured with all the tools you need to run this lab.

Navigate to this link. You will be prompted to sign into GitHub if you haven't already. Once signed in, click the Create new codespace button to create a new codespace.

Start a codespace

Let it run for a few minutes as it prepares a Docker container with all the required libraries and a MongoDB cluster.

That's it! You're ready for the lab!

caution

During the lab, we will use GitHub Codespaces. The following instructions are here just in case you can't use Codespaces or if you really, really, really want a local installation.

๐Ÿฆน Run this lab locally

1. MongoDB Database

As we'll be importing data from a Relational Database into MongoDB, you'll need to have a MongoDB database. You have a few options to set up this database.

๐Ÿฆธ Option A: New MongoDB Atlas clusterโ€‹

The easiest way to run MongoDB is to use MongoDB Atlas, our cloud-hosted database offering. You can set a MongoDB Atlas account and a free forever M0 Cluster.

To get yours, follow the instructions on the Intro Lab:

Be sure to open up the cluster to allow connections from your local computer, and configure a database user with the readWriteAnyDatabase role.

๐Ÿฆธ Option B: Use an existing clusterโ€‹

If you have an existing MongoDB Atlas, Enterprise or Community cluster, you can use it as the migration target. Make sure you know the URI for the cluster, and have a database user with the readWriteAnyDatabase role.

๐Ÿฆธ Option C: Run a MongoDB container using Dockerโ€‹

If you don't have an existing MongoDB server but have Docker installed, you can easily load a container pre-configured with MongoDB by running the following command:

docker run -p 27017:27017 mongo

This will launch an empty MongoDB community cluster on localhost:27017, suitable to use for this lab. You can connect with no username or password. Since this command does not use Docker volumes, any data will be lost when the container is stopped.

2. MongoDB Relational Migrator

Download and install MongoDB Relational Migrator.

Screenshot of the download page for Relational Migrator

There are more advanced ways to install the MongoDB Relational Migrator. You can check them out in the installation docs page. These won't be covered during this Lab.