Skip to content

Feature/lab5#1110

Open
BearAx wants to merge 2 commits into
inno-devops-labs:mainfrom
BearAx:feature/lab5
Open

Feature/lab5#1110
BearAx wants to merge 2 commits into
inno-devops-labs:mainfrom
BearAx:feature/lab5

Conversation

@BearAx

@BearAx BearAx commented Jun 17, 2026

Copy link
Copy Markdown

Goal

Complete Lab 5 by running QuickNotes inside a reproducible Vagrant VM, validating service access from both the VM and host, practicing snapshot recovery, and documenting the VM-vs-container bonus comparison.

Changes

  • Added submissions/lab5.md

  • Added a Vagrantfile for running QuickNotes inside an Ubuntu 22.04 Vagrant VM

  • Configured the VM with:

    • generic/ubuntu2204 base box
    • VirtualBox provider
    • 2 CPUs and 1024 MB RAM
    • forwarded port 127.0.0.1:18080 → guest :8080
    • synced ./app folder mounted at /opt/quicknotes/app
  • Added shell provisioning to:

    • install required packages
    • install pinned Go 1.24.5
    • build the QuickNotes binary
    • create and enable a quicknotes.service systemd unit
  • Documented vagrant up, vagrant validate, VM health checks, host forwarded-port checks, and systemd service status

  • Completed the snapshot task by saving, breaking, restoring, and revalidating the VM

  • Added answers to the Vagrant networking, synced folder, provisioning, Go version pinning, and snapshot design questions

  • Completed the bonus comparison between the Vagrant VM and a Docker container

Testing

  • Validated the Vagrantfile with vagrant validate
  • Brought up the VM with vagrant up
  • Verified Go inside the VM with vagrant ssh -c 'go version'
  • Verified QuickNotes health inside the VM with:
vagrant ssh -c 'curl -s http://localhost:8080/health'
  • Verified QuickNotes health from the host through the forwarded port with:
curl -s http://localhost:18080/health
  • Verified the systemd service with:
vagrant ssh -c 'systemctl --no-pager --full status quicknotes.service | sed -n "1,8p"'
  • Saved a clean VM snapshot with vagrant snapshot save quicknotes-clean
  • Broke the VM by moving /usr/local/go away
  • Confirmed the breakage with go: command not found
  • Restored the VM snapshot and confirmed that Go and QuickNotes recovered successfully
  • Compared VM and Docker startup time, idle RAM, disk size, and process count for the bonus task

Checklist

  • Title is a clear sentence
  • Commits are signed
  • Vagrantfile added
  • submissions/lab5.md updated
  • VM boots successfully
  • QuickNotes runs inside the VM
  • Host-to-guest port forwarding works
  • quicknotes.service is enabled and running
  • Snapshot save/break/restore flow documented
  • Snapshot design questions answered
  • Bonus VM-vs-Docker comparison included

BearAx added 2 commits June 17, 2026 14:41
Signed-off-by: BearAx <medvedguk@gmail.com>
Signed-off-by: BearAx <medvedguk@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant