GitHub - hyperlight-dev/hyperlight-kubeconNA2024-demo (original) (raw)

Hyperlight KubeCon NA 2024 Demo

This repo houses the code for the demo we will be presenting during our keynote at KubeCon NA 2024.

Project Structure

.
├── Cargo.lock
├── Cargo.toml
├── README.md
├── demo-guest
├── demo-main
├── puml
└── target

demo-guest

Hyperlight executes arbitrary code safely and quickly. It does that by booting up an OS-less VM that executes functions.

Note: OS-less VMs cannot make any syscalls, so we escape the VM to make host function calls to, say, print to standard output.

demo-main

Architecture

How to run?

How to debug?

To spawn a Hyperlight VM and attach a debugger to it, you:

  1. Start a devcontainer
  2. Run the demo with the gdb feature:
cd demo-main
cargo run --features gdb
  1. Open a separate terminal and send an HTTP request to the demo server to spawn a cold Hyperlight VM:
curl http://localhost:3030/hyperlight/hello-world/cold
  1. Attach a debugger to the spawned VM by using one of the Run and Debug configurations in your VSCode editor:
  1. Enjoy debugging!