Skip to content

hiimluck3r/h3m

Repository files navigation


Logo

h3m

It's like h2m, but better

Explore the docs »

About The Project

This project is basically my homelab, which I'm going to use for a while (I think so... I hope so).

The first iteration was called h2m ("hiim", "host to machine", etc), since this is a newer version, I just added 1. The name doesn't make any sense.

Built With

In order to be as efficient (and fancy) as possible, I decided to switch from k3s to Talos Linux, and replaced the bulky deployment using Ansible with OpenTofu followed by FluxCD. GitOps is cool.

Getting Started

This is just TL;DR explanation on how to install the project. For more information visit docs.

Prerequisites

  1. Install OpenTofu (recommended) or Terraform.

  2. Clone the repository:

    git clone https://github.com/hiimluck3r/h3m

    Or if you're so brave to use unstable dev build:

    git clone -b dev https://github.com/hiimluck3r/h3m

    Then initialize OpenTofu/Terraform with:

    tofu init

    or

    terraform init

Configuration and Installation

  1. Get a GitHub PAT. You can find a guide here.

  2. Create terraform.tfvars:

    cp terraform.tfvars.example terraform.tfvars
  3. Enter your information into .tfvars file:

    proxmox_user = "root@pam"
    proxmox_password = "12345678"
    proxmox_endpoint = "https://your_proxmox_endpoint:8006/"
    
    github_owner = "YOURNAME"
    github_pat = "github_pat_token"
    github_repository = {
      name = "h3m-flux"
      description = "Homelab built with Talos on Proxmox and managed with Flux"
      visibility = "private"
    }
    
    cluster_autostart = true
    cluster_endpoint = "192.168.0.10"
    cluster_name = "talos-proxmox-cluster"
    
    node_name = "pve"
    default_bridge = "vmbr0"
    cidr = "192.168.0.20/29" #may be used in initialization of the vm instead of dhcp
    gateway = "192.168.0.1" #may be used in initialization of the vm instead of dhcp
    
    image_storage = "local"
    image_type = "iso" #please use images with qemu, otherwise you'll have to manually cleanup this badness and collect ip addresses
    talos_image_url = "https://factory.talos.dev/image/ce4c980550dd2ab1b17bbf2b08801c7eb86318eafe8f279833297925d67c7515/v1.7.0/nocloud-amd64.iso"
    talos_flavor = "factory.talos.dev/installer/ce4c980550dd2ab1b17bbf2b08801c7eb86318eafe8f279833297925d67c7515:v1.7.0"
    
    disk_config = {
      datastore_id = "local-zfs"
      interface = "scsi0"
      iothread = false
      discard = "on"
    }
    
    master_config = {
      count = 3
      cpus = 2
      sockets = 1
      memory = 4096
      disk_size = 20
    }
    
    worker_config = {
      count = 2
      cpus = 2
      sockets = 1
      memory = 4096
      disk_size = 20
    }
  4. Plan and apply:

    tofu plan
    tofy apply

Usage

Usually the cluster takes about 10 minutes to load. You can get talosconfig and kubeconfig in the "configs/" directory in the root of the project.

Roadmap

  • Provide understandable documentation
  • Provide more examples for cluster-examples
  • Provide an external repository with a list of app and deployments that I use

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See MIT License for more information.

Contact

About

Homelab built with OpenTofu, Talos, FluxCD and Proxmox

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages