Install MongoDB with Persistent Volumes

Lab Steps

Logging in to the Amazon Web Services Console
Connecting to the Virtual Machine using SSH
Format and Mount Persistent Data Volumes
Install MongoDB
Connect to MongoDB Service

Ready for the real environment experience?

DifficultyBeginner
Max Duration1h 30m
Students57
Ratings
3.6/5

Description

Lab Overview

MongoDB is an extremely popular cross-platform document-oriented database.

This Lab is designed to show you how to install MongoDB with persistent data volumes on a Linux based EC2 instance within AWS.

Lab Objectives

Upon completion of this Lab, you will be able to:

  • Install and configure MongoDB on Amazon 2 Linux with persistent EBS based volumes
  • Use the mongo client command to connect to the MongoDB service and create and query data
  • Prepare and format an XFS based filesystem using the mkfs.xfs command
  • Mount filesystems

You should:

  • Be comfortable with using an SSH based terminal session

Lab Environment

This Lab will start with the following AWS resources provisioned automatically for you:

  • A single EC2 instance, named mongodb.server.instance, which will have a public IP address attached. This will be the instance that you will connect to using SSH, to setup and install MongoDB.

To achieve the Lab end state, you will be walked through the process of:

  • Using your local terminal or SSH client to remotely connect to mongodb.server.instance
  • Format and prepare persistent disk volumes for the /data, /log, and /journal directories used by MongoDB
  • Install and configure the MongoDB service
  • Use the mongo client command to connect to the MongoDB service and create and query data

 

About the Author

Students10923
Labs28
Courses65
Learning paths15

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.