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.
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.
- Talos Linux
- Proxmox
- OpenTofu
- Flux
- bpg/terraform-proxmox-provider
- integrations/terraform-provider-github
- fluxcd/terraform-provider-flux
- siderolabs/terraform-provider-talos
This is just TL;DR explanation on how to install the project. For more information visit docs.
-
Install OpenTofu (recommended) or Terraform.
-
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
-
Get a GitHub PAT. You can find a guide here.
-
Create terraform.tfvars:
cp terraform.tfvars.example terraform.tfvars
-
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 }
-
Plan and apply:
tofu plan tofy apply
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.
- 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).
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See MIT License for more information.
- VK: @hiimluck3r
- Telegram Channel: @imluck3r