proxmox
Automate Homelab Deployment With Terraform & Proxmox
Automate Homelab Deployment With Terraform & Proxmox
#Automate #Homelab #Deployment #Terraform #Proxmox
“Jim’s Garage”
Terraform is a powerform ‘infrastructure as code’ tool to automate deployments. In this video I use it to create VMs in Proxmox ready for a Kubernetes or Docker Swarm cluster.
Examples…
source
To see the full content, share this page by clicking one of the buttons below |
Thanks Jim, your clear and concise explanations of complex subject matter are some of the best – I’ve learnt so much from your videos !
As always great tutorial. Thanks 💯
Awesome video! I am actually working on the exact same project and I’m using your script as input to provision the cluster with a few tweaks
The only thing I added into the process is packer. I preinstall packages for my K3s-ansible controller and I export the public SSH key onto a share during building the cloud init image. I also use the ansible server as my terraform and packer builder server. Just a bit of a chicken and egg problem.
For my K3s nodes I inject this public ssh key and create the ansible user in the packer image.
Once all done my ansible machine can immediately connect to all K3s nodes and start building the cluster.
Still a work in progress but it’s super nice you are doing exactly what I’m working on and your videos are extremely useful
Speaking for terraformation, if you moved out of the garage to, say, a loft studio… would you then be known as Jim’s Loft?
Thanks Jim, I appreciate your videos a lot. btw it would be interesting to look into Ansible dynamic inventories for your next videos.
Not all heroes wear capes. Thank you Jim!
Can we talk about the elephant in the room here, that is Hashicorp and the new terraform licence? OpenTofu is definatrly the way forward in theory you should just be able to drop in OpenTofu and carry on the same with terraform.
The provider by bpg works like a charm as has been up-to-date ever since, compared to Telmate's. It also has resources & data sources for everything, starting from basic settings like the keyboard layout of Proxmox itself to firewall rules. Of course VMs & CTs are supported as well 😄 Telmate supports… 2.
I can only recommend it, but sadly many users are being fouled by GitHub stars and other useless metrics.
You can Just as easy use ansible playbooks to spin up multiple vm's.
I hope that Talmate project gets legs under it and grows. It would be nice in a Proxmox cluster to be able to assign these VMs to various nodes in the deploy. eg three Proxmox nodes, this would then build a master and x workers per Proxmox node.
I wonder if there is a provider for iDRAC7, could get real close to metal then. get three new dell servers, use Terraform to update them, provision disks, install Proxmox, setup the cluster, and CEPH; this run this to provision the VMs
to be fair, Terraform and Terrifying sound very similar.
You should try the bpg/proxmox provider instead of the telmate one, as it supports many more features. I also recently investigated Terraform on proxmox and I'm glad I found bpg's provider. It provides a wide range of resources and data sources for managing VMs, firewalls, files (VM images, snippets), etc., so you can configure your entire proxmox infrastructure in Terraform. One particularly useful feature is the ability to upload custom cloud-init snippets that I used to deploy scripts that set up my k3s cluster. Also, I found that bpg works more stable for me when I tried the telmate's provider I encountered a few times race conditions on the disk setup step that failed the terrafom apply command.
Great video! video suggestion- how to secure VMs/K8s clusters and use of tools like Wazuh etc…
my OCD would not handle the non-sequential VM IDs vs node names…great work as always
nice, will have a look at the repo
This is awesome! I'm looking forward to using it. Thanks Jim!
Thanks James. I tried telmate but it did not worked. I using now bpg provider and test the same. It will provision the required number of machines and create the host file for anisble then ansible will provision the k3s cluster with metallb. testing now longhorn and other apps provisioning. Thanks again for such informative videos
Didnt you leak your api tokens at 9:00 and a bit before when viewing providers config?
And maybe the time packer from hasicorp?
Terraform bad OpenTofu cool!