Infrastructure as code
You can use various 3rd party tools to manage your XCP-ng/XO stack "as code".
| Tool name | Endpoint | Status | Website |
|---|---|---|---|
| Packer XCP-ng | XAPI | Available | Link |
| Packer XO | XO API | Planned | Planned |
| Terraform XO | XO API | Available | Link |
| Ansible XO | XO API | Available | Link |
📦 Packer
Packer is a free and open source tool for creating golden images for multiple platforms from a single source configuration. Combined with XCP-ng, you can create and regenerate templates for your own requirements or for your customers.
Here is a tutorial to start with Packer and XCP-ng: https://xcp-ng.org/blog/2024/02/22/using-packer-with-xcp-ng/
🌍 Terraform / OpenTofu
Terraform is an infrastructure as code software tool that enables you to safely and predictably create, change, and improve infrastructure. There's a series of blog posts to explain it in more details:
- https://xen-orchestra.com/blog/virtops1-xen-orchestra-terraform-provider/
- https://xen-orchestra.com/blog/managing-existing-infrastructure-with-terraform-2/
While Terraform used to be free and open-source, Hashicorp decided to relicense it. There is a free and open source fork called OpenTofu which can use Terraform's providers, though!
🏷️ Ansible
Ansible is a suite of software tools that enables infrastructure as code. It is open-source and the suite includes software provisioning, configuration management, and application deployment functionality
https://xen-orchestra.com/blog/virtops3-ansible-with-xen-orchestra/