kubevirt-tekton-tasks

module
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: Apache-2.0

README

Artifact Hub Artifact Hub

KubeVirt Tekton Tasks

Tekton Pipelines are CI/CD-style pipelines for Kubernetes. This repository provides KubeVirt-specific Tekton tasks, which focus on:

  • Creating and managing resources (VMs, DataVolumes, DataSources)
  • Executing commands in VMs
  • Manipulating disk images with libguestfs tools

Deployment

In order to install the KubeVirt Tekton tasks in the active namespace you need to apply the following manifest. You have to repeat this for every namespace in which you'd like to run the tasks.

VERSION=$(curl -s https://api.github.com/repos/kubevirt/kubevirt-tekton-tasks/releases | \
            jq '.[] | select(.prerelease==false) | .tag_name' | sort -V | tail -n1 | tr -d '"')
kubectl apply -f "https://github.com/kubevirt/kubevirt-tekton-tasks/releases/download/${VERSION}/kubevirt-tekton-tasks.yaml"

Visit RBAC permissions for running the tasks if the pipeline needs to create/access resources (VMs, PVCs, etc.) in a different namespace other than the one the pipeline runs in.

Usage

Create Virtual Machines
Utilize Templates
Modify data objects
Generate SSH Keys
Execute Commands in Virtual Machines
Manipulate PVCs with libguestfs tools
Wait for Virtual Machine Instance Status
Modify Windows iso
  • modify-windows-iso-file - modifies windows iso (replaces prompt bootloader with no-promt bootloader) and replaces original iso in PVC with updated one.

Examples

Windows BIOS Installer Pipeline

Downloads a Windows ISO file into a PVC and automatically installs Windows in BIOS mode by using a custom Answer file into a new base DataVolume. Supported Windows versions: Windows 10

Windows EFI Installer Pipeline

Downloads a Windows ISO file into a PVC and automatically installs Windows 11 or Server 2k22 with EFI enabled by using a custom Answer file into a new base DataVolume. Supported Windows versions: Windows 11, Server 2k22

Windows Customize Pipeline

Applies customizations to an existing Windows 10, 11, Server 2k22 installation by using a custom Answer file and creates a new base DataVolume. Supported Windows versions: Windows 10, 11, Server 2k22

Unit Tester Pipeline - Unmaintained

Good unit tests are detached from the operating system and can run everywhere. However, this is not always the case. Your tests may require access to entire operating system, or run as root, or need a specific kernel.

This example shows how you can run your tests in your VM of choice. The pipeline creates a VM, connects to it over SSH and runs tests inside it. It also showcases the finally construct.

Server Deployer Pipeline - Unmaintained

For complex application server deployments it might be easier to start the server as is in a VM rather than converting it to cloud-native application.

This example shows how you can initialize/modify a PVC and deploy such application in a VM.

Virt-sysprep Updater Pipeline - Unmaintained

Virt-sysprep can be used for preparing VM images which can be then used as base images for other VMs.

This example shows how you can update an operating system and seal VM's image by using virt-customize. Then, a VM is created from such image.

Development Guide

See Getting Started for the environment setup and development workflow.

Directories

Path Synopsis
cmd
modules
copy-template Module
create-vm Module
execute-in-vm Module
shared Module
sharedtest Module
tests Module
test
vm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL