Skip to content
l3commercePublic

About

Representation of a cloud using Vagrant

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

Repository files navigation

HomeCloud Infrastructure

A modular, automated local cloud environment orchestrated via Vagrant and provisioned using Ansible running inside a containerized environment. This project sets up an isolated multi-node virtual infrastructure for local hosting, CI/CD, and monitoring.

Architecture & Topology

The environment deploys 5 virtual machines via VirtualBox, each configured with specific roles and static IP addresses within the 192.168.56.0/24 subnet:

Hostname IP Address Specs Primary Role
proxy-dns 192.168.56.11 1 vCPU / 1GB RAM Nginx Reverse Proxy, Wildcard SSL, Dnsmasq (*.homecloud)
monitor 192.168.56.12 2 vCPU / 2GB RAM Docker-Monitor stack (Grafana / Prometheus metrics aggregator)
git-cicd 192.168.56.13 1 vCPU / 1GB RAM Gitea instance for version control and CI/CD pipelines
stage 192.168.56.14 2 vCPU / 2GB RAM Staging environment running Docker-LEMP stack
production 192.168.56.15 2 vCPU / 2GB RAM Production environment running Docker-LEMP stack

Project Structure

homecloud/
├── ansible/
│   ├── inventory/
│   │   └── hosts.ini
│   └── playbooks/
│       ├── docker.yml
│       ├── git.yml
│       ├── grafana.yml
│       ├── lemp.yml
│       ├── node-exporter.yml
│       └── proxy-dns.yml
├── docker-compose.yml
├── LICENSE.md
├── Makefile
├── README.md
├── ssh/              # Auto-generated SSH keys for cluster communication
└── Vagrantfile

Prerequisites

Ensure the following tools are installed on your host machine:

  • VirtualBox (v6.x or v7.x)
  • Vagrant (v2.2+)
  • Docker & Docker Compose plugin (used to run the containerized Ansible execution environment)

Getting Started

  • Spin up the InfrastructureBring up all Vagrant virtual machines. The Vagrantfile automatically generates local SSH keys and provisions authorized keys for secure access:
vagrant up
  • Verify Ansible ConnectivityTest the containerized Ansible setup and verify inventory communication:
make test-ansible
make list-hosts

Provisioning Playbooks

All configuration management is driven through modular Ansible playbooks executed via the containerized runner Makefile commands.Available Make Targets

  • make run-docker — Installs Docker Engine, CLI, Containerd, and the Docker Compose plugin on all target servers. Also adds the vagrant user to the docker group.
  • make run-proxy — Deploys the infrastructure node (proxy-dns) with a wildcard self-signed SSL certificate (*.homecloud), configures dnsmasq for local wildcard domain resolution, disables conflicting stub listeners, and launches the Nginx reverse proxy routing traffic to Gitea and Grafana.
  • make run-git — Deploys self-hosted Gitea on the git-cicd node (192.168.56.13:3000).
  • make run-grafana — Deploys the monitoring aggregator stack on the monitor node and dynamically configures Prometheus targets for all cluster nodes.
  • make run-lemp — Clones and launches the Docker-LEMP stack on both staging and production environments.
  • make run-node-ex (executed via playbooks) — Installs and configures Prometheus Node Exporter as a systemd service across all monitoring targets on port 9100.

About

Representation of a cloud using Vagrant

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages