-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[v1.11] CI: revamp rootfs artifacts #4858
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d457f0b
ci: generate ext4 image after downloading artifacts
pb8o efdbcd6
ci: build debug kernels
pb8o d96bbc9
ci: compress squashfs with zstd
pb8o 60ce4fa
fix: workaround socat 1.8.0 bug
pb8o c2d663b
chore(rootfs): update rootfs to Ubuntu 24.04
pb8o 76cb262
ci: generate SSH key after downloading artifacts
pb8o fd0fd7e
tests: add Microvm.ssh.Popen command
pb8o 56f0dec
devctr: add trace-cmd
pb8o 1dedc19
tests: add a trace-cmd helper
pb8o 4e11e1a
ci: use new CI rootfs 24.04
pb8o c82fb3e
ci: move create_snapshot_artifact to a test
pb8o 052775d
ci: reduce storage of snapshots in cross-restore test
pb8o f0a6f7c
doc: fix downloading kernel for ARM instances
pb8o c64a0eb
test: drop ubuntu version from rootfs fixture name
pb8o 9f131e2
devctr: add zstd
pb8o 6fb346d
test: add debug information to debug kernels
pb8o 3b7c357
devctr: pin cargo-deny until we upgrade Rust version
pb8o File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ You can check if your system meets the requirements by running | |
`firecracker/tools/devtool checkenv`. | ||
|
||
An opinionated way to run Firecracker is to launch an | ||
[EC2](https://aws.amazon.com/ec2/) `c5.metal` instance with Ubuntu 22.04. | ||
[EC2](https://aws.amazon.com/ec2/) `c5.metal` instance with Ubuntu 24.04. | ||
|
||
Firecracker requires [the KVM Linux kernel module](https://www.linux-kvm.org/) | ||
to perform its virtualization and emulation tasks. | ||
|
@@ -95,24 +95,26 @@ For simplicity, this guide will not use the [`jailer`](../src/jailer/). | |
|
||
To successfully start a microVM, you will need an uncompressed Linux kernel | ||
binary, and an ext4 file system image (to use as rootfs). This guide uses a 5.10 | ||
kernel image with a Ubuntu 22.04 rootfs from our CI: | ||
kernel image with a Ubuntu 24.04 rootfs from our CI: | ||
|
||
```bash | ||
ARCH="$(uname -m)" | ||
|
||
latest=$(wget "http://spec.ccfc.min.s3.amazonaws.com/?prefix=firecracker-ci/v1.10/x86_64/vmlinux-5.10&list-type=2" -O - 2>/dev/null | grep "(?<=<Key>)(firecracker-ci/v1.10/x86_64/vmlinux-5\.10\.[0-9]{3})(?=</Key>)" -o -P) | ||
latest=$(wget "http://spec.ccfc.min.s3.amazonaws.com/?prefix=firecracker-ci/v1.10/$ARCH/vmlinux-5.10&list-type=2" -O - 2>/dev/null | grep -oP "(?<=<Key>)(firecracker-ci/v1.10/$ARCH/vmlinux-5\.10\.[0-9]{1,3})(?=</Key>)") | ||
|
||
# Download a linux kernel binary | ||
wget "https://s3.amazonaws.com/spec.ccfc.min/${latest}" | ||
|
||
# Download a rootfs | ||
wget "https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.10/${ARCH}/ubuntu-22.04.ext4" | ||
|
||
# Download the ssh key for the rootfs | ||
wget "https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.10/${ARCH}/ubuntu-22.04.id_rsa" | ||
|
||
# Set user read permission on the ssh key | ||
chmod 400 ./ubuntu-22.04.id_rsa | ||
wget -O ubuntu-24.04.squashfs.upstream "https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.10/${ARCH}/ubuntu-24.04.squashfs" | ||
|
||
# Create an ssh key for the rootfs | ||
unsquashfs ubuntu-24.04.squashfs.upstream | ||
ssh-keygen -f id_rsa -N "" | ||
cp -v id_rsa.pub squashfs-root/root/.ssh/authorized_keys | ||
mv -v id_rsa ./ubuntu-24.04.id_rsa | ||
# re-squash | ||
mksquashfs squashfs-root ubuntu-24.04.squashfs -all-root -noappend -comp zstd | ||
``` | ||
|
||
### Getting a Firecracker Binary | ||
|
@@ -238,7 +240,7 @@ sudo curl -X PUT --unix-socket "${API_SOCKET}" \ | |
}" \ | ||
"http://localhost/boot-source" | ||
|
||
ROOTFS="./ubuntu-22.04.ext4" | ||
ROOTFS="./ubuntu-24.04.ext4" | ||
|
||
# Set rootfs | ||
sudo curl -X PUT --unix-socket "${API_SOCKET}" \ | ||
|
@@ -280,13 +282,13 @@ sudo curl -X PUT --unix-socket "${API_SOCKET}" \ | |
sleep 2s | ||
|
||
# Setup internet access in the guest | ||
ssh -i ./ubuntu-22.04.id_rsa [email protected] "ip route add default via 172.16.0.1 dev eth0" | ||
ssh -i ./ubuntu-24.04.id_rsa [email protected] "ip route add default via 172.16.0.1 dev eth0" | ||
|
||
# Setup DNS resolution in the guest | ||
ssh -i ./ubuntu-22.04.id_rsa [email protected] "echo 'nameserver 8.8.8.8' > /etc/resolv.conf" | ||
ssh -i ./ubuntu-24.04.id_rsa [email protected] "echo 'nameserver 8.8.8.8' > /etc/resolv.conf" | ||
|
||
# SSH into the microVM | ||
ssh -i ./ubuntu-22.04.id_rsa [email protected] | ||
ssh -i ./ubuntu-24.04.id_rsa [email protected] | ||
|
||
# Use `root` for both the login and password. | ||
# Run `reboot` to exit. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CONFIG_IKCONFIG=y | ||
pb8o marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CONFIG_IKCONFIG_PROC=y | ||
CONFIG_MSDOS_PARTITION=y | ||
CONFIG_SQUASHFS_ZSTD=y | ||
# aarch64 only TBD split into a separate file | ||
CONFIG_DEVMEM=y | ||
# CONFIG_ARM64_ERRATUM_3194386 is not set |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
CONFIG_FRAME_POINTER=y | ||
# CONFIG_KGDB=y | ||
pb8o marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# CONFIG_KGDB_SERIAL_CONSOLE=y | ||
CONFIG_DEBUG_INFO=y | ||
CONFIG_DEBUG_INFO_DWARF4=y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CONFIG_FTRACE=y | ||
CONFIG_FUNCTION_TRACER=y | ||
CONFIG_FUNCTION_GRAPH_TRACER=y | ||
CONFIG_IRQSOFF_TRACER=y | ||
CONFIG_PREEMPT_TRACER=y | ||
CONFIG_SCHED_TRACER=y | ||
CONFIG_STACK_TRACER=y | ||
CONFIG_BLK_DEV_IO_TRACE=y | ||
CONFIG_FUNCTION_PROFILER=y | ||
CONFIG_FTRACE_MCOUNT_RECORD=y | ||
CONFIG_FTRACE_SYSCALLS=y |
98 changes: 0 additions & 98 deletions
98
...ces/guest_configs/patches/0001-fix-Adjust-config-options-for-what-is-needed-by-our-.patch
This file was deleted.
Oops, something went wrong.
76 changes: 0 additions & 76 deletions
76
resources/guest_configs/patches/0002-ci-adjust-6.1-guest-kernel-configs-for-our-CI.patch
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.