You are viewing documentation for the Kairos release v3.0.14. For the latest release, click here.
AuroraBoot
AuroraBoot is a tool designed to make the process of bootstrapping Kairos machines quick, simple and efficient. It is specifically designed for the Kairos operating system and provides a comprehensive solution for downloading required artifacts and provisioning a machine, both from network or manually via flashing to USB stick.
With AuroraBoot, you can prepare the environment for network-based bootstrapping, download the necessary release assets, and also customize the installation media for USB-based mass-installations. Whether you’re looking to install Kairos on a single machine or multiple machines, AuroraBoot makes it easy and efficient.
AuroraBoot can be useful to:
- prepare multiple-nodes in a lab before shipment
- offer a simple, intuitive and streamlined way to deploy Kairos automatically and manually
- deploy Kairos nodes in a network segment where we can already send workload to (running AuroraBoot in an already-existing downstream cluster)
Scope
AuroraBoot has the following scope:
- Download release assets in order to provision one or more machines
- Prepare automatically the environment to boot from network
- Provision machines from network with a version of Kairos and cloud config
- Customize The installation media for installations from USB
Prerequisites
docker
or a container engine of your choice- Port
8090
,8080
and67
free on the host running AuroraBoot - The machine running AuroraBoot have to be on the same network segment of the nodes to be bootstrapped
- The nodes need to be configured to boot over network, or be capable of booting via USB for offline mode
ProxyDHCP
supported by theDHCP
network attempting to netboot (see also pixiecore architecture). There should be an already runningDHCP
server on your network. AuroraBoot doesn’t take over theDHCP
server, neither require you to do any specific configuration, however aDHCP
server which is compliant toProxyDHCP
requests should be present in the same network running AuroraBoot and the machines to boot.
MacOS
Unfortunately for macOS systems we cannot run the netboot through docker as it’s run inside a VM, as it can’t see the host network.
Building ISOs still works as long as you mount the container /tmp
disk to a local dir so its exported there like so:
This will build the ISO and put the generated artifacts in the current dir under the ${PWD}/iso
dir.
For netboot, we recommend that you run the AuroraBoot binary directly by grabbing it from the releases page.
This requires just one dependency that you can install via brew with brew install xorriso
Windows
Netboot in windows is not supported, only iso creation via the docker image.
Overview
To run AuroraBoot, simply use docker
or the container engine of your choice (such as podman
, …). AuroraBoot images are published in quay and the source code is available in GitHub.
The basic usage of AuroraBoot involves passing it several parameters that define the installation environment, such as the version of Kairos you want to install, the cloud config you want to use, and other customizations you may need. You can pass these parameters either as command-line arguments, or as a full YAML configuration file.
AuroraBoot will download the artifacts required for bootstrapping the nodes, and prepare the environment required for a zero-touch deployment.
For example, to netboot a machine with the latest version of Kairos and Rocky Linux using a cloud config, you would run the following command:
This command will download the necessary artifacts and start the provisioning process. The machine will attempt to boot from network, and will be configured with the specified version of Kairos.
Network-based bootstrapping
By default AuroraBoot will automatically attempt to bootstrap other machines, which are configured to boot from network, within the same network. No further configuration or settings necessary.
There are only 3 steps involved in the process:
- Select the release of Kairos that you want to deploy and optionally a cloud config (see also our examples)
- Run AuroraBoot in your workstation with the appropriate CLI args
- Boot up other nodes, already configured to boot from network
1. Selecting a release
AuroraBoot can bootstrap container images or released assets from our GitHub release process.
To use GitHub releases set a release version with --set release_version
(the GitHub release), an artifact version with --set artifact_version
(the artifact version) a flavor with --set flavor
and a repository with --set repository
.
Kairos has releases with (standard) and without (core) k3s both can be downloaded in the release page at kairos.
To use a container image, you can use the Kairos released images or customized by specifying --set container_image
instead with the container image of choice.
2. Run AuroraBoot
Now we can run AuroraBoot with the version we selected, either from GitHub releases or directly from a container image.
In the example below we selected v3.0.14-k3sv1.29.3+k3s1
, opensuse
flavor, so we would run either one of the following:
By indicating a container_image
, AuroraBoot will pull the image locally and start to serve it for network booting.
You can use the Kairos released images or your own.
By indicating a container_image
prefixed with docker://
, AuroraBoot will pull the image from the local daemon and start to serve it for network booting.
This implies that the host has a docker daemon, and we have to give access to its socket with -v /var/run/docker.sock:/var/run/docker.sock
.
By indicating a artifact_version
, a release_version
, a flavor
and a repository
, AuroraBoot will use GitHub released assets.
To specify a cloud config, you can set it with --cloud-config
. See the sections below for further examples.
3. Start nodes
Generic hardware based netbooting is out of scope for this document.
Nodes need to be configured to boot over network, and after AuroraBoot is started should be ready to accept a connection, a typical output of a successfull run is:
If trying on a VM, for instance on VirtualBox or QEMU, a typical setup might be:
- Set Netboot as first boot in the boot process order
- Use bridge networking with the host (if running AuroraBoot and the VM in the same host)
USB-based bootstrapping
AuroraBoot by default prepares an ISO with the custom cloud init prepared for being flashed to an USB stick either with dd
or with BalenaEtcher.
To disable netboot and provide only offline artifacts, run auroraboot
with --set disable_netboot=true
.
1. Node configuration
Create a cloud config file, see our documentation for ready-to use examples, but a minimal configuration that automatically installs, and allows us to login afterward can be the following:
Save the file locally or remotely, you can pass it by in the arguments with --cloud-config
to AuroraBoot. Note that can also be a remote http(s) path.
2. Create an offline ISO
Run AuroraBoot with a cloud-config to create an ISO with the embedded configuration:
Check we have the cloud config file:
Build the ISO:
Results should be available under build/
in the current directory:
Check we have the cloud config file:
Build the ISO:
Results should be available under build/
in the current directory:
The result process will write an iso kairos.iso.custom.iso
under build/iso
. That is the iso with our embedded cloud-config.
2. Run the image
The iso now is ready to be written to USB stick with either dd
or with BalenaEtcher, or attached to a VM.
When deploying on a bare metal server, directly flash the image into a USB stick. There are multiple ways to do this:
From the command line using the dd
command
or with BalenaEtcher.
Warning
Make sure you have KVM enabled, this will improve the performance of your VM significantly!
Configuration
The AuroraBoot configuration file reference is the following:
Option | Description |
---|---|
artifact_version |
Corresponding artifact versions from the Kairos release page (e.g. Kubernetes version included). |
release_version |
Version of the release in GitHub. |
flavor |
The Kairos flavor to use. See the Kairos support matrix for a list. |
repository |
Github repository to use. This can either be kairos-io/kairos or kairos-io/provider-kairos for images with k3s prior to v2.4.0. |
container_image |
Container image. If prefixed with docker:// it will try to pull from the local docker daemon. If a container_image is specified, artifact_version , flavor and release_version are ignored. |
disable_netboot |
Disable netboot. |
disable_http_server |
Disable http server for serving offline generated ISOs. |
netboot_http_port |
Specify a netboot HTTP port (defaults to 8090 ). |
state_dir |
Specify a directory that will be used by auroraboot to download artifacts and reuse the same to cache artifacts. |
listen_addr |
Default http binding port for offline ISO generation. |
cloud_config |
Cloud config path to use for the machines. A URL can be specified, use - to pass-by the cloud-config from STDIN |
iso.data |
Defines a path to be embedded into the resulting iso. When booting, the files will be accessible at /run/initramfs/live |
netboot.cmdline |
Override the automatically generated cmdline with a custom one to use during netboot. config_url and rootfs are automatically constructed. A reasonable value can be netboot.cmdline=rd.neednet=1 ip=dhcp rd.cos.disable netboot install-mode console=tty0 |
To use the configuration file with AuroraBoot, run AuroraBoot specifying the file or URL of the config as first argument:
The CLI options can be used in place of specifying a file, and to set fields of it. Any field of the YAML file, excluding cloud_config
can be configured with the --set
for instance, to disable netboot we can run AuroraBoot with:
To specify a cloud config file instead, use --cloud-config
(can be also url):
Both the config file and the cloud-config file can be a URL.
Cloud config
A custom cloud configuration file can be passed either with the --cloud-config
flag, or in the AuroraBoot configuration file under the cloud_config
key.
It is possible to apply templating to a cloud config. Indeed any value passed to --set
is accessible as a template in the cloud config file with the [[
and ]]
delimiter, for instance consider the following cloud config file, which allows to set a password for the kairos
user and a GitHub handle allowed to login to the machine:
We would then set the user to mudler
and the password to foobar
when running AuroraBoot like the following:
Config files can be also hosted remotely, and given as URLs to AuroraBoot.
We can indeed use the template in the example folder with the command above:
To pass-by a cloud-config via pipes, set --cloud-config -
, for example:
Examples
Note
The example below are implying aconfig.yaml
cloud config file to be present in the current directory.
Offline ISO build from local container image
First make sure we have the image locally with:
Build the custom ISO with the cloud config:
Offline ISO build from container images
Build the custom ISO with the cloud config:
Override GRUB config file
It is possible to override the default GRUB config file of the ISO by creating a directory that contains the files that we want to add or replace in it.
For example, to override the GRUB config file:
Prepare ISO for Airgap installations
See the Airgap example in the examples section.
Netboot with core images from Github releases
Netboot with k3s images from Github releases
Netboot from container images
Generate RAW disk image (EFI)
AuroraBoot can generate raw disk images (EFI) that can be used as cloud images (for example as AWS AMI images) or QEMU.
Consider the following example:
The raw disk image will be available in iso/disk.raw
The cloud config file (config.yaml
) should look like the following:
Note
To generate GCE and VHD images set disk.gce=true
or disk.vhd=true
respectively in the AuroraBoot command. For example:
or for VHD images:
Use the config file
Write down an aurora config file as aurora.yaml
:
And then run:
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.