Skip to content

Commit

Permalink
Merge pull request #14 from mongodb-developer/improve-instructions
Browse files Browse the repository at this point in the history
Changed sections levels, improved overall installation instructions
  • Loading branch information
dfreniche authored Dec 6, 2024
2 parents 4307680 + 90f953c commit 8991ed8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
17 changes: 10 additions & 7 deletions docs/20-prerequisites/10-postgres.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ import useBaseUrl from '@docusaurus/useBaseUrl';

# 👐 PostgreSQL Database

In this lab you will be migrating data from a PostgreSQL relational database. You have a few options to set up this database.
In this lab you will be migrating data from a PostgreSQL relational database. You have a few options to set up this database. __Choose one option for your PostgreSQL database__.

### Option 1: Use a pre-configured database
## Option 1: Use a pre-configured database

If you are participating in an instructor-led lab, they may have already set up this database for you. Ask your instructor for the
connection URI and credentials.
If you are participating in an instructor-led lab, they may have already set up this database for you. Ask your instructor for the connection URI and credentials.

### Option 2: Load the schema and data into your own PostgreSQL server
:::info
In an intructor-led lab you will use the provisioned PostgreSQL database, no need to do anything else
:::

## Option 2: Load the schema and data into your own PostgreSQL server

If you already have a PostgreSQL server set up, you can import the schema and data used in this lab. Download the file
[1-library-schema-and-data.sql](https://github.com/mongodb-developer/relational-migrator-lab/blob/main/docker/sample-postgres-library/init/1-library-schema-and-data.sql)
file and load it using psql or [pgAdmin](https://www.pgadmin.org/download/).

### Option 3: Run a PostgreSQL container using Docker
## Option 3: Run a PostgreSQL container using Docker

If you don't have an existing PostgreSQL server but have Docker installed, you can easily load a container pre-configured with
PostgreSQL and the sample database:
Expand All @@ -36,7 +39,7 @@ docker run -p 5432:5432 sample-postgres-library
```
The PostgreSQL server can be accessed at localhost:5432 with a username of `postgres` and a password of `postgres`.

### Option 4: Load an SQL file
## Option 4: Load an SQL file
Choose this option if you just want a quick hands-on experience and you don't need to run actual migration.
Download the file [library-schema.sql](https://github.com/mongodb-developer/relational-migrator-lab/blob/main/resource/library-schema.sql)
and upload this file to the Relational Migrator later, at the **create a project** step.
Expand Down
6 changes: 3 additions & 3 deletions docs/20-prerequisites/20-mongodb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
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 1: New MongoDB Atlas cluster
## Option 1: 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.
Expand All @@ -20,12 +20,12 @@ To get yours, follow the instructions on the [Intro Lab:](https://mongodb-develo

Be sure to [open up the cluster to allow connections from your local computer](https://www.mongodb.com/docs/guides/atlas/network-connections/#overview), and configure a database user with the readWriteAnyDatabase role.

### Option 2: Use an existing cluster
## Option 2: 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 3: Run a MongoDB container using Docker
## Option 3: Run a MongoDB container using Docker


If you don't have an existing PostgreSQL server but have Docker installed, you can easily load a container pre-configured with
Expand Down
14 changes: 11 additions & 3 deletions docs/20-prerequisites/30-relational-migrator.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ import useBaseUrl from '@docusaurus/useBaseUrl';

# 👐 MongoDB Relational Migrator

Download and install MongoDB Relational Migrator
Download and install MongoDB Relational Migrator.

Now you will need to go to the [MongoDB Relational Migrator downloads page](https://www.mongodb.com/try/download/relational-migrator), select your OS, download and install it. Once installed,
run it and it will be running on a browser at http://127.0.0.1:8278/.
- Go to the [MongoDB Relational Migrator downloads page](https://www.mongodb.com/try/download/relational-migrator), select your OS and download it
- Install the MongoDB Relational Migrator
- Start it
- It should open a browser at the address http://127.0.0.1:8278/

<Screenshot url="https://www.mongodb.com/products/tools/relational-migrator" src="img/download-relational-migrator.png" alt="Screenshot of the download page for Relational Migrator" />

---

:::info
There are more advanced ways to install the MongoDB Relational Migrator. You can check them out in [the installation docs page](https://www.mongodb.com/docs/relational-migrator/installation/). These won't be covered during this Lab.
:::
2 changes: 1 addition & 1 deletion docs/50-create-project/50-create-new-project.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Screenshot from "@site/src/components/Screenshot";

# 👐 Creating a New Project

Ensure Relational Migrator is installed and running (normally at http://127.0.0.1:8278/).
Ensure Relational Migrator is installed and running (usually at http://127.0.0.1:8278/).



Expand Down

0 comments on commit 8991ed8

Please sign in to comment.