To get started immediately, check out the repository README or see the installation instructions below.
The plugin interfaces with the native Go API offered by KraftKit, Unikraft's command-line companion tool, to handle everything related to linking your application with Unikraft. Thanks to this interface, the plugin itself is kept light and modular.
The following minimalistic configuration allows you to build unikernel
applications. For example building app-helloworld
unikernel
application:
source "unikraft-builder" "example" {// Target architecture of the resulting VM binaryarchitecture = "x86_64"// Target platform of the resulting VM binaryplatform = "kvm"// Path of the resulting binariesbuild_path = "/tmp/my-packer-unikernel/.unikraft/apps/helloworld"// Path where to pull the sources and build the binariesworkdir = "/tmp/my-packer-unikernel"// Application to pull and buildpull_source = "helloworld"// Extra sources to use for the applicationsources = ["https://github.com/unikraft/app-helloworld.git",]}
packer plugins install github.com/unikraft/unikraft
packer init
command#Starting from Packer v1.7, plugins can be automatically installed via the
packer init
command. To install
this plugin, copy and paste the following code snippet preamble into your Packer
configuration file:
packer {required_plugins {unikraft = {version = ">= 0.1.0"source = "github.com/unikraft/packer-plugin-unikraft"}}}
You can find pre-built binary releases of the plugin here. Full installation instructions for installing plugins from source can be found on Packer's documentation.
For more information on how to configure the plugin, please read the
documentation located in the docs/
directory.
Feel free to ask questions, report issues, and meet new people.