-
Notifications
You must be signed in to change notification settings - Fork 164
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
make real installer image, as own package #4248
Conversation
I would ask no one to approve this until multiple people have commented. I think eden tests are a waste of resources until then. @jsfakian has commented that he has tried it, and he thinks the installer might work on raw but not iso. Comment here please. |
What does this mean in yetus errors?
|
c31f516
to
9b2e945
Compare
9b2e945
to
30662be
Compare
@yash-zededa, could you please help understand why Yetus failed to run? Upd. Just restarting the workflow does not help =( |
30662be
to
ff0a0c4
Compare
Just checked. GHA throws an error
|
Yep, we saw it... But how come? |
Permission shouldn't be a problem. I've never encountered this error before. I'm looking into it to get more details. |
The new docs and README files would be helpful to put into https://github.com/lf-edge/eve/blob/master/docs/mkdocs/mkdocs.yml, as the team members use it for easier documentation exploration. |
ff0a0c4
to
db02f1e
Compare
@OhmSpectator done, good point, thank you. |
I think we saw it once before, but don't rely on my memory |
Of course, now that I split it into 10 distinct commits, to make it easier to review and understand each one, lint commit complains about the short commit messages. If you put it together, like the original single commit, it is quite large and detailed. Now it is 10 small and detailed. I am ignoring that complaint. |
@@ -0,0 +1,1279 @@ | |||
// Copyright (c) 2024 Zededa, Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this file a copy of pillar/cmd/tpmmgr/tpmmgr.go
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost. I trimmed it down a lot, just to what we need in installer. And to run standalone.
This all should be replaced soon enough by @jsfakian, I believe.
Is it ok? I ran
|
I will check it. |
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Dockerfile to build installer img initrd | ||
FROM lfedge/eve-alpine:c114cf1d3ea51534f061f9aa949beb6ac5c12fb3 AS build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use 82df60e43ab9f8c935584b8c7b4d0a4b0271d608 now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will bump.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure?
$ lkt pkg show-tag ./pkg/alpine
lfedge/eve-alpine:2ed33236f1eea746532f612d6c4b7779c5da2193
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, I will take yours. If they have to be update, we will do them all.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, CI caught the same thing. That is what it is there for 😄 |
Yeah, good catch. The |
ADD http://sources.buildroot.net/edid-decode/edid-decode-188950472c19492547e298b27f9da0d72cf826df.tar.gz /out/edid-decode-188950472c19492547e298b27f9da0d72cf826df.tar.gz | ||
ADD https://github.com/linuxhw/build-stuff/releases/download/1.6/hw-probe-1.6-AI.tar.gz /out/hw-probe-1.6-AI.tar.gz | ||
# Temporarily removed ubuntu VM image to make the verification image smaller. | ||
#ADD https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ubuntu-22.04-minimal-cloudimg-amd64.img /out/ubuntu-22.04-minimal-cloudimg-amd64.img |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea. 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do. These are tools used in the verifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove 34 and 35 if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was talking about the commented lines...
OK, this is going to take some work to get working with It turns out that Probably a day or so to figure this out. |
wireless-tools libxrandr eudev-libs libusb sudo fio iperf3 sysstat \ | ||
lm-sensors acpi iw libdrm hwinfo dhclient dmidecode smartmontools \ | ||
pciutils libgcc pixman glib libvncserver musl-utils dhclient \ | ||
qemu-system-x86_64 tpm2-tss-dev tpm2-tss-esys tpm2-tss-fapi tpm2-tss-rc \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need qemu-system-x86_64 in the installer?...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. But I don't want to change too much from how current installer+verifier works or what it has. The goal in this one is to replace the process for getting a working installer image (and clean up all of the complexity on the way, which includes how we build and grub and ipxe etc)
If this was there before, and doesn't break anything, let's leave it. We always can do another PR that just touches pkg/verifier
when done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm... It wasn't obvious to me that this came from an old version. I thought it was a new file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you are right, it wasn't clear. It consolidates everything that was in both the old installer and the old verification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you maybe describe in the commit message where you introduce a new package which part of it is taken from the old one?
Ok, could we mark the PR as a draft for now? I review it with a lower priority then. Ok? |
db02f1e
to
615b38a
Compare
How do I get the eden tests to run again? |
I reapproved to trigger the tests again. |
I don't understand this part:
What is the impact on the verifier image? Will that be included in the installer image? |
I'm not sure what that means. My understanding is that verifier is basically installer plus a bunch of verification tests. Tons of duplication. I dug into the code and that's what I saw. So I merged them. What does "verification image plus guest VMs" mean? It didn't fit with anything I saw? |
@eriknordmark, @deitch, Initially, with the verifier, I wanted to include various tests with guest VMs with different parameters. To achieve that, I included a small Ubuntu image (~250 MB) in the verifier. This caused some problems with the verification process, and I temporarily removed that Ubuntu image. So, Erik asks what we are going to do if we decide to add guest images to the verifier in the future (which is now the same as the installer). Are we okay with having a huge installer image? My idea was to add a very small Alpine VM (~10MB), which would be okay. What do you think? |
To my mind, that would be fine. Minimal impact. We aren't going to start having dozens of different verifier images, nor one with 20 VMs in it, making it many GBs of size. So either it will be static and small with no VMs (or 1-2 really small ones, like @jsfakian said), or dynamic, which will pull things down from somewhere (Internet? attached drive?), which means a whole new design for verifier than what we have today. Either way, we should be fine with this. |
@OhmSpectator it doesn't look to me like eden tests ran? |
strange... @yash-zededa, can you check, please? |
I tried rerunning it manually by selecting, "run all jobs" (i.e. those that were skipped), it does another run, but immediately says, "this job was skipped", not clear why, though. |
I think that's because of Yetus failure.... |
@deitch , have you opened the ticket on LF's Jira for the creation of pkg/installer at dockerhub? We need to have this repository in place before merging..... |
Of course, no one seems to know why yetus is failing (i.e. not even running).
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deitch , thanks for this hard work, the installer booting and overall process is much clear now... and I hope it can solve the installation for RPi (didn't test it yet)....
and documented. Funny, that is what I am most proud of.
If not, we can focus on fixing it just on a small part. |
Yup, all done yesterday. Docker Hub repo in place. |
Rate pull limits! |
eden is happy! Can we get request for changes, or approval (written) so we can merge? |
@eriknordmark , we will test it tomorrow, if you want to wait, I can merge it if everything works.... |
Yeah let's wait the extra day. |
Tested on:
Thanks @christoph-zededa for the help 👍 |
Complete revamp of installer build.
This is a fairly large PR. Unfortunately, I could not really break it into multiple.
In the past, the installer and verifier were heavily duplicated, and did a lot of "ugly hacking" to start the usual rootfs and inject the right installer/verifier container in before others. It was brittle, and made redoing the installer terribly painful and changing a lot of things. Even changing unrelated things could break them.
This PR completely revamps that.
Now we have two main parts:
images/installer.yml.in
, which builds a dedicated installer image, just likerootfs.yml.in
pkg/verifier
, which is the container that does install and verify. This is included ininstaller.yml.in
just likepkg/uefi
orpkg/pillar
are included inrootfs.yml.in
If you want to change how install works, or verification, or add a GUI or TUI, or options, or whatever, just change
pkg/verifier
and rebuild.The only links between
pkg/verifier
and the outside are the "debug" options. The installer reads/proc/cmdline
to determine if a certain setting is enabled, and if so, runs in debug mode and all of its output to the console. This is set in a grub menu option, which is inpkg/eve/installer/grub_installer.cfg
.Also redoes how grub files include each other. It was necessary to make all of the scenarios work, but is much cleaner.
Rather than getting
pkg/eve/installer/grub.cfg
to be called sometimes, and maybe accidentally overwrite the maingrub.cfg
, and worry about duplicate functions, etc., the maingrub.cfg
always is called, but it knows how to includegrub_include.cfg
. For installer images, that will be present, injected as part ofinstaller.yml.in
. We can expand this facility in the future if we need. But the execution chain is much simpler now. Always the same starting point ofgrub.cfg
(whose source ispkg/grub/rootfs.cfg
), and it knows to include others if they are found.Running net installer locally over qemu, via
make run-installer-net
, used to extract theinstaller.net
into the$(BUILD_DIR)/installer
directory. That could (and did) overwrite existing things by accident, and then you worry about why future things won't run. Instead, it now creates a new dir$(BUILD_DIR)/netboot
and boots from there.Because verification image no longer exists, removed all of the references to it in Makefile.
Added docs, notably to
pkg/installer/README.md
and detailed the boot chain indocs/BOOT-INSTALLER.md
. Hopefully no one will have to go through the weeks I went through to figure it all out.