-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall-firecracker.sh
More file actions
executable file
·51 lines (42 loc) · 1.75 KB
/
install-firecracker.sh
File metadata and controls
executable file
·51 lines (42 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/usr/bin/env bash
set -euo pipefail
# Script to install Firecracker globally
echo "🔥 Installing Firecracker v1.13.1 globally..."
# Check if already installed
if command -v firecracker >/dev/null 2>&1; then
echo "✅ Firecracker is already installed at: $(which firecracker)"
firecracker --version
exit 0
fi
# Check if we have the binary locally
LOCAL_BINARY="/tmp/claude/release-v1.13.1-x86_64/firecracker-v1.13.1-x86_64"
if [ ! -f "$LOCAL_BINARY" ]; then
echo "📥 Downloading Firecracker v1.13.1..."
mkdir -p /tmp/claude
curl -L https://github.com/firecracker-microvm/firecracker/releases/download/v1.13.1/firecracker-v1.13.1-x86_64.tgz -o /tmp/claude/firecracker.tgz
cd /tmp/claude
tar -xzf firecracker.tgz
echo "✅ Downloaded and extracted Firecracker"
fi
# Install globally with sudo
echo "🔐 Installing Firecracker to /usr/local/bin/ (requires sudo)..."
echo "You will be prompted for your password:"
sudo cp "$LOCAL_BINARY" /usr/local/bin/firecracker
sudo chmod +x /usr/local/bin/firecracker
# Verify installation
echo "✅ Firecracker installed successfully!"
echo "📍 Location: $(which firecracker)"
echo "🔍 Version: $(firecracker --version)"
# Also copy jailer if needed
JAILER_BINARY="/tmp/claude/release-v1.13.1-x86_64/jailer-v1.13.1-x86_64"
if [ -f "$JAILER_BINARY" ]; then
echo "🛡️ Installing Jailer (Firecracker's jail utility)..."
sudo cp "$JAILER_BINARY" /usr/local/bin/jailer
sudo chmod +x /usr/local/bin/jailer
echo "✅ Jailer installed at: $(which jailer)"
fi
echo ""
echo "🎉 Firecracker is now globally installed!"
echo "💡 You can now run 'firecracker' from anywhere in your system."
echo "🧹 You can now remove the local firecracker binary if present:"
echo " rm -f ./firecracker"