Skip to content

Packer plugin for provisioning operating systems in KubeVirt VMs.

License

Notifications You must be signed in to change notification settings

pelotech/packer-plugin-kubevirt

Repository files navigation

KubeVirt Packer Plugin

This repository contains the following sections:

Build the plugin

go build .

Local installation of the plugin

packer plugins install --path ./packer-plugin-kubevirt "github.com/pelotech/kubevirt"

Run the plugin

# If needed, the arg '-debug' will pause the process between each step
PACKER_LOG=1 packer build -debug ./example

Running Acceptance Tests

Make sure to build and setup the binary with:

# Build
go build .
# Move binary
cp packer-plugin-kubevirt ~/.packer.d/plugins/packer-plugin-kubevirt # Option 1
packer plugins install --path packer-plugin-kubevirt "github.com/pelotech/kubevirt" # Option 2

Once everything required is set up, run:

PACKER_ACC=1 go test -count 1 -v ./... -timeout=120m

This will run unit tests for all plugins in this set.

Pipeline

  • integration tests (packer running against KinD cluster)
  • release (manual) for any documentation update
  • release (tag event) for the binary