-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
feat: add firecracker install #667
Conversation
Thanks for the PR. I'd like to see firecracker installed as This is how I install it presently: install_firecracker() {
if ! [ -e /usr/local/bin/firecracker ] ; then
curl -L -S -f -o /tmp/firecracker.tgz https://github.com/firecracker-microvm/firecracker/releases/download/v$FIRECRACKER_VER/firecracker-v$FIRECRACKER_VER-$ARCH.tgz
if [ $? -ne 0 ]; then
echo "Failed to download firecracker"
exit 1
fi
sudo tar -xvf /tmp/firecracker.tgz -C /usr/local/bin/ --strip-components=1
sudo mv /usr/local/bin/{firecracker-v$FIRECRACKER_VER-$ARCH,firecracker}
sudo mv /usr/local/bin/{jailer-v$FIRECRACKER_VER-$ARCH,jailer}
sudo mv /usr/local/bin/{seccompiler-bin-v$FIRECRACKER_VER-$ARCH,seccompiler-bin}
sudo mv /usr/local/bin/{seccomp-filter-v$FIRECRACKER_VER-$ARCH.json,seccomp-filter.json}
fi
} Alex |
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.
Looking forward to getting this in. I've left a couple of notes.
This adds the ability to download and install Firecracker. Signed-off-by: Richard Case <richard@weave.works>
754ac18
to
3ad55cb
Compare
} | ||
defer f.Close() | ||
|
||
tempUnpackPath, err := os.MkdirTemp(os.TempDir(), "firecracker*") |
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.
Would we benefit from a defer os.Remove/Dir(tempUnpackPath)
?
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.
Yes i think you are right.
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.
Perhaps you could do that in the next app you contribute? @Shikachuu is covering containerd but the rest are fair game.
Node should be fairly similar to add?
This adds the ability to download and install Firecracker.
Description
This adds the following to enable user to install Firecracker as a system package:
Motivation and Context
Relates to #654
How Has This Been Tested?
Local testing in my development env but not on arm:
➜ go build && ./arkade system install firecracker --path ./out Installing Firecracker to ./out Installing version: v1.0.0 for: x86_64 Downloading from: https://github.com/firecracker-microvm/firecracker/releases/download/v1.0.0/firecracker-v1.0.0-x86_64.tgz 1.59 MiB / 1.59 MiB [------------------------------------------------------------------------------------------------------------------------------------] 100.00% Downloaded to: /tmp/firecracker-v1.0.0-x86_64.tgz Unpacking Firecracker to: /tmp/firecracker3308092613 Copying Firecracker binaries to: ./out ➜ out/firecracker --version Firecracker v1.0.0 Supported snapshot data format versions: v0.23.0, v0.24.0, v0.25.0, v1.0.0
Are you a GitHub Sponsor (Yes/No?)
Types of changes
Checklist: