Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into sdwilsh:debian-ha…
Browse files Browse the repository at this point in the history
…dolint-fixes

Signed-off-by: Shawn Wilsher <[email protected]>
  • Loading branch information
sdwilsh committed Feb 8, 2023
2 parents 9a99177 + 9e7a1ad commit bc4dd6c
Show file tree
Hide file tree
Showing 14 changed files with 119 additions and 143 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -193,26 +193,6 @@ jobs:
./earthly.sh +datasource-iso --CLOUD_CONFIG=tests/assets/autoinstall.yaml
./earthly.sh +run-qemu-datasource-tests --FLAVOR=${{ matrix.flavor }} --SSH_PORT=${{ matrix.port }}
qemu-custom-mount-tests:
needs:
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- flavor: "opensuse-leap"
steps:
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: kairos-${{ matrix.flavor }}.iso.zip
- run: |
./earthly.sh +run-qemu-custom-mount-tests --FLAVOR=${{ matrix.flavor }}
qemu-bundles-tests:
needs:
- build
Expand Down
21 changes: 0 additions & 21 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -493,27 +493,6 @@ run-qemu-datasource-tests:

RUN PATH=$PATH:$GOPATH/bin ginkgo -v --label-filter "$TEST_SUITE" --fail-fast -r ./tests/

run-qemu-custom-mount-tests:
FROM +ginkgo
RUN apt install -y qemu-system-x86 qemu-utils git && apt clean
ARG FLAVOR

COPY . .
RUN ls -liah
IF [ -e /build/kairos.iso ]
ENV ISO=/build/kairos.iso
ELSE
COPY +iso/kairos.iso kairos.iso
ENV ISO=/build/kairos.iso
END

ENV GOPATH="/go"
ARG TEST_SUITE=custom-mounts-test
ENV SSH_PORT=60024
ENV CREATE_VM=true
ENV USE_QEMU=true
RUN pwd && ls -liah
RUN PATH=$PATH:$GOPATH/bin ginkgo -v --label-filter custom-mounts-test --fail-fast -r ./tests/

run-qemu-netboot-test:
FROM +ginkgo
Expand Down
31 changes: 31 additions & 0 deletions docs/content/en/blog/Kairos-at-FOSDEM-2023.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "Kairos at FOSDEM 2023"
date: 2023-02-07T10:53:13+01:00
author: Mauro Morales ([Twitter](https://twitter.com/mauromrls)) ([GitHub](https://github.com/mauromorales))
---

I recently had the opportunity to attend FOSDEM 2023 and share a bit about the Kairos project. In this post I want to summarize what I presented and share other interesting presentations I attended, which I believe are relevant for Kairos and our community.

## How we build and maintain Kairos

I had the opportunity to share about [How we build and maintain Kairos](https://fosdem.org/2023/schedule/event/kairos/). In first half of the presentation, I introduce the different elements that make Kairos a great OS for Edge Kubernetes. During the second half of the presentation you will get an overview of how the Kairos Factory works, starting from those different Linux distributions all the way up to producing Kairos core and standard images. Because my presentation took place in the Distributions Devroom, I put some extra emphasis on the challenges we have to be distribution agnostic.

The talk is intended to newcomers, so I made an effort to describe things in a simple and welcoming language. However, I think it can also be interesting for those who might already know about Kairos but wonder how to extend the core and standard images, or simply have a better understanding of how all the pieces interconnect.

Like I mentioned, the presentation took place in the Distributions Devroom and we're very thankful to them for hosting us. While it was a great experience and the talk seemed to have a good reception, I now realize that the topic is probably more relevant for a different devroom, for example, the [
Image-based Linux and Secure Measured Boot devroom
](https://fosdem.org/2023/schedule/track/image_based_linux_and_secure_measured_boot/), which I'll make sure to send proposals next year.

## Other talks which are relevant to Kairos

There were other interesting presentations I had the opportunity to attend, which I think are also relevant to Kairos and our community. These would be my top picks:

If you're completely new to the concepts of Image-Based Linux, Unified Kernel Image or Discoverable Disk Image, I'd recommend checking Luca Bocassi's talk [Introducing and decoding image-based Linux terminology and concepts](https://fosdem.org/2023/schedule/event/image_linux_secureboot_uki_ddi_ohmy/). As someone who very recently joined the Kairos project, I still get a bit lost with all the different technologies used in Image-Based Linux. The presenter made a good job clarifying some of these technologies and how they work together.

One of the key presentations in my opinion was Lennart Poettering's, [Measured Boot, Protecting Secrets and you](https://fosdem.org/2023/schedule/event/image_linux_secureboot_tpm/), where he talks about Trusted Plataform Modules and upcoming functionality in systemd. I'm pretty sure there will be some of these features which will be relevant for Kairos sooner rather than later.

Last but not least, there was an interesting talk by Gabriel Kerneis about [User-friendly Lightweight TPM Remote Attestation over Bluetooth](https://fosdem.org/2023/schedule/event/image_linux_secureboot_ultrablue/). My guess is that we will continue seeing different methods to do and simplify attestation and because one of our goals at the Kairos project is to be as friendly as we can to our user base, then I can only imagine we will end up introducing some sort of remote attestation technologies like Ultrablue in the future.

## Conclusion

FOSDEM is a very important conference when it comes to free and open source software and I'm very happy that Kairos was present. First of all because I think the work we're doing with Kairos is helping solve some of the most challenging issues of running cloud native applications on the edge, but also because as an open source project, it was nice to introduce ourselves to the community there and start a conversation. Expect us to keep engaging with you in further editions of FOSDEM and other conferences!
1 change: 1 addition & 0 deletions docs/content/en/blog/media-section.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Media Section"
date: 2023-01-04T17:17:11+01:00
author: Mauro Morales ([Twitter](https://twitter.com/mauromrls)) ([GitHub](https://github.com/mauromorales))
---

We've added a new media section so it's easy to find the different videos and articles about Kairos. To access it, go to the Documentation and at the bottom of the left menu, you will find a link called Media.
Expand Down
4 changes: 2 additions & 2 deletions docs/content/en/blog/release-v1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Kairos release v1.5"
date: 2023-01-27
linkTitle: "Announcing v1.5 Kairos release"
description: "Introducing Kairos 1.5: A Smarter, More Secure Way to Manage Your Infrastructure"
author: Ettore Di Giacinto ([Twitter](https://twitter.com/mudler_it)) ([Github](https://github.com/mudler))
author: Ettore Di Giacinto ([Twitter](https://twitter.com/mudler_it)) ([GitHub](https://github.com/mudler))
---
<h1 align="center">
<br>
Expand Down Expand Up @@ -38,4 +38,4 @@ Kairos 1.5 allows you to extend the configuration of your node with custom, cont

---

For a full list of changes, see the [Changelog](https://github.com/kairos-io/kairos/releases/tag/v1.5.0). We hope you find these updates useful and as always, let us know if you have any questions or feedback. Thanks for using Kairos!
For a full list of changes, see the [Changelog](https://github.com/kairos-io/kairos/releases/tag/v1.5.0). We hope you find these updates useful and as always, let us know if you have any questions or feedback. Thanks for using Kairos!
5 changes: 2 additions & 3 deletions framework-profile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ ubuntu-kernel:
systemd-latest:
packages:
- dracut/sysext
- dracut/systemd-resolved
repositories:
- &kairos
name: "kairos"
Expand All @@ -90,9 +89,9 @@ repositories:
priority: 2
urls:
- "quay.io/kairos/packages"
reference: 20230205173213-repository.yaml
reference: 20230207111419-repository.yaml
- !!merge <<: *kairos
arch: arm64
urls:
- "quay.io/kairos/packages-arm64"
reference: 20230205172555-repository.yaml
reference: 20230207112527-repository.yaml
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/onsi/gomega v1.26.0
github.com/pterm/pterm v0.12.54
github.com/qeesung/image2ascii v1.0.1
github.com/spectrocloud/peg v0.0.0-20230130095319-a5208a005575
github.com/spectrocloud/peg v0.0.0-20230207104055-5f48d834ddf6
github.com/twpayne/go-vfs v1.7.2
github.com/urfave/cli/v2 v2.24.3
golang.org/x/net v0.5.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ github.com/spectrocloud/peg v0.0.0-20230126082901-925f4b5310f4 h1:pmgQfIqkgb1svm
github.com/spectrocloud/peg v0.0.0-20230126082901-925f4b5310f4/go.mod h1:YMaL3lRGnHWV5lfAorzH1dTwc5BL7gU0ILLYbS6elPw=
github.com/spectrocloud/peg v0.0.0-20230130095319-a5208a005575 h1:MVc4NMEFOHojjCADp+tgGuPcMtuvyMhHe0R935Hwlt4=
github.com/spectrocloud/peg v0.0.0-20230130095319-a5208a005575/go.mod h1:YMaL3lRGnHWV5lfAorzH1dTwc5BL7gU0ILLYbS6elPw=
github.com/spectrocloud/peg v0.0.0-20230207104055-5f48d834ddf6 h1:21+a7wprqouCWb204xWC7kJY1iO60l1KM+/YRSsxRVk=
github.com/spectrocloud/peg v0.0.0-20230207104055-5f48d834ddf6/go.mod h1:YMaL3lRGnHWV5lfAorzH1dTwc5BL7gU0ILLYbS6elPw=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
Expand Down
5 changes: 5 additions & 0 deletions images/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@ RUN apt-get update \
sudo \
systemd \
systemd-sysv \
<<<<<<< HEAD
systemd-timesyncd \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
=======
xz-utils \
&& apt-get clean
>>>>>>> upstream/master

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
Expand Down
18 changes: 12 additions & 6 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ import (
"gopkg.in/yaml.v3"
)

const DefaultWebUIListenAddress = ":8080"
const (
DefaultWebUIListenAddress = ":8080"
FilePrefix = "file://"
)

type Install struct {
Auto bool `yaml:"auto,omitempty"`
Expand Down Expand Up @@ -53,11 +56,11 @@ type Config struct {
type Bundles []Bundle

type Bundle struct {
Repository string `yaml:"repository,omitempty"`
Rootfs string `yaml:"rootfs_path,omitempty"`
DB string `yaml:"db_path,omitempty"`

Targets []string `yaml:"targets,omitempty"`
Repository string `yaml:"repository,omitempty"`
Rootfs string `yaml:"rootfs_path,omitempty"`
DB string `yaml:"db_path,omitempty"`
LocalFile bool `yaml:"local_file,omitempty"`
Targets []string `yaml:"targets,omitempty"`
}

const DefaultHeader = "#cloud-config"
Expand All @@ -84,6 +87,9 @@ func (b Bundles) Options() (res [][]bundles.BundleOption) {
if bundle.DB != "" {
opts = append(opts, bundles.WithDBPath(bundle.DB))
}
if bundle.LocalFile {
opts = append(opts, bundles.WithLocalFile(true))
}
res = append(res, opts)
}
}
Expand Down
7 changes: 7 additions & 0 deletions sdk/bundles/bundles.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ func WithTarget(p string) BundleOption {
}
}

func WithLocalFile(p bool) BundleOption {
return func(bc *BundleConfig) error {
bc.LocalFile = p
return nil
}
}

func (bc *BundleConfig) extractRepo() (string, string, error) {
s := strings.Split(bc.Repository, "://")
if len(s) != 2 {
Expand Down
55 changes: 0 additions & 55 deletions tests/custom_mount_test.go

This file was deleted.

Loading

0 comments on commit bc4dd6c

Please sign in to comment.