aboutsummaryrefslogtreecommitdiffstats

*.eugenetriguba.com Server Image

This repository contains a template for:

  • Building OpenBSD boxes for QEMU using Packer (openbsd-image/).
  • Creating an OpenBSD snapshot in Hetzner for starting up new servers in Hetzner using that OpenBSD image you just created (hcloud-snapshot/).

Building an OpenBSD Image

First, ensure you have QEMU installed:

brew install qemu

Then, you can build the box with the following:

./build-openbsd-image.sh

If you have a custom disk layout you want, you can pass in a disklabel template. e.g.

./build-openbsd-image.sh --disklabel-template ./openbsd-image/disk-layouts/cgit.disklabel

Creating a Hetzner Snapshot from your OpenBSD Image

Once you’ve built your image, you can now create a Hetzner snapshot for that image. Hetzner doesn’t support OpenBSD out of the box, so this allows you to spin up new servers on demand using your snapshot of this OpenBSD image.

To get started, you’ll need to:

  1. Create an SSH key within Hetzner’s Console
  2. Create an API key you can use within Hetzner’s Console

Then:

export HCLOUD_TOKEN="xxxx-xxxx-xxxx"
./build-hcloud-snapshot.sh --ssh-key <your-name-you-gave-your-ssh-key>