Skip to content

Commit e80d4cc

Browse files
authored
Merge pull request #344 from mxpv/dm-rm
Remove snapshotter package
2 parents f6d4942 + d5a51c0 commit e80d4cc

38 files changed

+17
-4683
lines changed

.buildkite/pipeline.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,6 @@ steps:
5555
- make test-in-docker
5656
timeout_in_minutes: 10
5757

58-
- label: ":rotating_light: :hammer: snapshotter *root* tests"
59-
agents:
60-
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
61-
env:
62-
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
63-
EXTRAGOARGS: "-v -count=1 -race"
64-
command: 'make -C snapshotter integ-test'
65-
timeout_in_minutes: 10
66-
concurrency: 1
67-
concurrency_group: 'loop-device test'
68-
6958
- label: ":rotating_light: :running_shirt_with_sash: runtime isolated tests"
7059
agents:
7160
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
@@ -78,19 +67,6 @@ steps:
7867
- make -C runtime integ-test FICD_SNAPSHOTTER=devmapper FICD_DM_POOL=build_${BUILDKITE_BUILD_NUMBER}_runtime
7968
timeout_in_minutes: 10
8069

81-
- label: ":rotating_light: :exclamation: example tests (naive)"
82-
agents:
83-
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
84-
env:
85-
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
86-
EXTRAGOARGS: "-v -count=1"
87-
artifact_paths:
88-
- "examples/logs/*"
89-
command: 'make -C examples integ-test'
90-
timeout_in_minutes: 10
91-
concurrency: 1
92-
concurrency_group: 'loop-device test'
93-
9470
- label: ":rotating_light: :exclamation: example tests (devmapper)"
9571
agents:
9672
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# express or implied. See the License for the specific language governing
1212
# permissions and limitations under the License.
1313

14-
SUBDIRS:=agent runtime snapshotter internal examples firecracker-control/cmd/containerd eventbridge
14+
SUBDIRS:=agent runtime internal examples firecracker-control/cmd/containerd eventbridge
1515
TEST_SUBDIRS:=$(addprefix test-,$(SUBDIRS))
1616
INTEG_TEST_SUBDIRS:=$(addprefix integ-test-,$(SUBDIRS))
1717

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ container standards such as the OCI image format.
3131
There are several components in this repository that enable containerd to use
3232
Firecracker microVMs to run containers:
3333

34-
* A [snapshotter](snapshotter) that creates files used as block-devices for
35-
pass-through into the microVM. This snapshotter is used for providing the
36-
container image to the microVM. The snapshotter runs as an out-of-process
37-
gRPC proxy plugin. We currently have two implementations of a snapshotter: a
38-
[naive](snapshotter/cmd/naive) copy-ahead implementation and a
39-
[devmapper-based](snapshotter/cmd/devmapper) copy-on-write implementation.
4034
* A [control plugin](firecracker-control) managing the lifecycle of the
4135
runtime and implementing our [control API](proto/firecracker.proto) to
4236
manage the lifecycle of microVMs. The control plugin is compiled in to the

docs/getting-started.md

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ GO111MODULE=on make all
7878
Once you have built the runtime, be sure to place the following binaries on your
7979
`$PATH`:
8080
* `runtime/containerd-shim-aws-firecracker`
81-
* `snapshotter/cmd/devmapper/devmapper_snapshotter`
82-
* `snapshotter/cmd/naive/naive_snapshotter`
8381
* `firecracker-control/cmd/containerd/firecracker-containerd`
8482
* `firecracker-control/cmd/containerd/firecracker-ctr`
8583

@@ -135,10 +133,11 @@ root = "/var/lib/firecracker-containerd/containerd"
135133
state = "/run/firecracker-containerd"
136134
[grpc]
137135
address = "/run/firecracker-containerd/containerd.sock"
138-
[proxy_plugins]
139-
[proxy_plugins.firecracker-devmapper]
140-
type = "snapshot"
141-
address = "/var/run/firecracker-containerd/devmapper-snapshotter.sock"
136+
[plugins]
137+
[plugins.devmapper]
138+
pool_name = "fc-dev-thinpool"
139+
base_image_size = "10GB"
140+
root_path = "/var/lib/firecracker-containerd/snapshotter/devmapper"
142141

143142
[debug]
144143
level = "debug"
@@ -153,7 +152,7 @@ binaries are in sync with one another. While other builds of `ctr` may work with
153152
### Prepare and configure snapshotter
154153

155154
The devmapper snapshotter requires a thinpool to exist.
156-
Below is a script to create a thinpool as well as an example config file.
155+
Below is a script to create a thinpool device.
157156

158157
`Note: The configuration with loopback devices is slow and not intended for use in production.`
159158

@@ -205,21 +204,6 @@ fi
205204
```
206205
</details>
207206

208-
<details>
209-
<summary>Snappshotter config file example.</summary>
210-
211-
```json
212-
{
213-
"base_image_size": "10GB",
214-
"root_path": "/var/lib/firecracker-containerd/snapshotter/devmapper",
215-
"pool_name": "fc-dev-thinpool"
216-
}
217-
```
218-
219-
</details>
220-
221-
A reasonable location for this file is at `/etc/firecracker-dm-snapshotter/config.json`.
222-
223207
### Configure containerd runtime plugin
224208

225209
The runtime expects a JSON-formatted configuration file to be located either in
@@ -277,17 +261,7 @@ configuration file has the following fields:
277261

278262
## Usage
279263

280-
Start the containerd snapshotter
281-
282-
```bash
283-
$ ./devmapper_snapshotter \
284-
-address /var/run/firecracker-containerd/devmapper-snapshotter.sock \
285-
-path /tmp/fc-snapshot \
286-
-config /etc/firecracker-dm-snapshotter/config.json
287-
```
288-
`note: The path for -config needs to match the location used when configuring the devmapper snapshotter.`
289-
290-
In another terminal, start containerd
264+
Start containerd
291265

292266
```bash
293267
$ sudo PATH=$PATH /usr/local/bin/firecracker-containerd \
@@ -298,15 +272,17 @@ Pull an image
298272

299273
```bash
300274
$ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock images \
301-
pull --snapshotter firecracker-devmapper\
275+
pull --snapshotter devmapper \
302276
docker.io/library/busybox:latest
303277
```
304278

305279
And start a container!
306280

307281
```bash
308282
$ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
309-
run --snapshotter firecracker-devmapper --runtime aws.firecracker \
283+
run \
284+
--snapshotter devmapper \
285+
--runtime aws.firecracker \
310286
--rm --tty --net-host \
311287
docker.io/library/busybox:latest busybox-test
312288
```
@@ -321,7 +297,7 @@ $ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
321297
$ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
322298
namespaces label fc \
323299
containerd.io/defaults/runtime=aws.firecracker \
324-
containerd.io/defaults/snapshotter=firecracker-devmapper
300+
containerd.io/defaults/snapshotter=devmapper
325301

326302
$ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
327303
-n fc \

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l
1818
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
1919
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
2020
github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
21+
github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho=
2122
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
2223
github.com/containerd/cgroups v0.0.0-20181105182409-82cb49fc1779 h1:j1IsLW6/hNZPIyBH1v0hhEeB1WXE2ffhHaqSuXhgknY=
2324
github.com/containerd/cgroups v0.0.0-20181105182409-82cb49fc1779/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI=
@@ -44,6 +45,7 @@ github.com/coreos/go-iptables v0.4.2/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmeka
4445
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
4546
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 h1:3jFq2xL4ZajGK4aZY8jz+DAF0FHjI51BXjjSwCzS1Dk=
4647
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
48+
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
4749
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
4850
github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s=
4951
github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8=
@@ -147,6 +149,7 @@ github.com/miekg/dns v1.1.16 h1:iMEQ/IVHxPTtx2Q07JP/k4CKRvSjiAZjZ0hnhgYEDmE=
147149
github.com/miekg/dns v1.1.16/go.mod h1:YNV562EiewvSmpCB6/W4c6yqjK7Z+M/aIS1JHsIVeg8=
148150
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
149151
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
152+
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
150153
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b h1:Ey6yH0acn50T/v6CB75bGP4EMJqnv9WvnjN7oZaj+xE=
151154
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
152155
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a h1:KfNOeFvoAssuZLT7IntKZElKwi/5LRuxY71k+t6rfaM=
@@ -159,6 +162,7 @@ github.com/opencontainers/runc v1.0.0-rc9 h1:/k06BMULKF5hidyoZymkoDCzdJzltZpz/UU
159162
github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
160163
github.com/opencontainers/runtime-spec v0.1.2-0.20181106065543-31e0d16c1cb7 h1:vg5OQBKq2D0TX7q7loKQBLZ54IUAbUvq1rlwDRdn1gY=
161164
github.com/opencontainers/runtime-spec v0.1.2-0.20181106065543-31e0d16c1cb7/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
165+
github.com/opencontainers/selinux v1.3.0/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
162166
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
163167
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
164168
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=

snapshotter/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

snapshotter/Makefile

Lines changed: 0 additions & 53 deletions
This file was deleted.

snapshotter/README.md

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)