We were listing on a dir that now doesn't exist necessarly anymore, and
when picking up the iso from latest release, we are selectively
pickingone flavor for the upgrade test.
Signed-off-by: mudler <mudler@c3os.io>
* ⚠️🎨✨ Use immucore
Build kairos with immmucore instead of cos-immutable-rootfs
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* 🐛 Fix state sdk
State sdk is using ghw to identify the state of the disks, but
unfortunately ghw only works with devices and not with labels
This patch adds a workaround by checking deeper for partitions that
migth not have mountpoints reported by ghw but are indeed mounted
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* 🐛 Fix state not catching netboot properly
This worked with the old cos-immutable-rootfs due to the rd.cos.disable
stanza in cmdline making the livecd cloud config file trigger, which
created the livecd sentinel file.
With immucore, the sentinel is being created during initramfs directly
so we need to rely on the cmdline to identify it.
State sdk should know that having the netboot stanza should identify the
boot as cdlive
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Fix custom binds set as RW_PATHS
RW_PATHS are meant for overlay dirs which go away after a reboot.
Custom binds/binds are mounted under COS_PERSISTENT, so they persist
after reboot AND are RW by default.
This patch removes adding the custom binds into the RW_PATHS on the
cos-layout file as that can lead to unintended consequences
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Dont run custom mounts on livecd and recovery
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Rework writing custom ephemeral/binds
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Maybe fix tests
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* Add missing sgdisk to ubuntu images
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
* 🐛 Backport dracut patch for ubuntu 20 iscsi
There was an issue with dracut 48 in which the iscsid.socket required fs
targets to be ready. On an iso this could lead to a dependency cycle
between the dmsquash module setting up the livecd rootfs and the iscsi
socket required the initrd-fs to be ready.
This was fixed on dracut 50 and its what this patch brings, dropping the
socket dependency on the fs target so it can break the dependency cycle.
This only affect ubuntu 20 lts, and only affects booting from the iso.
Alos the issue is random as systemd will decide to break the dependency
in a non predictable way by disabling one of the services that conflict,
so sometimes it would be the iscsi serviec, which would make the iso
boot but sometimes it could be other more important services liek teh
local fs or the dracut pre-mount services.
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
(cherry picked from commit 63f0c75d69ab3adca143f917c2e31b75ca3d96c7)
* Bump immucore
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
---------
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
* 🐛 Add back gdisk to ubuntu/debian images
Signed-off-by: mudler <mudler@c3os.io>
* 🤖 No need to install mkisofs here
Signed-off-by: mudler <mudler@c3os.io>
---------
Signed-off-by: mudler <mudler@c3os.io>
Currently is done during docker image but it makes no sense, it should
be during framework otherwise framework images do not contain the binary
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Add temp-image Earthly target
This is helpful to quickly generate temp images and upload them to
ttl.sh plus you can quickly distinguish the images by branch and sha
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Add docker versioning for the `RENOVATE_VERSION`
This isn't being picked up in the dashboard (#310), and it might be
because `34` isn't a proper semver.
Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
Mange the version of quay.io/kairos/osbuilder-tools with renovate
This should trigger an update in short order as the current version of
this image is v0.5.2.
Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
Now that the config is more than the stock config, and folks are
interested in using it more, we should have some automation to verify
that the config is valid.
Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
Have renovate manage image versions in `Earthfile`
This change adds support for renovate to be able to update the versions
of `quay.io/luet/base`, `golang`, and `hadolint`.
Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
* 🔧 merge custom mounts tests
Since the feature is now merged, we no longer need
a single label for this. This saves a few CI cycles.
To acheive this, we add the correct sections to the normal
install sections and assert that these paths exist.
The previous assertions are kept, but in order to make
code a bit more readable, I extracted the anonymous function
that collects the data from the installed VM.
Instead of repeating the installation 4 times, we now only
repeat the installation 2 times.
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
* Refactor tests
Works with VBox, fails with QEMU
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
* Fix cloud-config identation
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
---------
Signed-off-by: Oz Tiram <oz@spectrocloud.com>
* Pull out golint into its own target
Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
* run hadolint on the Docker files in images/
Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
* Ignore existing failures of hadolint, at least for now
Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
---------
Signed-off-by: Shawn Wilsher <656602+sdwilsh@users.noreply.github.com>
Looks like there was missing docs for the --keep-own flag on easrthly
and we can indeed keep permissions for all dirs/files when copying
artifacts, but the flag needs to be both on the SAVE ARTIFACT and in the
COPY stanzas.
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
Co-authored-by: Itxaka <itxaka@spectrocloud.com>
* ✨ 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>
Space gained is negligible, just a few Kbs usually (with gzip as its
currently) but the speed up improvements in building the ISO are really
good, for 20 seconds to 40 seconds per ISO build, and that gets more accentuated
on CI runs where the runners are more CPU constrained.
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
Co-authored-by: Itxaka <itxaka@spectrocloud.com>
Looks like a ] was missing and instead of crashing and burning, earthly
continued happily, which meant that on v1.5.0 ARM tumbleweed images the
initrd is missing as earthly failed to parse the check but did not
errored out.
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
Co-authored-by: Itxaka <itxaka@spectrocloud.com>
* ✨ add tumbleweed flavor
- Adds new opensuse-tumbleweed and opensuse-tumbleweed-arm-rpi flavors
- Renames opensuse to opensuse-leap
- Adapt earthfile to new names
- Adapt CI to new names
- Drop uneeded argument from dockerfiles
- Updates docs to point older core-opensuse mentions to new
core-opensuse-leap flavor.
- Add core-opensuses-tumbleweed flavor to matrix of version
- Point to new kairos provider repos which include the version in the
naming
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
No Need to generate the sha sum for the iso manually, elemental already does it
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
Co-authored-by: Itxaka <igarcia@suse.com>
* 🌱 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>