* 🐛 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>
* Use site variables to update image flavor and name
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Typo
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Prefix variable names with distro name in os-release
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Adapt tests to read os-release with prefix
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Adapt docs to show how to read os-release with prefix
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Update SDK to be aware of attr prefixes
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Adapt test with new variable names
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Temporarily print the os-release
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Check KAIROS_VERSION on tests and fallback to VERSION
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Match kubo ID and VERSION_ID
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Make kubo extension match any ID
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Test still fails, trying with surrounding quotes
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Reduce tests wait time
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Use tumbleweed for bundles tests
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Update docs about systemd-sysext
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* reduce wait time in reset tests
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
---------
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* 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>
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>
* 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>
Looks like yip 1.x is not working as expected, skipping stages and
whatnot
This downgrades it to a know working 0.11.x version until those issues
are fixed
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Refactor tests to use the "VM" construct from peg
📖 Add cloud-config.json for v1.6.0 (#977)
:docs: Add cloud-config.json for v1.6.0
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
📖 Add documentation about schema validation (#978)
* 📖 Add documentation for cloud config validation
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Add image
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
* Move image to static dir
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
---------
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
🐛 Backport dracut patch for ubuntu 20 iscsi (#979)
🔧 Use random free port for Spice display and SSH
When running the install test with qemu, the second test will
fail because the 2nd machine will fail to start.
The failure is cause because the port of the previous machine is
still not freed.
Hence, let the install-test use a differnet random port if not
specified.
`GetFreePorts` copied from `kairos-io/kcrypt-challenger`.
Credits @jimmykarily.
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Update peg and use new VM interface
This enables creating mulitple VMs in parallel
as done in kairos-io/kcrypt-challenger.
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Handle possible collision of spice and SSH ports
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Migrate all tests to new PEG API
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Remove one more reference to old API.
Replace Machine.SendFile with vm.Scp
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Try and fix bundle_tests
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Temporarily disable many flavours
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
Bump peg and fix code
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Remove unecessary output and fix test issues
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Make sure we install before we start checking things.
It seems that we were relying on previous tests to do the installation
because we only had one "Machine".
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Bump peg to better handle "Sudo", dedup tests
and make sure installation has happened before every check
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Wait until systemd service becomes active
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Merge multiple similar tests into one
because the big overhead comes from the BeforeEach block which is the
same in all tests. The tests themselves are just checking differnet
things on similar VMs. By merging them we same a lot of time in
preparing the same env again and again.
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Fix forgotten "Machine"
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Bring all flavors back
This partly reverts commit aa029c20acd79c46122783aad030e2a5410a9374.
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Merge similar tests an uncomment code
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Fix fogotten global Machine function
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Wait for systemd-sysext to do its thing
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Fix forgotten global Sudo and remove gatherLogs
which wasn't working anyway
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Fixes after rebase
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Fix `source` not present in ubuntu/debian `/bin/sh`
and add debug output to failed test
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Bump peg to fix "read only filesystem" error in tests
50b63c0bf8
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Use "." instead of "source" in vm's "/bin/sh"
because "source" is not recognised in debian based flavors
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* Bump peg to fix vm.Sudo problems
and remove redundant check.
Now peg just pipes the ssh command without creating tmp scripts
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
---------
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
Co-authored-by: Dimitris Karakasilis <dimitris@karakasilis.me>
* 🌱 Detect more information about runtime
This introduces a `system` and a `kairos` block available in
kairos-agent get state.
This allows for instance to query the agent for the kairos version as
such:
`kairos-agent get state kairos.version`
Part of #755
Signed-off-by: mudler <mudler@c3os.io>
* 🤖 Fixup tests
Signed-off-by: mudler <mudler@c3os.io>
---------
Signed-off-by: mudler <mudler@c3os.io>