Skip to content

Commit

Permalink
add doc for systemd
Browse files Browse the repository at this point in the history
Signed-off-by: chenkang <[email protected]>
  • Loading branch information
wuhua.ck authored and chenk008 committed Apr 27, 2021
1 parent 93ec784 commit 1041d4c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[[📔**Browse images**]](./docs/pre-converted-images.md)
[[**Quick Start (Kubernetes)**]](#quick-start-with-kubernetes)
[[🤓**Quick Start (nerdctl)**]](https://github.com/containerd/nerdctl/blob/master/docs/stargz.md)
[[🔆**Install**]](./docs/INSTALL.md)

# Stargz Snapshotter

Expand Down Expand Up @@ -109,6 +110,8 @@ Hello World!

Stargz snapshotter also supports [further configuration](/docs/overview.md) including private registry authentication, mirror registries, etc.

- For more details about installing Stargz Snapshotter, refer to [Install Stargz Snapshotter](./docs/INSTALL.md).

## Creating eStargz images with optimization

- For more examples and details about the image converter `ctr-remote`, refer to [Optimize Images with `ctr-remote image optimize`](/docs/ctr-remote.md).
Expand Down
51 changes: 51 additions & 0 deletions docs/INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Install Stargz Snapshotter

We assume that you are using containerd (> v1.4.2) as a CRI runtime.

## Install Stargz Snapshotter with Systemd

- Download release tarfile from [the release page](https://github.com/containerd/stargz-snapshotter/releases). For example, amd64 binary of v0.5.0 is available from https://github.com/containerd/stargz-snapshotter/releases/download/v0.5.0/stargz-snapshotter-v0.5.0-linux-amd64.tar.gz.

- Add the following configuration to containerd's configuration file (typically: /etc/containerd/config.toml). Please see also [an example configuration file](../script/config/etc/containerd/config.toml).
```
version = 2
# Enable stargz snapshotter for CRI
[plugins."io.containerd.grpc.v1.cri".containerd]
snapshotter = "stargz"
disable_snapshot_annotations = false
# Plug stargz snapshotter into containerd
[proxy_plugins]
[proxy_plugins.stargz]
type = "snapshot"
address = "/run/containerd-stargz-grpc/containerd-stargz-grpc.sock"
```

- Install fuse

###### centos
```
# centos 7
yum install fuse
# centos 8
dnf install fuse
modprobe fuse
```

###### ubuntu

```
apt-get install fuse
modprobe fuse
```

- Start stargz-snapshotter and restart containerd
```
tar -xvf stargz-snapshotter-${version}-linux-${arch}.tar.gz -C /usr/local/bin
wget -O /etc/systemd/system/stargz-snapshotter.service https://raw.githubusercontent.com/containerd/stargz-snapshotter/master/script/config/etc/systemd/system/stargz-snapshotter.service
systemctl enable --now stargz-snapshotter
systemctl restart containerd
```

0 comments on commit 1041d4c

Please sign in to comment.