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.
$ blincus custom-image create fatfedora --template fedora --scripts fedoraCreated /home/BLINCUSUSER/.config/blincus/build/fatfedora.yaml recipeCreated /home/BLINCUSUSER/.config/blincus/templates/builder-fatfedora.config.yaml templateNext Steps: * Edit /home/BLINCUSUSER/.config/blincus/build/fatfedora.yaml with a valid Distrobuilder recipe * Run `blincus custom-image build fatfedora` to build the imageThe template is then associated with the image and the scripts directory in the blincus config file:
[builder-fatfedora]image = builder-fatfedorascripts = fedoraThe 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:
- distrobuilder examples
- linuxcontainers images: sources
- the blincus Ubuntu example at $HOME/.config/blincus/build/ubuntu.yaml
- the blincus Fedora example at $HOME/.config/blincus/build/fedora.yaml
Now that the recipe and launch template are in place, we can build the custom image:
$ blincus custom-image build fatfedora... LOTS OF SCROLLING BUILD OUTPUT HERE ...Importing imageImage imported with fingerprint: 68243888d2955cf6097e516ebaa77226c1b5584ddd555235c2cd6eee5fc89470Image builder-fatfedora importedConventions
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:
incus image list --format jsonReference
| Configuration | Description | Purpose | Location | 
|---|---|---|---|
| Build Recipe | Distrobuilder YAML file | Describe image build process | $HOME/.config/blincus/build/{name}.yaml | 
| Launch Template | Incus Launch Configuration | Describe instance launch parameters | $HOME/.config/blincus/templates/{name}.config.yaml | 
| Blincus Config | Blincus configuration file | Map launch templates to images | $HOME/.config/blincus/config.ini | 
Tailscale
Ephemeral keys https://tailscale.com/kb/1085/auth-keys