Self-Hosting MongoDB on Google Compute Engine

Lab Steps

lock
Signing In to the Google Cloud Console
lock
Introducing the Lab's MongoDB Cluster Resources
lock
Authenticating gcloud in the Lab's Virtual Machine
lock
Installing MongoDB on the Primary Node
lock
Deploying a MongoDB Replica Set
lock
Using Snapshots to Backup the MongoDB Database

Ready for the real environment experience?

DifficultyIntermediate
Time Limit1h 15m
Students10
Ratings
5/5
starstarstarstarstar

Description

There are tradeoffs involved in deciding whether or not to self-host a database or to leverage a database as a service offering. How much control do you need over the database? Do you have the bandwidth and expertise to deal with self-hosting? These are just a few of the questions to consider. This lab assumes you've made the decision to self-host MongoDB and deploy the database on Google Compute Engine (GCE).

This lab walks you through the process of getting MongoDB up and running on an instance and deploying a MongoDB replica set. Considerations for production workloads are discussed at each phase. The lab also discusses how to leverage Compute Engine's snapshot functionality as part of a sound disaster recovery plan.

Learning Objectives

Upon completion of this intermediate-level lab, you will be able to:

  • Understand the benefits of multiple zone database deployments
  • Install MongoDB on Linux machines
  • Configure and deploy a MongoDB replica set
  • Understand available options for backing up MongoDB data
  • Create Google Compute Engine persistent disk snapshots

Intended Audience

  • Cloud Engineers
  • Database Administrators
  • Anyone interested in self-hosting databases, particularly MongoDB

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • Working with Linux at the command line
  • MongoDB fundamentals

The following content can help to fulfill the prerequisite:

Environment before
PREVIEW
arrow_forward
Environment after
PREVIEW
About the Author
Students136520
Labs205
Courses9
Learning paths41

Logan has been involved in software development and research since 2007 and has been in the cloud since 2012. He is an AWS Certified DevOps Engineer - Professional, AWS Certified Solutions Architect - Professional, Microsoft Certified Azure Solutions Architect Expert, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Security Specialist (CKS), Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), and Certified OpenStack Administrator (COA). He earned his Ph.D. studying design automation and enjoys all things tech.