updated the main readme and added vagrant
This commit is contained in:
16
README.md
16
README.md
@@ -9,7 +9,10 @@ A self-hosted homelab running on Docker Compose, built and maintained on an Ubun
|
|||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
@@ -47,6 +50,7 @@ Not everything in this repo runs permanently. Some folders are kept purely as re
|
|||||||
| Lab | Folder | Purpose |
|
| Lab | Folder | Purpose |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| **Elastic Stack (ELK)** | `docker-compose/elk/` | Elasticsearch + Kibana, security-enabled, sized for this hardware — a modern-workflow (Elastic Agent/Fleet) alternative to an older Filebeat/Metricbeat-based course reference. Not run continuously since Loki now covers centralized logging here — see [Elastic Stack (ELK)](docs/ElasticStack.md) |
|
| **Elastic Stack (ELK)** | `docker-compose/elk/` | Elasticsearch + Kibana, security-enabled, sized for this hardware — a modern-workflow (Elastic Agent/Fleet) alternative to an older Filebeat/Metricbeat-based course reference. Not run continuously since Loki now covers centralized logging here — see [Elastic Stack (ELK)](docs/ElasticStack.md) |
|
||||||
|
| **Vagrant test VM** | `docker-compose/vagrant/` | Disposable Debian 12 VirtualBox VM (`bento/debian-12`) on a private-network IP, for testing provisioning scripts and configuration changes before touching the real host |
|
||||||
|
|
||||||
## Repository structure
|
## Repository structure
|
||||||
|
|
||||||
@@ -111,9 +115,13 @@ homelab/
|
|||||||
│ │ │ └── Dockerfile
|
│ │ │ └── Dockerfile
|
||||||
│ │ └── backups/
|
│ │ └── backups/
|
||||||
│ │ └── gitlab-backup.sh
|
│ │ └── gitlab-backup.sh
|
||||||
│ └── elk/
|
│ ├── elk/
|
||||||
│ ├── docker-compose.yml
|
│ │ ├── docker-compose.yml
|
||||||
│ └── .env.example
|
│ │ └── .env.example
|
||||||
|
│ └── vagrant/
|
||||||
|
│ ├── Vagrantfile
|
||||||
|
│ ├── bootstrap.sh
|
||||||
|
│ └── README.md
|
||||||
├── ansible/
|
├── ansible/
|
||||||
│ └── playbooks/
|
│ └── playbooks/
|
||||||
│ ├── roles/
|
│ ├── roles/
|
||||||
|
|||||||
34
vagrant/README.md
Normal file
34
vagrant/README.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# Vagrant Test VM
|
||||||
|
|
||||||
|
A disposable VirtualBox VM for trying out provisioning scripts and configuration changes before running them against the real host — mistakes here cost a `vagrant destroy`, not a broken production service.
|
||||||
|
|
||||||
|
## What it creates
|
||||||
|
|
||||||
|
- **Box:** `bento/debian-12`
|
||||||
|
- **Hostname:** `test`
|
||||||
|
- **Network:** private network, static IP `192.168.56.10` — reachable from the host but isolated from the rest of the LAN
|
||||||
|
- **Resources:** 1 vCPU, 1024 MB RAM — enough to exercise a bootstrap script or a small playbook run, not meant to run real workloads
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```bash
|
||||||
|
vagrant up # create and provision the VM
|
||||||
|
vagrant ssh # log in
|
||||||
|
vagrant provision # re-run bootstrap.sh against a VM that's already up
|
||||||
|
vagrant destroy # tear it down completely
|
||||||
|
```
|
||||||
|
|
||||||
|
## `bootstrap.sh`
|
||||||
|
|
||||||
|
Runs automatically on `vagrant up` via Vagrant's shell provisioner. Currently:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
apt-get update
|
||||||
|
sudo apt install -y vim iptables-persistent bash-completion
|
||||||
|
```
|
||||||
|
|
||||||
|
Baseline packages for a usable shell environment — `iptables-persistent` in particular anticipates using this VM to test firewall rule changes without risking the real host's `iptables` state.
|
||||||
|
|
||||||
|
## Why this exists
|
||||||
|
|
||||||
|
Testing changes directly on the host (or worse, in production containers) means a bad `iptables` rule or a broken package install has real consequences. This VM gives a throwaway Debian environment matching the host's OS family, so provisioning changes — Ansible playbook edits, install scripts, firewall rules — get a dry run first. `vagrant destroy && vagrant up` resets to a clean slate in a couple of minutes.
|
||||||
16
vagrant/Vagrantfile
vendored
Normal file
16
vagrant/Vagrantfile
vendored
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
IMAGE_Debian_12 = "bento/debian-12"
|
||||||
|
|
||||||
|
Vagrant.configure("2") do |config|
|
||||||
|
config.vm.box = IMAGE_Debian_12
|
||||||
|
config.vm.box_check_update = false
|
||||||
|
|
||||||
|
config.vm.hostname = "test"
|
||||||
|
|
||||||
|
config.vm.network "private_network", ip: "192.168.56.10"
|
||||||
|
|
||||||
|
config.vm.provider "virtualbox" do |vb|
|
||||||
|
vb.name = "my_vm"
|
||||||
|
vb.memory = 1024
|
||||||
|
vb.cpus = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
5
vagrant/bootstrap.sh
Normal file
5
vagrant/bootstrap.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# update and upgrade os
|
||||||
|
apt-get update
|
||||||
|
sudo apt install -y vim iptables-persistent bash-completion
|
||||||
|
#apt-get upgrade -y
|
||||||
Reference in New Issue
Block a user