Skip to content

Custom Images - cloud-config

Tutorial

You will create a build recipe in $HOME/.config/blincus/build. The recipe must be a valid distrobuilder template.

This example creates a recipe called fatfedora, associates the fedora scripts directory to it, and copies the launch template from the existing fedora.config.yaml.

Terminal window
$ blincus custom-image create fatfedora --template fedora --scripts fedora
Created /home/BLINCUSUSER/.config/blincus/build/fatfedora.yaml recipe
Created /home/BLINCUSUSER/.config/blincus/templates/builder-fatfedora.config.yaml template
Next Steps:
* Edit /home/BLINCUSUSER/.config/blincus/build/fatfedora.yaml with a valid Distrobuilder recipe
* Run `blincus custom-image build fatfedora` to build the image

The template is then associated with the image and the scripts directory in the blincus config file:

[builder-fatfedora]
image = builder-fatfedora
scripts = fedora

The recipe that blincus custom-image create creates is empty. This is the part where you make that empty recipe file into a valid Distrobuilder definition. You’ll need these references for your journey:

Now that the recipe and launch template are in place, we can build the custom image:

Terminal window
$ blincus custom-image build fatfedora
... LOTS OF SCROLLING BUILD OUTPUT HERE ...
Importing image
Image imported with fingerprint: 68243888d2955cf6097e516ebaa77226c1b5584ddd555235c2cd6eee5fc89470
Image builder-fatfedora imported

Conventions

Build Recipe Name

A build recipe in the file $HOME/.config/blincus/build/mysnowflake.yaml will result in an image with the alias builder-mysnowflake. Blincus prepends builder- to the image names to try to minimize confusion between stock Incus images and your custom built local images.

Template Name

When launching an instance with a custom image, Blincus follows the same conventions as it does when launching a stock image. the blincus custom-image create will create a new launch template for you based on the existing template you specify with the --template flag.

Custom Properties

When importing the image after it is built, Blincus will add the custom property builder and set the value to blincus.

You can see this property and all the others that are set with the following command:

Terminal window
incus image list --format json

Reference

ConfigurationDescriptionPurposeLocation
Build RecipeDistrobuilder YAML fileDescribe image build process$HOME/.config/blincus/build/{name}.yaml
Launch TemplateIncus Launch ConfigurationDescribe instance launch parameters$HOME/.config/blincus/templates/{name}.config.yaml
Blincus ConfigBlincus configuration fileMap launch templates to images$HOME/.config/blincus/config.ini

Tailscale

Ephemeral keys https://tailscale.com/kb/1085/auth-keys