Skip to content

Releases: unikraft/packer-plugin-unikraft

v0.2.1

26 Aug 15:09
Compare
Choose a tag to compare
Release v0.2.1

v0.2.0

22 Nov 11:10
5af4010
Compare
Choose a tag to compare
Release v0.2.0

v0.1.3

03 Jul 08:06
v0.1.3
ecd3c62
Compare
Choose a tag to compare

Bumps dependencies and updates Kraftkit to the latest version.

v0.1.2

17 May 07:11
v0.1.2
Compare
Choose a tag to compare
Release v0.1.2

v0.1.1

07 May 14:52
v0.1.1
419dbcf
Compare
Choose a tag to compare
Release v0.1.1

v0.1.0

02 May 17:51
ce7f17f
Compare
Choose a tag to compare

Introducing Unikraft's HCP Packer Plugin

We are excited to release the Unikraft HashiCorp Packer plugin! The plugin can be used with the Packer CLI tool to create highly customized and ultra-lightweight VMs (aka Unikernels) based on Unikraft. This integration with Unikraft enables developer experience towards seamlessly building your application as a unikernel.

There are many benefits in running your (unmodified) application as a unikernel, including millisecond boot times, memory consumption of only a few MBs per instance, double the throughput of Linux, and lower latency, to name a few metrics. For more information about the performance of unikernels 🚀, the added security 🔒 and a positive impact on the environment 🌱 please check out Unikraft's documentation and the introductory chapters on these impacts.

To get started immediately, check out the repository README or see the installation instructions below.

This is the project repository for the Unikraft plugin for HashiCorp Packer. Create highly customized and ultra-lightweight VMs (aka Unikernels) based on Unikraft with Packer.

Overview

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 binary
  architecture = "x86_64"

  // Target platform of the resulting VM binary
  platform = "kvm"

  // Path of the resulting binaries
  build_path = "/tmp/my-packer-unikernel/.unikraft/apps/helloworld"

  // Path where to pull the sources and build the binaries
  workdir = "/tmp/my-packer-unikernel"

  // Application to pull and build
  pull_source = "helloworld"

  // Extra sources to use for the application 
  sources = [
    "https://github.com/unikraft/app-helloworld.git",
  ]
}

Installation

Quickstart

packer plugins install github.com/unikraft/unikraft

Using the 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/unikraft"
    }
  }
}

Manual installation

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.

Configuration

For more information on how to configure the plugin, please read the documentation located in the docs/ directory.

Support, Community & Meetings

If you think you've found a bug in the code or you have a question regarding the usage of this software, please reach out to us by opening an issue in the GitHub repository.

Contributions to this project are welcome: if you want to add a feature or a fix a bug, please do so by opening a Pull Request in the GitHub repository. In case of feature contribution, we kindly ask you to open an issue to discuss it beforehand.

A KraftKit Working Group (WG) meets every Wednesday at 12:30 PM (CET) on Discord where additional support, questions or issues can be raised. Invites and additional details are available on the Unikraft OSS Public calendar.

License

The Unikraft Packer Plugin is part of the Unikraft OSS Project and licensed under MPL-2.0.