diff options
author | Adin Scannell <ascannell@google.com> | 2020-05-05 22:00:14 -0700 |
---|---|---|
committer | Adin Scannell <ascannell@google.com> | 2020-07-09 17:39:47 -0700 |
commit | 2afff44403e046078301de39f0252bb57fc018c7 (patch) | |
tree | f944f66ffaab8f10029b451755bcb20a3ff40269 /shim/configure-containerd-shim-runsc-v1.md | |
parent | 2f24ab339736315659f26699ab50aa2982d7e890 (diff) |
Update shim to build using bazel.
The go.mod dependency tree for the shim was somehow contradictory. After
resolving these issues (e.g. explicitly imported k8s 1.14, pulling a
specific dbus version), and adding all dependencies, the shim can now be
build as part of the regular bazel tree.
As part of this process, minor cleanup was done in all the source files:
headers were standardized (and include "The gVisor Authors" in addition
to the "The containerd Authors" if originally derived from containerd
sources), and comments were cleaned up to meet coding standards.
This change makes the containerd installation dynamic, so that multiple
versions can be tested, and drops the static installer for the VM image
itself.
This change also updates test/root/crictl_test.go and related utilities,
so that the containerd tests can be run on any version (and in cases
where it applies, they can be run on both v1 and v2 as parameterized
tests).
Diffstat (limited to 'shim/configure-containerd-shim-runsc-v1.md')
-rw-r--r-- | shim/configure-containerd-shim-runsc-v1.md | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/shim/configure-containerd-shim-runsc-v1.md b/shim/configure-containerd-shim-runsc-v1.md deleted file mode 100644 index 977ceacbd..000000000 --- a/shim/configure-containerd-shim-runsc-v1.md +++ /dev/null @@ -1,72 +0,0 @@ -# Configure containerd-shim-runsc-v1 (Shim V2) - -This document describes how to configure runtime options for -`containerd-shim-runsc-v1`. This is follows on to the instructions of -[Runtime Handler Quick Start (shim v2) (containerd >=1.2)](runtime-handler-shim-v2-quickstart.md) -and requires containerd 1.3 or later. - -### Update `/etc/containerd/config.toml` to point to a configuration file for `containerd-shim-runsc-v1`. - -`containerd-shim-runsc-v1` supports a few different configuration options based -on the version of containerd that is used. For versions >= 1.3, it supports a -configurable config path in the containerd runtime configuration. - -```shell -{ # Step 1: Update runtime options for runsc in containerd config.toml -cat <<EOF | sudo tee /etc/containerd/config.toml -disabled_plugins = ["restart"] -[plugins.linux] - shim_debug = true -[plugins.cri.containerd.runtimes.runsc] - runtime_type = "io.containerd.runsc.v1" -[plugins.cri.containerd.runtimes.runsc.options] - TypeUrl = "io.containerd.runsc.v1.options" - ConfigPath = "/etc/containerd/runsc.toml" -EOF -} -``` - -### Configure `/etc/containerd/runsc.toml` - -The set of options that can be configured can be found in -[options.go](../pkg/v2/options/options.go). - -#### Example: Enable the KVM platform - -gVisor enables the use of a number of platforms. This example shows how to -configure `containerd-shim-runsc-v1` to use gvisor with the KVM platform. - -Find out more about platform in the -(gVisor documentation)[https://gvisor.dev/docs/user_guide/platforms/]. - -```shell -cat <<EOF | sudo tee /etc/containerd/runsc.toml -[runsc_config] -platform = "kvm" -EOF -``` - -### Example: Enable gVisor debug logging - -gVisor debug logging can be enabled by setting the `debug` and `debug-log` -flag. The shim will replace "%ID%" with the container ID in the path of the -`debug-log` flag. - -Find out more about debugging in the -(gVisor documentation)[https://gvisor.dev/docs/user_guide/debugging/]. - -```shell -cat <<EOF | sudo tee /etc/containerd/runsc.toml -[runsc_config] - debug=true - debug-log=/var/log/%ID%/gvisor.log -EOF -``` - -## Restart `containerd` - -When you are done restart containerd to pick up the new configuration files. - -```shell -sudo systemctl restart containerd -``` |