Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1609 release standard images #1689

Merged
merged 42 commits into from
Aug 8, 2023
Merged

Conversation

jimmykarily
Copy link
Contributor

Fixes #1609

Earthfile Outdated
RUN ln -s /system/providers/agent-provider-kairos /usr/bin/kairos
END

INSTALL_NOHANG:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we just add this pacakge to the base images and ignore this altogether? Its just one package no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be possible, yes, will give this a try.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never handled almalinux, rockylinux, debian... I should probably add the package to all of them?

Earthfile Outdated
IF [[ "$PROVIDER_KAIROS_BRANCH" = "" ]] # Install with luet (released versions of the binary)
# If base image does not bundle a luet config use one
# TODO: Remove this, use luet config from base images so they are in sync
IF [ ! -e "/etc/luet/luet.yaml" ]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be removed now.

The reason for this on the provider repo was that the base image from kairos could already provide the framework file and we could drop it from the provider repo, but now that we are building from here directly, we could just drop it altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

COMMAND

ARG K3S_VERSION
IF [[ "$K3S_VERSION" = "" ]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make this to be latest the default? Otherwise you get the full build until this point then it fails :/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's easy to forget to pass this arg in a workflow. The result would be an artifact that will advertise itself (for example) as 1.25.11 but inside it would have the latest k3s. Given how Earthly caches things, when this fails, the next try is a lot faster. It's still annoying that it fails late but I think its worth it as a tradeoff, what do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah good to me, I would like a different option for this to fail earlier but this is good for now, lets merge this asap!

Earthfile Show resolved Hide resolved
Earthfile Outdated Show resolved Hide resolved
Itxaka
Itxaka previously approved these changes Aug 8, 2023
Copy link
Member

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All nits, not blockers

Earthfile Outdated
IF [ "$FLAVOR" = "opensuse-leap" ] || [ "$FLAVOR" = "opensuse-leap-arm-rpi" ]
RUN zypper ref && zypper in -y nohang
ELSE IF [ "$FLAVOR" = "alpine-ubuntu" ] || [ "$FLAVOR" = "alpine-opensuse-leap" ] || [ "$FLAVOR" = "alpine-arm-rpi" ]
RUN apk add grep
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😕 So since alpine doesn't have nohang we decided to install grep instead ? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only enable this on systemd: https://github.com/kairos-io/kairos/blob/master/overlay/files/system/oem/09_services.yaml#L21-L22

So the question is, how does this work on systemd flavors that don't have it?
(fedora, rockylinux, almalinux)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol

Itxaka
Itxaka previously approved these changes Aug 8, 2023
Copy link
Member

@Itxaka Itxaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets gooooo

Comment on lines +31 to +34
# nohang
RUN add-apt-repository ppa:oibaf/test
RUN apt-get install -y nohang

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not really needed since we don't build standard images for this flavor (https://github.com/kairos-io/kairos/pull/1689/files#diff-5cb44b260a8400267a5ff9938571e2022a5ef59730459941d173f5b5fffb389c).

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
E.g. Invoke it as:

earthly +iso -PROVIDER_KAIROS=true -PROVIDER_KAIROS_VERSION=2.3.0 -K3S_VERSION=1.24.2

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
because when we install with luet, the version is defined by the
repository in framework-profile.yaml

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
They are already in the required format for luet

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
because the top level default always wins (Earthly...)

and downgrade osbuilder because it breaks arm builds. This should fix it:

kairos-io/osbuilder#80

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
mauromorales and others added 25 commits August 8, 2023 16:34
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
to see if they are actually needed anywhere

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
we will deal with it on another PR

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
because the framework-profile should already be in place

(Fixes based on PR comments)

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
and remove the Earthly target for that.

Question: We only enable this on systemd:
  https://github.com/kairos-io/kairos/blob/master/overlay/files/system/oem/09_services.yaml#L21-L22
  What about systemd flavors that don't have it? (fedora, rockylinux,
  almalinux)

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
and stop running the release pipeline our current branch

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
@jimmykarily jimmykarily merged commit 817f4ee into master Aug 8, 2023
7 of 8 checks passed
@jimmykarily jimmykarily deleted the 1609-release-standard-images branch August 8, 2023 14:12
jimmykarily added a commit to kairos-io/provider-kairos that referenced this pull request Aug 8, 2023
…os (#472)

TODO: Build standard images for all flavors in kairos on "master", so
that we can completely remove the image building code from this repo
(and the rest of the image building pipelines). This way, there won't be
any duplication anymore.

Part of [#1609](kairos-io/kairos#1609)
Goes together with: kairos-io/kairos#1689

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

⚠️ Build provider-kairos in this repository
3 participants