Skip to content

Commit 1639a95

Browse files
committed
doc: Readd instructions for downloading releases to getting-starting.md
The simplifications of #3484 removed instructions for how to download firecracker releases from the getting started guide, instead only describing how to compiel firecracker from source. This commit re-introduces these instructions due to customer request. Closes #3531 Signed-off-by: Patrick Roy <[email protected]>
1 parent 3310e32 commit 1639a95

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

docs/getting-started.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ an execution jail, set up by the [`jailer`](../src/jailer/) binary. This is how
6666
our [integration test suite](#running-the-integration-test-suite) does it. This
6767
guide will not use the [`jailer`](../src/jailer/).
6868

69+
### Getting a rootfs and Guest Kernel Image
70+
71+
To successfully start a microVM with you will need an uncompressed Linux kernel binary,
72+
and an ext4 file system image (to use as rootfs). This guide uses a 5.10 kernel image
73+
with a Ubuntu 22.04 rootfs from our CI:
74+
6975
```bash
7076
ARCH="$(uname -m)"
7177

@@ -80,6 +86,33 @@ wget https://s3.amazonaws.com/spec.ccfc.min/firecracker-ci/v1.5/${ARCH}/ubuntu-2
8086

8187
# Set user read permission on the ssh key
8288
chmod 400 ./ubuntu-22.04.id_rsa
89+
```
90+
91+
### Getting a Firecracker Binary
92+
93+
There are two options for getting a firecracker binary:
94+
95+
- Downloading an official firecracker release from our
96+
[release page](https://github.com/firecracker-microvm/firecracker/releases), or
97+
- Building firecracker from source.
98+
99+
To download the latest firecracker release, run
100+
101+
```bash
102+
ARCH="$(uname -m)"
103+
release_url="https://github.com/firecracker-microvm/firecracker/releases"
104+
latest=$(basename $(curl -fsSLI -o /dev/null -w %{url_effective} ${release_url}/latest))
105+
curl -L ${release_url}/download/${latest}/firecracker-${latest}-${ARCH}.tgz \
106+
| tar -xz
107+
108+
# Rename the binary to "firecracker"
109+
mv release-${latest}-$(uname -m)/firecracker-${latest}-${ARCH} firecracker
110+
```
111+
112+
To instead build firecracker from source, you will need to have `docker` installed:
113+
114+
```bash
115+
ARCH="$(uname -m)"
83116

84117
# Clone the firecracker repository
85118
git clone https://github.com/firecracker-microvm/firecracker
@@ -96,6 +129,17 @@ sudo systemctl start docker
96129
#
97130
sudo ./firecracker/tools/devtool build
98131

132+
# Rename the binary to "firecracker"
133+
mv ./firecracker/build/cargo_target/${ARCH}-unknown-linux-musl/debug/firecracker firecracker
134+
```
135+
136+
### Starting Firecracker
137+
138+
Running firecracker will require two terminals, the first one running the
139+
firecracker binary, and a second one for communicating with the firecracker
140+
process via HTTP requests:
141+
142+
```bash
99143
API_SOCKET="/tmp/firecracker.socket"
100144

101145
# Remove API unix socket

0 commit comments

Comments
 (0)