Commit Graph

15 Commits

Author SHA1 Message Date
Itxaka
284a7bde02 Make Persistatant grub vars respect existing ones
We were basically overwriting the file if it existed which is bad.
Now it will read the file if it exists and ingest the existing ones,
then in will override witht he given vars if they match, warn the user
and then store the full processed vars.

This means it will never overwrite any vars again

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-04-15 13:37:04 +02:00
Itxaka
54b6779f94 Use grub binaries and libs from rootfs
We should not default to use the underlying OS files and binaries for
grub installs as we may be on a takeover scenario in which the
underlying OS does not provide the needed files.

This moves the grub binary and files to be provided by the source rootfs
and moves the grubOptions hook to use the go libraries directly instead
of shelling out to another binary

Signed-off-by: Itxaka <itxaka@kairos.io>
2025-04-15 13:03:18 +02:00
Itxaka
0ae9c04eb4 Make sure kcrypt hook umounts persistent (#244) 2024-03-07 15:11:51 +01:00
Itxaka
2e0af77fbc Use new logger facilities (#236) 2024-03-01 12:27:26 +01:00
Itxaka
677254e570 Pass the install event to the collector directly (#150) 2023-09-26 07:38:58 +00:00
Itxaka
956f86f99c Rework reboot/shutdown to use the hooks (#96) 2023-07-24 12:28:59 +02:00
Itxaka
9c5731baa2 Rename go module kairos-agent (#81) 2023-07-10 14:39:48 +02:00
Dimitris Karakasilis
e7807dd66c Change module path according to Go docs (#1220)
https://go.dev/doc/modules/major-version

This way we can bump the kairos dependency on the provider-kairos repo

which otherwise produced the error:

```
~/workspace/kairos/provider-kairos (main)*$ go get -u github.com/kairos-io/kairos@v2.0.0-alpha3
go: github.com/kairos-io/kairos@v2.0.0-alpha3: invalid version: module contains a go.mod file, so module path must match major version ("github.com/kairos-io/kairos/v2")
```

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-30 14:18:53 +03:00
Itxaka
b5cfab06a7 sparkles: Use kairos-sdk module (#1140) 2023-03-15 15:45:00 +01:00
Ettore Di Giacinto
0af13f655f sparkles: enhancements (#263)
* 🎨 Do not need to prefix '.' on queries

*  Add recovery to stateapi

*  Add cloudconfig SDK

*  Unify post-install/firstboot hooks

This also adds capabilities to add grub option at first boot rather than
after installation as for bundles.

* 🤖 Optimize tests to wait for state to change
2022-10-24 08:34:49 +02:00
Ettore Di Giacinto
5893294c54 sparkles: state api sdk (#262)
*  Add state api

This is related to https://github.com/kairos-io/kairos/issues/34.

Starts to unify the API to retrieve the state in the sdk to have a common place to query system status information.

* 🤖 Add test

* Update go.mod

* ⚙️ Fine-tune detection of partitions

* 🤖 Add more fine-grained tests

* 🎨 Add /dev/ to partition name

* 🤖 Fixup tests

* ⚙️ Remount accessors

*  Add state partition to cloud-init paths

* 📝 Upper case Kairos in motd

* 🎨 Add mounts sdk

* 🎨 Set grub options via SDK

* 🎨 Make it more idiomatic
2022-10-23 20:22:32 +02:00
Ettore Di Giacinto
5c4e29f3d3 sparkles: Minor enhancements (#239)
* 🐛 Fixup grub option quoting

* ⚙️ Copy discovery to oem if found

*  Add environment block to install

* ⚙️ Use /oem for mount in kcrypt post-hook

* 📝 Update docs with installer env reference

* 🤖 Add test deps

* ⚙️ Be consistent and set env also for post-hooks

* ⚙️ propagate env in post-hooks
2022-10-18 07:45:07 +02:00
Ettore Di Giacinto
a8875f6b4f sparkles: Add bundles to post-install hooks (#171)
* 🤖 Add bundles and sysext test

*  Exec bundles also after install

* 🤖 Adapt tests

* 🎨 Create dir only if doesn't exist

* 🎨 Return err on mount

* 🎨 Make bundle errors failure as an option

* 🎨 Minor fixups

* debug

* 🤖 Fix spec

* 🤖 Get correct version for bundle test

* 🎨 Fixups

* 🤖 systemd-sysext is available only on opensuse for now
2022-10-03 00:16:01 +02:00
Ettore Di Giacinto
e25526cfc9 art: Rebranding (#130)
See: https://github.com/c3os-io/c3os/issues/88
2022-09-17 18:43:51 +02:00
Ettore Di Giacinto
b7fec41fe3 sparkles: Boot options (#91)
*  Add grub_options to config

Split post-install into hooks

* 🤖 Adapt test to latest releases
2022-09-08 15:39:26 +02:00