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

Create the k3s package using the upstream installer script #335

Merged
merged 9 commits into from
Jul 24, 2023

Conversation

jimmykarily
Copy link
Contributor

Hoping to replace these commands with a simple luet install.

@jimmykarily jimmykarily self-assigned this Jul 18, 2023
@jimmykarily jimmykarily force-pushed the 1609-k3s-package-with-installer branch from 202d0c2 to 2c33d2a Compare July 18, 2023 13:17
Though the autobumper will be confused:
kairos-io/kairos#1624

Signed-off-by: Dimitris Karakasilis <[email protected]>
@jimmykarily
Copy link
Contributor Author

CI fails. It's reproducible locally with:

sudo luet build --tree packages k8s/k3s

not sure what's wrong yet.

@Itxaka
Copy link
Member

Itxaka commented Jul 24, 2023

INFO Error response from daemon: dockerfile parse error line 15: unknown instruction: EXPORT ???

- INSTALL_K3S_SKIP_ENABLE="true"
- INSTALL_K3S_SKIP_SELINUX_RPM="true"
prelude:
{{$arch:=(default .Values.arch "amd64")}}
Copy link
Member

Choose a reason for hiding this comment

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

could this be the issue? After all this is a templating instruction so the prelude will be empy

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.

nice

Signed-off-by: Dimitris Karakasilis <[email protected]>
@jimmykarily
Copy link
Contributor Author

The steps are run as dockerfile RUN entries. I moved the setting of env vars in the env: section and fixed that issue. Not there is another problem, that the upstream installer script cannot detect systemd/openrc inside a docker image:

       #9 [5/9] RUN bash installer.sh
 INFO   #9 0.297 [ERROR]  Can not find systemd or openrc to use as a process supervisor for k3s
       #9 ERROR: process "/bin/sh -c bash installer.sh" did not complete successfully: exit code: 1
       ------
        > [5/9] RUN bash installer.sh:
       0.297 [ERROR]  Can not find systemd or openrc to use as a process supervisor for k3s

@Itxaka
Copy link
Member

Itxaka commented Jul 24, 2023

The steps are run as dockerfile RUN entries. I moved the setting of env vars in the env: section and fixed that issue. Not there is another problem, that the upstream installer script cannot detect systemd/openrc inside a docker image:

       #9 [5/9] RUN bash installer.sh
 INFO   #9 0.297 [ERROR]  Can not find systemd or openrc to use as a process supervisor for k3s
       #9 ERROR: process "/bin/sh -c bash installer.sh" did not complete successfully: exit code: 1
       ------
        > [5/9] RUN bash installer.sh:
       0.297 [ERROR]  Can not find systemd or openrc to use as a process supervisor for k3s

Im guessing you can get it to detect systemd by setting the image key as it was before so the base system has systemd or openrc or whatever.

Now Im guessing that is why the check for init.systemd was in there lol.

But it could also mean that we need two packages? one for systemd and one for openrc?

Signed-off-by: Dimitris Karakasilis <[email protected]>
Signed-off-by: Dimitris Karakasilis <[email protected]>
@jimmykarily
Copy link
Contributor Author

For now I opted for installing service files for both systemd (openrc and systemd). No OS would ever consume both so just having the other one laying around shouldn't be a problem (or is it?)

@jimmykarily
Copy link
Contributor Author

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.

if it works, it works!

jimmykarily and others added 3 commits July 24, 2023 16:06
because the default argument comes first, then the value to check

Signed-off-by: Dimitris Karakasilis <[email protected]>
@jimmykarily jimmykarily merged commit 764c3b9 into main Jul 24, 2023
3 checks passed
@jimmykarily jimmykarily deleted the 1609-k3s-package-with-installer branch July 24, 2023 14:52
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.

3 participants