Skip to content

Remove snapshotter package #344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,6 @@ steps:
- make test-in-docker
timeout_in_minutes: 10

- label: ":rotating_light: :hammer: snapshotter *root* tests"
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
env:
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
EXTRAGOARGS: "-v -count=1 -race"
command: 'make -C snapshotter integ-test'
timeout_in_minutes: 10
concurrency: 1
concurrency_group: 'loop-device test'

- label: ":rotating_light: :running_shirt_with_sash: runtime isolated tests"
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
Expand All @@ -78,19 +67,6 @@ steps:
- make -C runtime integ-test FICD_SNAPSHOTTER=devmapper FICD_DM_POOL=build_${BUILDKITE_BUILD_NUMBER}_runtime
timeout_in_minutes: 10

- label: ":rotating_light: :exclamation: example tests (naive)"
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
env:
DOCKER_IMAGE_TAG: "$BUILDKITE_BUILD_NUMBER"
EXTRAGOARGS: "-v -count=1"
artifact_paths:
- "examples/logs/*"
command: 'make -C examples integ-test'
timeout_in_minutes: 10
concurrency: 1
concurrency_group: 'loop-device test'

- label: ":rotating_light: :exclamation: example tests (devmapper)"
agents:
queue: "${BUILDKITE_AGENT_META_DATA_QUEUE:-default}"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.

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

Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ container standards such as the OCI image format.
There are several components in this repository that enable containerd to use
Firecracker microVMs to run containers:

* A [snapshotter](snapshotter) that creates files used as block-devices for
pass-through into the microVM. This snapshotter is used for providing the
container image to the microVM. The snapshotter runs as an out-of-process
gRPC proxy plugin. We currently have two implementations of a snapshotter: a
[naive](snapshotter/cmd/naive) copy-ahead implementation and a
[devmapper-based](snapshotter/cmd/devmapper) copy-on-write implementation.
* A [control plugin](firecracker-control) managing the lifecycle of the
runtime and implementing our [control API](proto/firecracker.proto) to
manage the lifecycle of microVMs. The control plugin is compiled in to the
Expand Down
48 changes: 12 additions & 36 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,6 @@ GO111MODULE=on make all
Once you have built the runtime, be sure to place the following binaries on your
`$PATH`:
* `runtime/containerd-shim-aws-firecracker`
* `snapshotter/cmd/devmapper/devmapper_snapshotter`
* `snapshotter/cmd/naive/naive_snapshotter`
* `firecracker-control/cmd/containerd/firecracker-containerd`
* `firecracker-control/cmd/containerd/firecracker-ctr`

Expand Down Expand Up @@ -135,10 +133,11 @@ root = "/var/lib/firecracker-containerd/containerd"
state = "/run/firecracker-containerd"
[grpc]
address = "/run/firecracker-containerd/containerd.sock"
[proxy_plugins]
[proxy_plugins.firecracker-devmapper]
type = "snapshot"
address = "/var/run/firecracker-containerd/devmapper-snapshotter.sock"
[plugins]
[plugins.devmapper]
pool_name = "fc-dev-thinpool"
base_image_size = "10GB"
root_path = "/var/lib/firecracker-containerd/snapshotter/devmapper"

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

The devmapper snapshotter requires a thinpool to exist.
Below is a script to create a thinpool as well as an example config file.
Below is a script to create a thinpool device.

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

Expand Down Expand Up @@ -205,21 +204,6 @@ fi
```
</details>

<details>
<summary>Snappshotter config file example.</summary>

```json
{
"base_image_size": "10GB",
"root_path": "/var/lib/firecracker-containerd/snapshotter/devmapper",
"pool_name": "fc-dev-thinpool"
}
```

</details>

A reasonable location for this file is at `/etc/firecracker-dm-snapshotter/config.json`.

### Configure containerd runtime plugin

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

## Usage

Start the containerd snapshotter

```bash
$ ./devmapper_snapshotter \
-address /var/run/firecracker-containerd/devmapper-snapshotter.sock \
-path /tmp/fc-snapshot \
-config /etc/firecracker-dm-snapshotter/config.json
```
`note: The path for -config needs to match the location used when configuring the devmapper snapshotter.`

In another terminal, start containerd
Start containerd

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

```bash
$ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock images \
pull --snapshotter firecracker-devmapper\
pull --snapshotter devmapper \
docker.io/library/busybox:latest
```

And start a container!

```bash
$ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
run --snapshotter firecracker-devmapper --runtime aws.firecracker \
run \
--snapshotter devmapper \
--runtime aws.firecracker \
--rm --tty --net-host \
docker.io/library/busybox:latest busybox-test
```
Expand All @@ -321,7 +297,7 @@ $ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
$ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
namespaces label fc \
containerd.io/defaults/runtime=aws.firecracker \
containerd.io/defaults/snapshotter=firecracker-devmapper
containerd.io/defaults/snapshotter=devmapper

$ sudo firecracker-ctr --address /run/firecracker-containerd/containerd.sock \
-n fc \
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 h1:xJ4a3vCFaGF/jqvzLMYoU8P317H5OQ+Via4RmuPwCS0=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
github.com/checkpoint-restore/go-criu v0.0.0-20190109184317-bdb7599cd87b/go.mod h1:TrMrLQfeENAPYPRsJuq3jsqdlRh3lvi6trTZJG8+tho=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/containerd/cgroups v0.0.0-20181105182409-82cb49fc1779 h1:j1IsLW6/hNZPIyBH1v0hhEeB1WXE2ffhHaqSuXhgknY=
github.com/containerd/cgroups v0.0.0-20181105182409-82cb49fc1779/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI=
Expand All @@ -44,6 +45,7 @@ github.com/coreos/go-iptables v0.4.2/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmeka
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142 h1:3jFq2xL4ZajGK4aZY8jz+DAF0FHjI51BXjjSwCzS1Dk=
github.com/coreos/go-systemd v0.0.0-20181031085051-9002847aa142/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4=
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ=
github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s=
github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8=
Expand Down Expand Up @@ -147,6 +149,7 @@ github.com/miekg/dns v1.1.16 h1:iMEQ/IVHxPTtx2Q07JP/k4CKRvSjiAZjZ0hnhgYEDmE=
github.com/miekg/dns v1.1.16/go.mod h1:YNV562EiewvSmpCB6/W4c6yqjK7Z+M/aIS1JHsIVeg8=
github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE=
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b h1:Ey6yH0acn50T/v6CB75bGP4EMJqnv9WvnjN7oZaj+xE=
github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a h1:KfNOeFvoAssuZLT7IntKZElKwi/5LRuxY71k+t6rfaM=
Expand All @@ -159,6 +162,7 @@ github.com/opencontainers/runc v1.0.0-rc9 h1:/k06BMULKF5hidyoZymkoDCzdJzltZpz/UU
github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runtime-spec v0.1.2-0.20181106065543-31e0d16c1cb7 h1:vg5OQBKq2D0TX7q7loKQBLZ54IUAbUvq1rlwDRdn1gY=
github.com/opencontainers/runtime-spec v0.1.2-0.20181106065543-31e0d16c1cb7/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.3.0/go.mod h1:+BLncwf63G4dgOzykXAxcmnFlUaOlkDdmw/CqsW6pjs=
github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
Expand Down
2 changes: 0 additions & 2 deletions snapshotter/.gitignore

This file was deleted.

53 changes: 0 additions & 53 deletions snapshotter/Makefile

This file was deleted.

89 changes: 0 additions & 89 deletions snapshotter/README.md

This file was deleted.

Loading