Hello!
I want to share a small home project I’ve been working on for the past few months. I was looking for solutions for a certain implementation for packer and ansible on the forum, but I couldn’t find it here or in any GitHub repos.
I used Packer for template creation because it gives a granular control over creating templates compared to qm. I used Cloud-Init and Cloudbase with ISO mounting to create templates for Ubuntu Server and Desktop 24.04, as well as Windows 10 and Windows 2019. It’s pretty straightforward to adapt this setup for other OS versions as well. I’m deploying the templates with Ansible, which makes it easy to scale the way I’ve built it.
After testing a few different tools, I chose Kestra as the main automation layer. It has a lot of benefits compared to other solutions I tried, although it took me more than a month to test, understand and play with other solutions.
Basically, you create the templates, deploy VMs, and remove them as needed. The setup includes a static file that’s dynamically updated with hardcoded VM IDs, so you know exactly what to delete to clean up. There’s also a playbook to provision hosts after VM creation, allowing you to set up an entire infrastructure. With Kestra, you can create a topology that handles template creation, deployment, and provisioning in a single flow, with tasks running sequentially or in parallel. So this is a skeleton that can be used to build more complex setups and doesn't require a lot of user interaction. All the plugins needed for ansible or packer are downloaded within kestra container that is defined on the host you run.
The main reasons I created this were for reusability and ease of use in different use cases.
To deploy: have the ISOs for the templates ubuntu 24.04 server/desktop, win2019,win10x64 quemu agent, have a host in your network that can reach proxmox, docker and docker composer and edit the creds for your proxmox.
I hope this helps someone!
https://github.com/fansec/proxmox_dev
I want to share a small home project I’ve been working on for the past few months. I was looking for solutions for a certain implementation for packer and ansible on the forum, but I couldn’t find it here or in any GitHub repos.
I used Packer for template creation because it gives a granular control over creating templates compared to qm. I used Cloud-Init and Cloudbase with ISO mounting to create templates for Ubuntu Server and Desktop 24.04, as well as Windows 10 and Windows 2019. It’s pretty straightforward to adapt this setup for other OS versions as well. I’m deploying the templates with Ansible, which makes it easy to scale the way I’ve built it.
After testing a few different tools, I chose Kestra as the main automation layer. It has a lot of benefits compared to other solutions I tried, although it took me more than a month to test, understand and play with other solutions.
Basically, you create the templates, deploy VMs, and remove them as needed. The setup includes a static file that’s dynamically updated with hardcoded VM IDs, so you know exactly what to delete to clean up. There’s also a playbook to provision hosts after VM creation, allowing you to set up an entire infrastructure. With Kestra, you can create a topology that handles template creation, deployment, and provisioning in a single flow, with tasks running sequentially or in parallel. So this is a skeleton that can be used to build more complex setups and doesn't require a lot of user interaction. All the plugins needed for ansible or packer are downloaded within kestra container that is defined on the host you run.
The main reasons I created this were for reusability and ease of use in different use cases.
To deploy: have the ISOs for the templates ubuntu 24.04 server/desktop, win2019,win10x64 quemu agent, have a host in your network that can reach proxmox, docker and docker composer and edit the creds for your proxmox.
I hope this helps someone!
https://github.com/fansec/proxmox_dev