Commit Graph

300 Commits

Author SHA1 Message Date
mudler
958ae9393d fix(after-install): run after-install hook after partitions are encrypted 2024-02-27 17:28:11 +01:00
Itxaka
2e9c85e63a
Add shim to choose next entry to boot from (#230) 2024-02-21 10:44:32 +01:00
Dimitris Karakasilis
88454bdda4
Implement uki "kairos-agent upgrade --recovery"
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-02-20 13:30:52 +02:00
Dimitris Karakasilis
d981656715
Install efi files in uki mode using naming convention
replace "artifact" with "active" in conf files and in filenames

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-02-13 16:12:20 +02:00
Itxaka
0119b9cfb2
Fix object dumping (#222) 2024-02-05 11:30:24 +01:00
Itxaka
33c8e8f29c
Add reset for uki (#221) 2024-02-02 13:20:06 +01:00
Itxaka
9941c786a3
Fix uki upgade path (#219) 2024-01-31 19:38:16 +01:00
Itxaka
1a46f0910f
[uki] Wait for oem to appear after encryption (#216) 2024-01-30 14:28:54 +01:00
Itxaka
8696eb16d2
Do not show devices that cant be used (#212)
during interactive install all devices will appear but some of those are
not desirable as they cannot be used to install.

Skip those in the list

Signed-off-by: Itxaka <itxaka@kairos.io>
2024-01-26 15:09:13 +01:00
renovate[bot]
5014587a3c fix(deps): update dependency alpinejs to v3.13.5 2024-01-24 23:03:07 +00:00
Ettore Di Giacinto
79a577d0f3
feat(uki-partitioning): respect additional encrypted partition list (#206) 2024-01-24 10:48:33 +01:00
Itxaka
e80a435c53
Fix --source flag (#205) 2024-01-23 17:05:54 +01:00
Dimitris Karakasilis
9a8c404cfa
Add "--all" flag to list-releases to print older releases too
This will allow us to fix the broken test in master and also allow
people to downgrade to older releases.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2024-01-11 10:43:45 +02:00
Itxaka
53f49169b1
Fix uki mode detection (#198) 2024-01-10 10:38:31 +01:00
Itxaka
174d69c3ea
Merge uki upgrade into the normal upgrade command (#197) 2024-01-09 16:42:49 +01:00
Itxaka
775756f4b6
Run install off the same command (#196) 2024-01-09 15:10:04 +01:00
renovate[bot]
fccdefdf0e Update dependency codemirror to v5.65.16 2024-01-03 22:05:47 +00:00
Mauro Morales
de3d581447
Merge pull request #167 from kairos-io/renovate/alpinejs-3.x-lockfile
Update dependency alpinejs to v3.13.3
2024-01-03 11:23:59 +01:00
Itxaka
3254b8a36e
Uki upgrade (#182) 2023-12-18 11:38:26 +01:00
Itxaka
7ca39f2729
Encrypt uki partitions after install (#176) 2023-12-12 20:51:55 +00:00
Dimitris Karakasilis
05174fed43
Merge pull request #181 from kairos-io/1999-consume-versioneer
1999 consume versioneer
2023-12-08 14:18:25 +02:00
Dimitris Karakasilis
2412d69e32
Re-enable call-out to provider for releases
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-12-08 10:50:01 +02:00
Dimitris Karakasilis
00ce75b285
Deprecate positional argument and cleanup unused code
because empty source caused an error, because of Sanitize() failing.
handleEmptySource was never called.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-12-07 18:20:16 +02:00
Dimitris Karakasilis
823343546a
Fix "upgrade list-releases" command by consuming kairos-sdk versioneer
Also add TODOs for remaining work

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-12-07 15:00:45 +02:00
Itxaka
e6b3e5092e
Exit on install validation if target disk has mounted partitions (#180) 2023-12-07 12:32:41 +01:00
Itxaka
6e1d761ded
Fix unwanted reboot from install config in upgrade/reset (#178) 2023-12-05 15:46:11 +01:00
Dimitris Karakasilis
c98c791f60
Call exec.Command properly, splitting the cmd and args
This was failing but wasn't visible because it needs

`fail_on_bundles_errors: true` to be set in the Kairos config.

We need to find whether we need a new test or an existing one can be
adapted to catch this.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-11-20 13:54:05 +02:00
renovate[bot]
ed527c7a66
Update dependency alpinejs to v3.13.3 2023-11-19 16:44:28 +00:00
Itxaka
01e0a0048c
Stop tailing provider log (#166)
Its not our duty to trail anything, we already passing a logfile for it
to use, we log our stuff and dont pollute the standar output

Signed-off-by: Itxaka <itxaka@kairos.io>
2023-10-18 17:16:22 +02:00
renovate[bot]
f21bd243b2 Update dependency jquery to v3.7.1 2023-10-16 14:40:49 +00:00
renovate[bot]
40289af471 Update dependency bootstrap to v5.3.2 2023-10-04 23:16:00 +00:00
renovate[bot]
66336a3adf Update dependency codemirror to v5.65.15 2023-10-04 20:00:02 +00:00
Itxaka
1b967cccd8
[uki] Lyfecycle (#148) 2023-10-03 11:15:17 +02:00
Dimitris Karakasilis
48fc6180cf
Return image from bus when one exists
it was accidentally returning "nil"

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-10-02 12:47:04 +03:00
Dimitris Karakasilis
b675730e8c
Rename variables to better reflect what they are (PR comment)
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 12:50:34 +03:00
Dimitris Karakasilis
5b9d043aa0
Remove non-working test
because it needs to stub the world and currently there is no way of
doing so (we've even skipped the install_test.go for similar reasons).
2023-09-29 11:52:36 +03:00
Dimitris Karakasilis
b68b07f278
Remove unecessary type definition
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:46:00 +03:00
Dimitris Karakasilis
f2ec19d53d
Fix syntax and don't hide error
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
48c445756e
Fix conf identation
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
48a3f57048
Rename var
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
15a926ad3b
Handle --source in install/manual-install/interactive-install the same way
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
c58efaa623
Add test and remove debugging logs
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
968812dfbb
Exctract the generation of the upgrade spec to a function
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
afe08c5ca5
Generate additional config only if needed
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
8dd7577148
WIP
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:59 +03:00
Itxaka Serrano Garcia
60815d060e
Refactor
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
2023-09-29 11:45:59 +03:00
Dimitris Karakasilis
3482e88aa3
[WIP] Try to pass command line options for upgrade as kairos config
because it's actually configuration and it's better than using viper to
pass things around.

The `upgrade:` block seems to be ignored early in the process so even if
the user specifies an image there, the latest release will be looked up.

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:58 +03:00
Dimitris Karakasilis
7d18e6504a
[WIP] Add --source to various commands
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-29 11:45:58 +03:00
Itxaka
677254e570
Pass the install event to the collector directly (#150) 2023-09-26 07:38:58 +00:00
Itxaka
3e4693d697
Workaround for bundle install in new /var/lib/extensions directory (#147) 2023-09-15 15:40:27 +02:00
Dimitris Karakasilis
51ca8a8589
Revert "debug extension"
This reverts commit 98ccb57799.
2023-09-15 15:36:42 +03:00
Itxaka
98ccb57799 debug extension
Signed-off-by: Itxaka <itxaka@kairos.io>
2023-09-15 14:33:41 +02:00
renovate[bot]
18d937d227
Update dependency cypress to v12.17.4 (#138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-14 17:14:33 +02:00
Dimitris Karakasilis
bf40c48812
Move checkRoot to main
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-14 16:06:41 +03:00
Dimitris Karakasilis
fddbf3f657
Check root permissions in commands that need it
Otherwise the error shown is not helpful (it fails too late with
confusing errors).

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-09-14 16:06:38 +03:00
renovate[bot]
df1c49ea7f
Update dependency @fortawesome/fontawesome-free to v6.4.2 (#114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-06 11:20:59 +02:00
Itxaka
7c060a764e
Fix manual-install reboot/poweroff flags (#131) 2023-08-18 12:54:42 +02:00
Itxaka
dffef50ca0
Several improvements for size calculation (#129) 2023-08-17 13:53:45 +02:00
Itxaka
1a72f56d67
Restore loading env from config file (#124) 2023-08-08 18:52:04 +02:00
Itxaka
3e9befa230
Add recovery upgrade flag to upgrade command + msg (#123) 2023-08-07 16:11:13 +02:00
Itxaka
f5c01f73a4
Make unattended reset work (#110)
Our current example for cloud images on the docs on how to use the reset
with a cloud-config and a stage does not actually work as the tty
adquisition and such seems to be failing due tto not being properly run
in a tty.

This pathc introduces 2 new flags to the reset command.

reboot: Enable reboot after reset, overriding any config in the system.
This is only a enable switch, so if the flag is disabled but the config
says reset it will NOT override it.

unattended: Disables printing stuff into the screen, locking the
terminal and falling back to a new tty on run. Also enables fast mode
automatically.

Signed-off-by: Itxaka <itxaka@kairos.io>
2023-08-04 20:39:22 +02:00
renovate[bot]
ff9dbc5ead
Update dependency alpinejs to v3.12.3 (#80)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 20:00:46 +02:00
renovate[bot]
d8679f5a2c
Update dependency bootstrap to v5.3.1 (#54)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 20:00:32 +02:00
renovate[bot]
091fd32c0c
Update dependency codemirror to v5.65.14 (#86)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 20:00:03 +02:00
renovate[bot]
8400023fca
Update dependency jquery to v3.7.0 (#94)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 19:59:17 +02:00
renovate[bot]
df9d94767d
Update dependency cypress to v12.17.3 (#92)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-03 19:58:40 +02:00
Itxaka
00eae4c029
Make interactive installer use the collector as well (#113) 2023-08-03 19:49:09 +02:00
Itxaka
822222a645
Drop override of message options after install (#112) 2023-08-03 19:46:13 +02:00
Itxaka
d44bc2e898
Rework install workflow for event stuff (#106) 2023-08-01 12:33:40 +02:00
Itxaka
f7bdba2dda
Merge elemental config into agent config (#102) 2023-07-25 15:21:34 +02:00
Itxaka
5b945303c9
Drop runconfig in favour of config (#101) 2023-07-25 11:08:27 +02:00
Itxaka
bca3277b7d
Rework install a bit more (#100)
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-07-25 09:12:39 +02:00
Itxaka
956f86f99c
Rework reboot/shutdown to use the hooks (#96) 2023-07-24 12:28:59 +02:00
Itxaka
922d35b4f1
Merge data from events into reset (#91) 2023-07-21 10:37:53 +02:00
Itxaka
9bff3742c1
Load elemental config/spec from cloud config (#82) 2023-07-20 15:53:48 +02:00
Itxaka
1ab0898c2c
Fix releases coming from the bus (#90) 2023-07-20 12:02:43 +02:00
renovate[bot]
6b0e1c0af4
Update dependency cypress to v12.17.1 (#66)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-07-19 11:13:36 +02:00
Itxaka
9c5731baa2
Rename go module kairos-agent (#81) 2023-07-10 14:39:48 +02:00
Mauro Morales
62eee9ffbf
Refactor
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
2023-06-30 11:37:50 +03:00
Mauro Morales
609c274636 Remove validation of os-release attribute when source has been given for upgrades
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-06-29 15:40:40 +02:00
Itxaka
629a0b2eee
Set debug flag in the main app (#64) 2023-06-21 09:42:11 +02:00
Itxaka
b126f7ab00
Drop --local flag for image sources (#63) 2023-06-21 09:39:59 +02:00
Itxaka
75586ad601
Install improvements (#62) 2023-06-20 09:58:01 +03:00
Itxaka
ed372395d2
Drop collector package and use sdk for it (#59) 2023-06-14 14:44:22 +02:00
Itxaka
14e562bb16
🐛 Read upgrade/install values from config (#55)
We were ignoring the values in the /etc/elemental/config.yaml file that
we loaded into viper by not reading those values and their keys into the
final spec.

This meant that for example the defautl entry name was being lost as we
generated a new install spec from scratch and ignored those values that
we read on the config

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-06-08 09:50:19 +00:00
renovate[bot]
c711e8eed9
Update dependency codemirror to v5.65.13 (#12)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-06-07 16:16:08 +02:00
renovate[bot]
bd2899f784
Update dependency alpinejs to v3.12.2 (#26)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-06-07 16:05:24 +02:00
renovate[bot]
f2e3f9d8c1
Update dependency @popperjs/core to v2.11.8 (#42)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-07 16:03:49 +02:00
renovate[bot]
1d572bf797
Update dependency cypress to v12.13.0 (#11)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-07 15:54:55 +02:00
Dimitris Karakasilis
a113147f8a
1225 config collector elemental (#32)
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
Co-authored-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
2023-06-07 11:28:37 +02:00
Itxaka
1e1638f258
Modify upgrade image flag to accept more formats (#39)
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-06-05 13:19:39 +00:00
Itxaka
ba72c14346
Add extended version command (#37) 2023-06-05 12:40:23 +02:00
Itxaka
b55e3e0800
🐛 Fix the cleanup of ssh users (#38) 2023-06-05 12:40:13 +02:00
Dimitris Karakasilis
0ae57a99aa
Don't let "elemental" reboot
because the Lifecycle hook will do that

Fixes https://github.com/kairos-io/kairos/issues/1460

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-05-31 12:42:44 +03:00
Mauro Morales
e23346ae44
Extract schema validation to SDK
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-05-26 12:38:54 +02:00
Itxaka
8e456ec8b6
Run the user in initramfs if we dont need network (#33) 2023-05-26 09:48:11 +02:00
Itxaka
3c484d9885
Add debug flag in root cmd (#31) 2023-05-24 10:39:17 +02:00
Itxaka
1afe3c2dbd
Run stages directly from code instead of shelling out (#23)
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-05-16 18:06:49 +02:00
Itxaka
ddfa30a4c6
Drop luet, image extractor, drop build code and multiarch images (#20)
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-05-16 16:06:49 +02:00
Itxaka
cda46877ba
Mount OEM during kcrypt hook (#18) 2023-05-09 21:57:16 +02:00
Itxaka
c449a1ae43
🐛 Using the wrong method to generate the upgrade spec (#15) 2023-05-08 15:00:56 +02:00
Itxaka
10df8d98cb
Drop kcrypt mappings (#14) 2023-05-08 09:43:47 +02:00
Itxaka
002b8ba51f
Bring elemental-cli code into the agent (#13) 2023-05-05 18:43:21 +02:00
Itxaka
b996feeb27 sparkles: Allow showing pre-releases on upgrade options (#1333)
By default get 30 releases and skip any pre-releases found.
Allow toggling showing pre-releases both for upgrade and for listing
them

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-04-21 12:32:28 +02:00
Itxaka
4035ee0489 bug: Fix version list (#1323)
* 🐛 Fix version list

First version in the list is the latest one.
Alos moves the check for same version above the current place, so it can
check before asking if you want to update to the same version

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* 🌱 Rework versioning for upgrade

Use the semver lib to parse the versions into a proper collection where
it can be parsed and versions compared and sorted properly

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* 🤖 lint

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-04-20 09:57:58 +02:00
renovate[bot]
ac478c4c09 Update dependency cypress to v12.10.0 (#1319)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-18 21:36:15 +02:00
Itxaka
e718fcec27 robot: Add cypress tests for web UI (#1269) 2023-04-18 18:09:48 +02:00
Ettore Di Giacinto
e5e595be4c bug: Ensure data source is ready during reset (#1310)
Signed-off-by: mudler <mudler@c3os.io>
2023-04-17 17:27:37 +02:00
renovate[bot]
936b538cca Update dependency codemirror to v5.65.12 (#1144)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-13 19:47:03 +02:00
renovate[bot]
6c52277486 Update dependency @popperjs/core to v2.11.7 (#1192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-13 19:46:07 +02:00
Mauro Morales
7534cab2c3 bug: Add yaml extension to temp file created by webui (#1260)
Add yaml extension to temp file created by webui

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-04-06 15:01:41 +02:00
Mauro Morales
961804be0a arrow_up: Bump go in Earthly and workflows to ^1.20 (#1213)
* Bump go in Earthly and workflows to ^1.20

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Update go.mod version

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Lint

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Remove pin of go version to get the latest

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Remove minor version

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-03-30 16:42:25 +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
Mauro Morales
1073b07f6a sparkles: Custom partitioning refactor config (#1180)
* Introduce config/collector package

to split the collection of config sources out of the config package.

Each consumer of the new package will take care of unmarshalling the
yaml to a specific Config struct, do validations etc.

* Add tests and remove garbage
* Follow all config_url chains and test it
* Add missing options file and refactor cmdline code
* Consolidate the way we merge configs no matter where they come from
* Allow and use only files with valid headers

Config is  specific to Kairos while Collector is generic. This
will allow us to do validations which are just related to Kairos at the
config level, while including every type of key and querying of the full
yaml at the Collector level splitting the responsibilities of each
package.

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-03-29 16:25:38 +02:00
renovate[bot]
960747bf7f Update dependency @fortawesome/fontawesome-free to v6.4.0 (#1198)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-29 09:21:01 +02:00
Itxaka
107a4ab02f bug: Fix validator on long strings (#1194)
* 🐛 Fix validator on long strings

Validator was mistakenly identifying a long yaml as a file and trying to
open it, which failed with an error of filename too long.

This was not catched in order to identify that the source is not a file
but a yaml, so it was directly returning the error.

This patch adds that error to the list in order ot identify the source
to validate as yaml. Also adds a couple of tests for this functionality.

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

* 🐛 Merge initramfs generation between distros

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-03-28 18:20:56 +02:00
Itxaka
148fc21c0e seedling: Add auth flags to upgrade (#1179) 2023-03-24 14:00:33 +01:00
renovate[bot]
e576303a4c Update dependency @fortawesome/fontawesome-free to v6.3.0 (#1142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-20 09:19:32 +01:00
renovate[bot]
a955590864 Update dependency jquery to v3.6.4 (#1146)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-20 09:18:44 +01:00
Itxaka
75c52f520f Bump to newer sdk (#1166) 2023-03-18 10:27:18 +01:00
renovate[bot]
eb17e5099c Update dependency alpinejs to v3.12.0 (#1143)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-15 22:46:16 +01:00
Itxaka
b5cfab06a7 sparkles: Use kairos-sdk module (#1140) 2023-03-15 15:45:00 +01:00
Oz Tiram
ce4631fd07 bug: Fix configuration not being merge (#1117)
Fix #687.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>
2023-03-14 15:44:49 +01:00
Ettore Di Giacinto
6bc750130c robot: Delete duplicate test suite registration (#1091)
Signed-off-by: mudler <mudler@c3os.io>
2023-03-10 11:10:03 +01:00
Jacob Payne
e57ef905a4 bug: Fix manual install not supporting configuration url (#963)
* fixed manual install not supporting configuration url

Signed-off-by: Jacob Payne <jacob@spectrocloud.com>

* break out url logic and add testing.

Signed-off-by: Jacob Payne <jacob@spectrocloud.com>

---------

Signed-off-by: Jacob Payne <jacob@spectrocloud.com>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
2023-03-08 10:13:36 -07:00
Jacob Payne
d8d97097a7 bug: remove kcrypt hook after reset (#982)
remove kcrypt hook after reset

Signed-off-by: Jacob Payne <jacob@spectrocloud.com>
2023-02-28 15:57:47 -07:00
Shawn Wilsher
609c09f305 🔧 Integrate Shellcheck (#931)
* Add `shellcheck` to lint.

Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>

* Fix/Suppress `shellcheck` lint issues

Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>

---------

Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-23 04:36:49 -08:00
Mauro Morales
0cf3da5e06 sparkles: Web UI schema validations (#934)
* Allow validator to receive a config-schema

It will try to process a URL first, otherwise a file and if the file
is not present it will try to read the source as a cloud-config

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Validate cloud-config on WebUI

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-02-22 08:54:45 +01:00
Mauro Morales
461516fec5 sparkles: Integrate schema validation (#853)
* Change ValidationError to return the actual error

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add validate command

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Warn validation errors when scanning configs

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Lint

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add schema command to print config json schema

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add strict-validations flag

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Lint and remove focus

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Rename command schema to print-schema

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Fix issue by reading originalData

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Lint

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Remove test from removed feature

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add comments to exported functions

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Lint

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add test for validate.go

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Remove focus

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add more tests for root schema

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Add more tests

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-14 16:15:13 +01:00
renovate[bot]
1f9d67c57a Update module github.com/erikgeiser/promptkit to v0.8.0 (#652)
* Update module github.com/erikgeiser/promptkit to v0.8.0

* 🎨 Adapt agent to new v0.8.0 promptkit version

Validation function for textinput now requires an error/nil instead of
a bool

Signed-off-by: Itxaka <itxaka@spectrocloud.com>

---------

Signed-off-by: Itxaka <itxaka@spectrocloud.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Itxaka <itxaka@spectrocloud.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
2023-02-04 11:22:57 +01:00
Ettore Di Giacinto
9c99670add robot: Don't run installation twice on installation tests (#811)
* 🤖 Don't run installation twice on installation tests

Signed-off-by: mudler <mudler@c3os.io>

* 🐛 Scan provided config in manual-install

Signed-off-by: mudler <mudler@c3os.io>

* 🤖 Git unshallow before running tests

Signed-off-by: mudler <mudler@c3os.io>

---------

Signed-off-by: mudler <mudler@c3os.io>
2023-02-03 18:41:35 +01:00
Oz Tiram
6e5c87a717 sparkles: custom user bind and ephemeral mounts (#692)
*  custom user bind and ephemeral mounts

Users can now specify custom and ephemeral mounts in cloud-init under
the `install` section, e.g.:

```
users:
 - name: kairos
...
install:
  auto: true
  device: "auto"
  bind_mounts:
  - /mnt/bind1
  - /mnt/bind2
  ephemeral_mounts:
  - /mnt/ephemeral
  - /mnt/ephemeral2
...
```
Ephemeral mounts are mounted as RW - but changes are discarded when the
machine is restart.
Bind mounts will persist changes after restarted.

This is a fix for #210

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Add the custom user mount to /cos/run/cos-layout.env

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Add docs for custom user mounts in configuration example

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Reuse test_install function

DRY the code, change how we call the function install_test

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Enable custom mount tests and install tests

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Enable tests in CI

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Remove duplicate if check

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Remove uneeded fmt.Println ...

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Use separate label for custom mounts

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* 🔧 Earthfile - DRY ginkgo

We repeat this a more than twice so just extract to own
target...

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Correct return type for  ContainElements

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Remove CLOUD_INIT from custom mounts test

This is not needed here.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Fix qemu-test-* earthly targets

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* 🔧 Fix CPU passing to VM

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* 🔧 remove apt cache after install qemu

Helps deal with space running out in the CI.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* 📖 Document custom mounts

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

---------

Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
2023-02-03 11:04:02 +01:00
Jacob Payne
9ff30b4417 require userdata loaded before running install (#742)
Signed-off-by: Jacob Payne <jacob@spectrocloud.com>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
2023-01-30 08:12:11 -07:00
Mauro Morales
1f294055a4 sparkles: Integrate documentation to Web UI (#741)
* Integrate documentation to Web UI

Relates to #738

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* submodule update

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Use hugo docker image

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

---------

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-01-28 21:44:24 +01:00
Mauro Morales
2a391a02aa bug: Add broken webui dependency (#737)
Add broken webui dependency

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-01-26 13:38:27 +01:00
Mauro Morales
8b45622f87 Revert "Update dependency codemirror to v6" (#736)
Revert "Update dependency codemirror to v6 (#610)"

This reverts commit 8ca997d9685d55f8dd0bb94888d89a515fbf1507.
2023-01-26 11:46:44 +01:00
Ettore Di Giacinto
746135eede sparkles: Add reset hook (#723)
Signed-off-by: mudler <mudler@c3os.io>

Signed-off-by: mudler <mudler@c3os.io>
2023-01-25 13:38:56 +01:00
renovate[bot]
9b16896a1a Update dependency codemirror to v6 (#610)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-25 10:47:59 +01:00
Ettore Di Giacinto
ef93e321fa seedling: Drop references to node-config (#697)
Signed-off-by: mudler <mudler@c3os.io>

Signed-off-by: mudler <mudler@c3os.io>
2023-01-20 19:14:53 +01:00
Ettore Di Giacinto
f052a4a83c seedling: Drop unrequired copy (#683)
Signed-off-by: mudler <mudler@c3os.io>

Signed-off-by: mudler <mudler@c3os.io>
2023-01-20 10:29:35 +01:00
Dimitris Karakasilis
544f28c493 Use new kcrypt/config package (#669)
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2023-01-18 15:14:57 +02:00
Oz Tiram
b273803338 seedling: Add version information directly from git (#651)
* 🌱 Add version information directly from git

Partial fix for kairos-io/kairos#643.

Signed-off-by: Oz Tiram <oz@spectrocloud.com>

* Update cmd/profile-build/main.go

Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>

Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
2023-01-16 19:24:11 +01:00
renovate[bot]
3b2dcf172e Update dependency bootstrap to v5 (#626)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-01-13 10:56:37 +01:00
Mauro Morales
112095fa70 seedling: Vendor webui dependencies (#619)
* 🌱 Vendor webui dependencies

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Remove GA caching

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* The deps need to be there before the compilation of the agent

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Remove unnecesary tag

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

* Do not build webui-deps

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>

Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
2023-01-10 14:21:15 +01:00
Ettore Di Giacinto
667fd76d9d seedling: Webui enhancements (#620)
* 🌱 Make sure webui starts on alpine

Also drop to shell when there are no providers

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Suppress verbose logging on tty

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Print WebUI address

Signed-off-by: mudler <mudler@c3os.io>

* 🎨 Update banner

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Refactor, display also interfaces

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Address feedback from review

Signed-off-by: mudler <mudler@c3os.io>

Signed-off-by: mudler <mudler@c3os.io>
2023-01-08 21:49:23 +01:00
Ettore Di Giacinto
d59892c5c5 seedling: Webui installer (#587)
* 🌱 Add webui

Signed-off-by: mudler <mudler@c3os.io>

* 🌱 Re-read config files after loading bundles

Signed-off-by: mudler <mudler@c3os.io>

* [check-spelling] Update metadata

Update for https://github.com/kairos-io/kairos/actions/runs/3806058276/attempts/1
Accepted in https://github.com/kairos-io/kairos/pull/587#issuecomment-1367859480

Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
Signed-off-by: mudler <mudler@c3os.io>

* 🎨 Beautify index page

Signed-off-by: mudler <mudler@c3os.io>

* Do not rerun if we were successful or we are already running

Signed-off-by: mudler <mudler@c3os.io>

* Add syntax highlight

Signed-off-by: mudler <mudler@c3os.io>

* Add error message

Signed-off-by: mudler <mudler@c3os.io>

* Add YAML validation and highlight

Signed-off-by: mudler <mudler@c3os.io>

* Fixup terminal output

Signed-off-by: mudler <mudler@c3os.io>

* Fix newlines

Signed-off-by: mudler <mudler@c3os.io>

* fixups

Signed-off-by: mudler <mudler@c3os.io>

* 🎨 Fixup lint issues

Signed-off-by: mudler <mudler@c3os.io>

* Mark dependencies

Signed-off-by: mudler <mudler@c3os.io>

* Let configure the listening address

Signed-off-by: mudler <mudler@c3os.io>

Signed-off-by: mudler <mudler@c3os.io>
Signed-off-by: check-spelling-bot <check-spelling-bot@users.noreply.github.com>
2023-01-05 14:15:05 +01:00
Ettore Di Giacinto
34c8ad827f seedling: Add /usr/local/system/providers to bus (#569)
This allows bundles to install providers in the persistent path
Signed-off-by: mudler <mudler@c3os.io>
2022-12-20 17:22:09 +01:00
mudler
836a039e6b robot: Add agent config bootstrap test
Signed-off-by: mudler <mudler@kairos.io>
2022-11-27 14:34:36 +01:00
Eng Zer Jun
c868bbaf9e art: Move from io/ioutil to io and os packages (#470)
refactor: move from io/ioutil to io and os packages

The io/ioutil package has been deprecated as of Go 1.16 [1]. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

[1]: https://golang.org/doc/go1.16#ioutil
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-11-22 01:11:03 +08:00
Dimitris Karakasilis
9011ce3419 Persist partition label/uuid mapping whenever we encrypt a partition (#408)
Fixes: https://github.com/kairos-io/kairos/issues/380

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
2022-11-16 13:35:59 +02:00