@@ -20,8 +20,8 @@ files into `/usr/local/bin`.
20
20
on [ this page] ( https://wiki.debian.org/Cloud/AmazonEC2Image/Buster ) .
21
21
If you need help launching an EC2 instance, see the
22
22
[ 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.
25
25
26
26
``` bash
27
27
#! /bin/bash
@@ -62,6 +62,51 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get \
62
62
docker-ce aufs-tools-
63
63
sudo usermod -aG docker $( whoami)
64
64
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
65
110
cd ~
66
111
67
112
# Check out firecracker-containerd and build it. This includes:
76
121
# access to networks available on the host
77
122
git clone https://github.com/firecracker-microvm/firecracker-containerd.git
78
123
cd firecracker-containerd
79
- sudo DEBIAN_FRONTEND=noninteractive apt-get install -y dmsetup
80
124
sg docker -c ' make all image firecracker'
81
125
sudo make install install-firecracker demo-network
82
126
@@ -174,13 +218,13 @@ sudo tee /etc/containerd/firecracker-runtime.json <<EOF
174
218
EOF
175
219
```
176
220
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
178
222
179
223
``` bash
180
224
sudo firecracker-containerd --config /etc/firecracker-containerd/config.toml
181
225
```
182
226
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!
184
228
185
229
``` bash
186
230
sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
0 commit comments