Skip to content

krakenhavoc/HomeLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

36 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HomeLab Infrastructure Portfolio

License Terraform Kubernetes Pre-commit

Welcome to my HomeLab infrastructure repository! This repository showcases my personal homelab setup, infrastructure automation, and technical capabilities.

🏠 Overview

This repository contains documentation, diagrams, and code for my homelab environment. It demonstrates my skills in:

  • Network design and architecture
  • Infrastructure as Code (IaC) using Terraform
  • Configuration management with Ansible
  • Kubernetes cluster deployment and orchestration
  • Cloud-init automated provisioning
  • Automation and scripting
  • System administration and DevOps practices

πŸ“° Recent Changes

Kubernetes Cluster Deployment (v0.1)

The latest updates include a full Kubernetes cluster deployment using Terraform and cloud-init:

  • Kubernetes v1.29 cluster with one master and two worker nodes
  • Containerd as the container runtime (following Kubernetes 1.24+ best practices)
  • Calico CNI for pod networking
  • Automated provisioning via cloud-init configuration
  • Terraform modules for VM deployment on Proxmox
  • CI/CD workflows for infrastructure validation

πŸ“ Repository Structure

HomeLab/
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ workflows/               # GitHub Actions CI/CD pipelines
β”‚   └── ISSUE_TEMPLATE/          # Issue templates for bug reports and features
β”œβ”€β”€ docs/                        # Documentation and guides
β”‚   β”œβ”€β”€ overview.md              # Architecture overview
β”‚   β”œβ”€β”€ runbook.md               # Deployment and operations guide
β”‚   β”œβ”€β”€ network-setup.md         # Network configuration
β”‚   β”œβ”€β”€ service-deployment.md    # Service deployment guides
β”‚   β”œβ”€β”€ backup-strategy.md       # Backup procedures
β”‚   └── security.md              # Security guidelines
β”œβ”€β”€ diagrams/                    # Network and infrastructure diagrams
β”‚   β”œβ”€β”€ network/                 # Network topology diagrams
β”‚   └── infrastructure/          # Infrastructure architecture diagrams
β”œβ”€β”€ terraform/                   # Infrastructure as Code (Terraform)
β”‚   β”œβ”€β”€ deployments/             # Deployment configurations
β”‚   β”‚   └── home-lab/            # Home lab deployment (K8s cluster)
β”‚   └── modules/                 # Reusable Terraform modules
β”‚       └── compute/             # Compute resource modules
β”‚           └── pve-cloudinit-vm/  # Proxmox cloud-init VM module
β”œβ”€β”€ ansible/                     # Configuration management
β”‚   β”œβ”€β”€ playbooks/               # Ansible playbooks
β”‚   β”œβ”€β”€ roles/                   # Custom roles
β”‚   └── inventory/               # Inventory files
└── scripts/                     # Utility scripts and automation
    β”œβ”€β”€ backup/                  # Backup scripts
    β”œβ”€β”€ monitoring/              # Monitoring scripts
    └── deployment/              # Deployment automation
        └── cloud-init/          # Cloud-init configurations for K8s

πŸ”§ Technologies Used

  • Virtualization: Proxmox, Docker, Kubernetes
  • Infrastructure as Code: Terraform
  • Configuration Management: Ansible
  • Networking: VLANs, OpnSense, UniFi
  • Monitoring: Prometheus, Grafana
  • Storage: NAS, ZFS
  • Scripting: Bash, Python

πŸš€ Getting Started

Prerequisites

  • Terraform >= 1.14
  • Ansible >= 2.9
  • Python >= 3.8
  • Proxmox VE (for infrastructure deployment)
  • kubectl (for Kubernetes cluster management)
  • Docker (optional, for local testing)

Quick Start

  1. Clone this repository:

    git clone https://github.com/krakenhavoc/HomeLab.git
    cd HomeLab
  2. Review the documentation:

  3. Deploy Kubernetes cluster:

    # Navigate to terraform deployment
    cd terraform/deployments/home-lab
    
    # Initialize Terraform
    terraform init
    
    # Review planned changes
    terraform plan
    
    # Apply configuration
    terraform apply
  4. Access your cluster:

    # SSH to master node
    ssh root@k8s-master-1
    
    # Check cluster status
    kubectl get nodes
    kubectl get pods -A

Docker Example

For local testing and development:

# Run containerized applications
docker run -d -p 8080:80 nginx

Kubernetes Example

Deploy an application to your cluster:

# Create a deployment
kubectl create deployment nginx --image=nginx

# Expose the deployment
kubectl expose deployment nginx --port=80 --type=NodePort

# Check the service
kubectl get services

πŸ“Š Infrastructure Components

Network Infrastructure

  • Core network topology with VLAN segmentation
  • Firewall rules and security policies (OpnSense)
  • DNS and DHCP configuration
  • UniFi network management

Compute Resources

  • Proxmox VE hypervisor for virtualization
  • Kubernetes cluster (1 master + 2 worker nodes)
    • Containerd runtime
    • Calico CNI networking
    • Cloud-init automated provisioning
  • Virtual machine templates and configurations
  • Resource allocation and auto-scaling

Services

  • Kubernetes workloads (microservices, applications)
  • Media servers (Plex, Jellyfin)
  • Development environments
  • Monitoring stack (Prometheus, Grafana)
  • Logging and observability
  • Backup and disaster recovery solutions

πŸ“– Documentation

Detailed documentation for each component can be found in the docs/ directory:

🌐 Supported Platforms

  • Hypervisor: Proxmox VE 7.x+
  • Operating Systems: Ubuntu 22.04 LTS (cloud-init images)
  • Container Runtime: Containerd 1.6+
  • Kubernetes: v1.29
  • Terraform: 1.0+
  • Ansible: 2.9+

πŸ’» Language Composition

  • HCL (Terraform) - Infrastructure as Code
  • YAML - Cloud-init configurations, Kubernetes manifests, Ansible playbooks
  • Bash - Automation scripts
  • Python - Utility scripts and tooling
  • Markdown - Documentation

πŸ” Security & Best Practices

  • Secrets are managed using environment variables and secure vaults
  • No sensitive credentials are stored in this repository
  • Infrastructure follows the principle of least privilege
  • Regular security updates and patch management

πŸ“ˆ Future Enhancements

  • Implement GitOps workflows (ArgoCD/Flux)
  • Expand CI/CD pipelines for automated testing
  • Add Helm charts for application deployments
  • Enhance monitoring with custom dashboards
  • Implement log aggregation (ELK/Loki)
  • Automated disaster recovery procedures
  • Service mesh integration (Istio/Linkerd)

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Code of conduct
  • Development workflow
  • Pull request process
  • Code style guidelines

To report bugs or request features, please use our issue templates.

πŸ“‹ Changelog

See CHANGELOG.md for a detailed history of changes and releases.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

This project is for portfolio and educational purposes.

πŸ‘€ Maintainer

krakenhavoc

πŸ“§ Contact

For questions, suggestions, or collaboration opportunities:


⭐ Star this repository if you find it helpful or interesting!

This repository is actively maintained and regularly updated with new features and improvements.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors