Automated
To automate Kairos installation, you can configure a specific portion of the installation configuration file. The configuration file can then be supplied in a few different ways, such as creating an additional ISO to mount, specifying a URL, or even creating an ISO from a container image with an embedded configuration file.
Here’s an example of how you might customize the install block:
This block allows you to specify the device on which to install Kairos, whether to reboot or power off after installation, and which bundles to include.
Data source
To supply your Kairos configuration file, you can create an ISO that contains both a user-data file (which contains your configuration) and a meta-data file.
Here’s an example user-data
configuration that is set up to automatically install Kairos onto /dev/sda and reboot after installation:
The token p2p.network_token
is a base64 encoded string which
contains an edgevpn
token. For more information, check out the architecture section.
Save this file as cloud_init.yaml
, then create an ISO with the following steps:
- Create a new directory and navigate to it:
- Create empty
meta-data
and copy your config asuser-data
:
- Use
mkisofs
to create the ISO file:
Once the ISO is created, you can attach it to your machine and boot up as usual, along with the Kairos ISO.
Via config URL
Another way to supply your Kairos configuration file is to specify a URL as a boot argument during startup. To do this, add config_url=<URL>
as a boot argument. This will allow the machine to download your configuration from the specified URL and perform the installation using the provided settings.
After installation, the configuration will be available on the system at /oem/90_custom.yaml
.
If you’re not sure where to host your configuration file, a common option is to upload it as a GitHub gist.
ISO remastering
It is possible to create custom ISOs with an embedded cloud configuration. This allows the machine to automatically boot with a pre-specified configuration file, which will be installed on the system after provisioning is complete. See also AuroraBoot for documentation.
Locally
To create a custom ISO, you will need Docker installed on your machine.
Here’s an example of how you might do this:
Warning
The image passed to the osbuilder-tools, needs to have one of the accepted schemes: docker
, oci
, file
, dir
or channel
.
If you don’t pass one, we will make an attempt to read it as a web URL but depending on your URL this might throw an error.
We can use AuroraBoot to handle the the ISO build process, for example:
This will create a new ISO with your specified cloud configuration embedded in it. You can then use this ISO to boot your machine and automatically install Kairos with your desired settings.
You can as well modify the image in this step and add additional packages before deployment. See customizing the system image.
Check out the AuroraBoot documentation and the examples for learn more on how to generate customized images for installation.
Kubernetes
It is possible to create custom ISOs and derivatives using extended Kubernetes API resources with an embedded configuration file. This allows you to drive automated installations and customize the container image without breaking the concept of immutability.
You can read more about it here.
Feedback
Was this page helpful?
Awesome! Glad to hear it! Please tell us how we can improve.
Oh snap! Sorry to hear that. Please tell us how we can improve.