Skip to main content

Infrastructure as code

You can use various 3rd party tools to manage your XCP-ng/XO stack "as code".

Tool nameEndpointStatusWebsite
Packer XCP-ngXAPIAvailableLink
Packer XOXO APIPlannedPlanned
Terraform XOXO APIAvailableLink
Ansible XOXO APIAvailableLink

📦 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

Terraform is an open-source 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:

🏷️ 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/

🗃️ Netbox

NetBox is the leading solution for modeling and documenting modern networks. By combining the traditional disciplines of IP address management (IPAM) and datacenter infrastructure management (DCIM) with powerful APIs and extensions, NetBox provides the ideal "source of truth" to power network automation. Available as open source software under the Apache 2.0 license, NetBox is employed by thousands of organizations around the world.

You can even integrate a synchronization between Netbox and XCP-ng/XO:

https://xen-orchestra.com/blog/virtops-4-track-any-change-in-your-virtualized-infrastructure/