kairos
kairos copied to clipboard
Supply a valid config.yaml for raw images if users dont
If you create a raw image and dont provide a config file it will generate a raw image thaqt its fully invalid., You cant loging into it, you cant reset, etc..
We should probably provide a default config that at least sets stuff.
example provided by @dnugmanov
#cloud-config
name: "Default user"
stages:
initramfs:
- name: "Set default user/pass"
users:
kairos:
passwd: "kairos"
groups:
- "admin"
- name: "Repart image"
layout:
device:
label: COS_RECOVERY
add_partitions:
- fsLabel: COS_STATE
size: 8000
pLabel: state
- fsLabel: COS_PERSISTENT
pLabel: persistent
size: 0
filesystem: "ext4"
- name: "Deploy kairos"
commands:
- kairos-agent --debug reset --unattended
- touch /usr/local/.deployed
- reboot
if: '[ -f "/run/cos/recovery_mode" ] && [ ! -e /usr/local/.deployed ]'
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
Some parts of the example config are already handled by Auroraboot: https://github.com/kairos-io/AuroraBoot/blob/226823bdb77fc7018ca17b13c9e5ef78482f034a/pkg/ops/rawDiskGeneration.go#L149
I'm not sure not creating a default user is an issue (if we even do that, needs verification). Maybe they have other ways to supply the config (e.g. cloud-init from cloud provider).
we do ship a default one nowadays if users dont.