-
Feature
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
Product / Portfolio Work
-
False
-
-
False
-
Not Selected
-
0% To Do, 50% In Progress, 50% Done
Feature Overview
Provisioning VMs each time after booting consumes lots of time and efforts, usually golden images are provided to users.
OpenShift Virtualization integration with OpenShift Pipelines (Tekton) provides a cloud-native way to create golden images [1] [2].
Packer is a tool to create and manage VM images across multiple Virtualization platforms. Packer capabilities should be extended
to support OpenShift Virtualization as well.
[2] https://www.redhat.com/en/blog/building-vm-images-using-tekton-and-secrets
Goals
Deliver a Packer plugin as an official commercialized product with full enterprise support in collaboration with HashiCorp:
- Users will be able to automate and manage VM image creation using OpenShift Virtualization VMs
- Users can create golden images in an OpenShift cluster
- Users will be able to receive enterprise support after release from and by HashiCorp
Requirements
MVP Requirements | Included | Notes |
---|---|---|
Create golden images in the OpenShift cluster using KubeVirt ISO builder | Yes | N/A |
Capable of receiving support from HashiCorp | No | N/A |
The installation media (ISO) can be utilized from a DV/PVC within the cluster | Yes | ISO DataVolume is uploaded by the user to the cluster. |
Media files can be utilized to automate the ISO installation (like autounattend.xml and kickstart.cfg files) | Yes | N/A |
The installation can be controlled by using a set of boot commands (using Packer’s built-in functionality) | Yes | N/A |
The provisioner will use SSH or WinRM communicator (both should be implemented) | Yes | N/A |
The Ansible provisioner and Powershell provisioner should be tested and verified | Yes | N/A |
The result is a golden image, but NOT a VM template | Yes | Currently it's just a DataVolume and DataSource. |
Use Cases
How will the user interact with this feature?
The user will run Packer build by providing this (an example will be provided as well):
- Packer template (e.g. "rhel.pkr.hcl")
- ISO installation uploaded to the PVC by virtctl or imported by DataVolume's URL
- Media file to automate the ISO installation (like an autounattend.xml or kickstart.cfg)
- Export a variable "KUBECONFIG" to access the OpenShift cluster
- An already installed Packer binary
Packer tool will be triggered on the command line outside the OpenShift cluster (could be also CI/CD pipeline if needed).
The result of the Packer's execution (kubevirt-iso) will be a bootable volume, which can be used to create new VMs from InstanceTypes in the cluster.
Which users will use this and when will they use it?
Cluster or non-cluster administrators wants to provide a consistent flow of golden images across multiple clusters (in any cloud providers).
Out of Scope
- Managing the installation media (ISO)
- Creating VM template
- Sharing the resulting golden image across multiple clusters
- Using Packer's internal web server to copy files from the host to the VM
Background, and strategic fit
During migration to OpenShift Virtualization, it's important for our customers to keep using the existing Packer tooling and workflows to keep the learning curve small.
Assumptions
- The ISO installation media is already available in the cluster
- The user has a kubeconfig file to access to the cluster
- The user has a required setup to install the plugin and run Packer build
Customer Considerations
- Packer plugin should create RHEL and Windows VM images in the OpenShift cluster
Documentation Considerations
The documentation should be provided in a manner consistent with the other Packer plugins, but a Red Hat blog post would be helpful.
User Experience Considerations
No UXD support needed, as this is CLI focused.