Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

First-Vagrant-Project

A hands-on DevOps learning project: Building a reproducible development environment using Vagrant and VirtualBox.

Overview

This project demonstrates a core DevOps principle: environment parity. The Vagrantfile configures a development environment that mirrors production, eliminating the "it works on my machine" problem.

What You Get

Ubuntu 22.04 LTS — matches production
2 CPU cores + 2GB RAM — realistic workload capacity
Port forwarding — access services at localhost:8000
Shared folders — live code sync between Windows and VM
Reproducible setup — one command for everyone on the team

Prerequisites

Quick Start

1. Clone the repository

git clone https://github.com/AgentPierre/First-Vagrant-Project.git
cd First-Vagrant-Project

2. Start the VM

vagrant up

This downloads the Ubuntu 22.04 box and boots the VM. First run takes 2-5 minutes.

3. SSH into the VM

vagrant ssh

You're now inside Ubuntu. Your project files are at /vagrant.

4. Verify the setup

Inside the VM:

# Check CPU cores
nproc

# Check available memory
free -h

# Navigate to shared folder
cd /vagrant
ls -la

Common Commands

vagrant up        # Start the VM
vagrant ssh       # Connect via SSH
vagrant halt      # Pause the VM
vagrant destroy   # Delete the VM (recreate with vagrant up)
vagrant status    # Check VM status

Vagrantfile Breakdown

  • Box: ubuntu/jammy64 — Ubuntu 22.04 LTS, 64-bit
  • Memory: 2048 MB (2 GB)
  • CPUs: 2 cores
  • Port Forwarding: Guest 8000 → Host 8000 (for web apps)
  • Shared Folder: Current directory synced to /vagrant in VM

Learning Notes

This project was built while completing Ben Lambert's Cloud Academy course. Key learnings:

  • Environment parity matters — Dev and production should match to prevent environment-specific bugs
  • Timeouts are infrastructure constraints — Vagrant's boot timeout isn't just about OS startup; it's about SSH communication
  • Configuration as code — One Vagrantfile = identical setup for everyone
  • Interactive learning — This Vagrantfile was designed through prompt-engineered Claude guides

Next Steps

  • Add Ansible provisioning to automate software installation
  • Integrate with CI/CD pipeline
  • Explore Terraform for IaC at scale

Resources

License

This project is for learning purposes.

About

Development environment setup using Vagrant and VirtualBox. Ubuntu 22.04 LTS configuration for DevOps learning.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors