Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jetstream2 MongoDB Virtualization Project

This project demonstrates how to set up a MongoDB instance using Docker on Jetstream2, ingest a real-world airport dataset using Python, and perform sample queries through PyMongo.

📦 Contents

  • upload_to_mongo_full.py: Python script to ingest data into MongoDB and perform queries.
  • Screenshots: MongoDB status, data insertion confirmation, query outputs.
  • Report (optional): Summarizes methodology, results, and challenges.

🔧 Technologies Used

  • MongoDB 6.0 (via Docker)
  • Jetstream2 (virtual machines)
  • Python 3.12
  • PyMongo, Pandas
  • Ubuntu 22.04

🚀 Setup Instructions

1. Launch Jetstream2 Instances

  • Create two VMs on Jetstream2: mongo-vm (for MongoDB) and analyticsinstance (for data processing).
  • Use Ubuntu 22.04 as the base image.

2. On mongo-vm

sudo apt update
sudo apt install -y docker.io
sudo systemctl start docker
sudo docker run -d -p 27017:27017 --name mongodb mongo:6.0

3. On analyticsinstance

sudo apt update
sudo apt install -y python3-pip
python3 -m venv venv
source venv/bin/activate
pip install pandas pymongo

Download dataset and Python file:

wget https://raw.githubusercontent.com/jpatokal/openflights/master/data/airports.dat -O airports.csv

Then run:

python upload_to_mongo_full.py

4. Sample Queries (in script)

  • Count records
  • Filter by country, altitude, timezone
  • Aggregate by country
  • Regex match on name

📎 References

About

A Jetstream2-based project that demonstrates the setup of a NoSQL MongoDB instance using Docker and the ingestion of airport data via Python. Includes cloud VM setup, data pipeline, PyMongo queries, and sample outputs.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages