Skip to content

Commit 036c9ba

Browse files
committed
extend quickstart script to support rpm based distro.
Most of the steps for installation, configuration and running of firecracker containerd on rpm based distro is simlar to debian. We separate out the distro specific part to a separate script in the quickstart document and added installation steps that differ in rpm based distros e.g. Amazon Linux 2. Signed-off-by: Alakesh Haloi <[email protected]>
1 parent 6ad2bdf commit 036c9ba

File tree

1 file changed

+49
-5
lines changed

1 file changed

+49
-5
lines changed

docs/quickstart.md

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ files into `/usr/local/bin`.
2020
on [this page](https://wiki.debian.org/Cloud/AmazonEC2Image/Buster).
2121
If you need help launching an EC2 instance, see the
2222
[EC2 getting started guide](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html).
23-
3. Run the script below to download and install all the required components.
24-
This script expects to be run from your `$HOME` directory.
23+
3. Run the script below to download and install all the required dependencies on a debian based instance.
24+
Alternate steps for rpm based instance is provided as well. This script expects to be run from your `$HOME` directory.
2525

2626
```bash
2727
#!/bin/bash
@@ -62,6 +62,51 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get \
6262
docker-ce aufs-tools-
6363
sudo usermod -aG docker $(whoami)
6464

65+
# Install device-mapper
66+
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y dmsetup
67+
```
68+
69+
A similar script to install dependencies for rpm based linux distro e.g. Amazon Linux 2 can be found here
70+
71+
<details>
72+
73+
```bash
74+
#!/bin/bash
75+
76+
cd ~
77+
78+
# Install git, Go 1.13, make, curl
79+
sudo yum -y update
80+
sudo yum -y install \
81+
golang \
82+
make \
83+
git \
84+
curl \
85+
e2fsprogs \
86+
util-linux \
87+
bc \
88+
gnupg
89+
90+
91+
# Amazon Linux 2 installs go binary is installed in /usr/bin. So no PATH changes required.
92+
93+
cd ~
94+
95+
# Install Docker CE
96+
# Docker CE includes containerd, but we need a separate containerd binary, built
97+
# in a later step
98+
sudo yum -y update
99+
sudo amazon-linux-extras install -y docker
100+
sudo usermod -aG docker $(whoami)
101+
102+
sudo yum -y install device-mapper
103+
```
104+
</details>
105+
106+
4. Now run the following script below to download and install firecracker containerd.
107+
108+
```bash
109+
#!/bin/bash
65110
cd ~
66111

67112
# Check out firecracker-containerd and build it. This includes:
@@ -76,7 +121,6 @@ cd ~
76121
# access to networks available on the host
77122
git clone https://github.com/firecracker-microvm/firecracker-containerd.git
78123
cd firecracker-containerd
79-
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y dmsetup
80124
sg docker -c 'make all image firecracker'
81125
sudo make install install-firecracker demo-network
82126

@@ -174,13 +218,13 @@ sudo tee /etc/containerd/firecracker-runtime.json <<EOF
174218
EOF
175219
```
176220

177-
4. Open a new terminal and start `firecracker-containerd` in the foreground
221+
5. Open a new terminal and start `firecracker-containerd` in the foreground
178222

179223
```bash
180224
sudo firecracker-containerd --config /etc/firecracker-containerd/config.toml
181225
```
182226

183-
5. Open a new terminal, pull an image, and run a container!
227+
6. Open a new terminal, pull an image, and run a container!
184228

185229
```bash
186230
sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \

0 commit comments

Comments
 (0)