-
Notifications
You must be signed in to change notification settings - Fork 13
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
kola: add http server #419
Conversation
this param allows to override the default base URL for fetching the dev container. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
this function can be used outside in case one cluster starts without initial size but we want Kolet to be uploaded on the instances. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
it serves a directory /var/www on the port 8080 Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Tested locally with $ sudo bin/kola run --board=amd64-usr --parallel=10 --platform=qemu --qemu-bios=flatcar_production_qemu_uefi_efi_code.fd --qemu-image=flatcar_production_image.bin --tapfile=result.tap --qemu-skip-mangle --devcontainer-file=flatcar_developer_container.bin.bz2 devcontainer.systemd-nspawn devcontainer.docker
=== RUN devcontainer.docker
=== RUN devcontainer.systemd-nspawn
--- PASS: devcontainer.systemd-nspawn (344.18s)
--- PASS: devcontainer.docker (415.75s)
PASS, output in _kola_temp/qemu-2023-03-15-1233-645068
$ cat result.tap
1..2
ok - devcontainer.systemd-nspawn
ok - devcontainer.docker |
} | ||
|
||
scriptParameters := scriptTemplateParameters{ | ||
BinhostURLTemplate: "http://bincache.flatcar-linux.net/boards/@ARCH@-usr/@VERSION@/pkgs", |
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 also need to pass the pkgs
folder to the instance? This bincache path only works for developer builds made on Jenkins but since this here is meant to be used in GitHub Actions, nothing will be there.
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.
(Testing with the nightly image means that it will use bincache, the question is what happens when we have a dev version not built on Jenkins)
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.
Oh right, I did not even consider this because I used images from a nightly build for my testing above.
A --devcontainer-binhost-url
would indeed be needed.
We would also need to export the packages in the Build CI job and fetch that artifact in the kola CI job. Making a metal note for my work on flatcar/Flatcar#794.
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.
So, the idea would be to run a local python -m http.server
before running kola to give it access to the pkgs folder and then use the new image flag for the image?
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.
Or rather not use the new image flag because it would occupy disk space on the VM, and use the temporary python http server for both.
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.
you can use a temporary python server and use the two new flags (--devcontainer{,-binhost}-url
) - I'm just curious about network consideration (if the qemu instance can reach the python server)
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.
Since this runs in VMs with private addresses I guess it will be enough to let it bind to 0.0.0.0 as done by default and then use the VM's internal IP address for the HTTP URL
cmd/kola/options.go
Outdated
@@ -73,6 +73,9 @@ func init() { | |||
// general options | |||
sv(&outputDir, "output-dir", "", "Temporary output directory for test data and logs") | |||
sv(&kola.TorcxManifestFile, "torcx-manifest", "", "Path to a torcx manifest that should be made available to tests") | |||
sv(&kola.DevcontainerURL, "devcontainer-url", "http://bincache.flatcar-linux.net/images/@ARCH@/@VERSION@", "URL to a dev container archive that should be made available to tests") | |||
sv(&kola.DevcontainerBinhostURL, "devcontainer-binhost-url", "http://bincache.flatcar-linux.net/boards/@ARCH@-usr/@VERSION@/pkgs", "URL to a binary host that the devcontainer test should use") | |||
sv(&kola.DevcontainerFile, "devcontainer-file", "", "Path to a dev container archive that should be made available to tests") |
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.
sv(&kola.DevcontainerFile, "devcontainer-file", "", "Path to a dev container archive that should be made available to tests") | |
sv(&kola.DevcontainerFile, "devcontainer-file", "", "Path to a dev container archive that should be made available to tests as alternative to devcontainer-url, note that a working devcontainer-binhost-url is still needed") |
this option allows to pass arbitrary local dev container archive to be uploaded and served by a HTTP server in order to be consumed by the devcontainer test. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
this param allows to override the default devcontainer binhost URL for the devcontainer test. Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
3acbf8c
to
cd05fb3
Compare
In this PR, we add a simple HTTP server that runs on the started instance to serve
/var/www
content on port:8080
. It can be used for example to serve a dev container archive provided by--devcontainer-file ./local-flatcar_developer_container.bin.bz2
We could also think about using it to test sysext images?
NOTE: Regarding the devcontainer test, we also add a new flag
--devcontainer-url
to provide a different base URL.Closes: flatcar/Flatcar#976