Skip to content

Commit ff7ae6a

Browse files
committed
support containerd v1.1.3
Signed-off-by: yanxuean <[email protected]>
1 parent 1080d81 commit ff7ae6a

File tree

6 files changed

+174
-0
lines changed

6 files changed

+174
-0
lines changed

deploy/iso/minikube-iso/package/Config.in

+1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ menu "System tools"
1111
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/hv-kvp-daemon/Config.in"
1212
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/gluster/Config.in"
1313
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/vbox-guest/Config.in"
14+
source "$BR2_EXTERNAL_MINIKUBE_PATH/package/containerd-bin/Config.in"
1415
endmenu
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
config BR2_PACKAGE_CONTAINERD_BIN
2+
bool "containerd-bin"
3+
default y
4+
depends on BR2_x86_64
5+
depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS
6+
depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS
7+
depends on BR2_TOOLCHAIN_HAS_THREADS
8+
depends on BR2_USE_MMU # lvm2
9+
depends on !BR2_STATIC_LIBS # lvm2
10+
depends on !BR2_TOOLCHAIN_USES_MUSL # lvm2
11+
select BR2_PACKAGE_RUNC_MASTER
12+
select BR2_PACKAGE_BTRFS_PROGS
13+
select BR2_PACKAGE_LIBSECCOMP
14+
select BR2_PACKAGE_LIBGPGME
15+
select BR2_PACKAGE_LVM2
16+
select BR2_PACKAGE_LVM2_APP_LIBRARY
17+
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
18+
select BR2_PACKAGE_LIBGLIB2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
root = "/var/lib/containerd"
2+
state = "/run/containerd"
3+
oom_score = 0
4+
5+
[grpc]
6+
address = "/run/containerd/containerd.sock"
7+
uid = 0
8+
gid = 0
9+
max_recv_message_size = 16777216
10+
max_send_message_size = 16777216
11+
12+
[debug]
13+
address = ""
14+
uid = 0
15+
gid = 0
16+
level = ""
17+
18+
[metrics]
19+
address = ""
20+
grpc_histogram = false
21+
22+
[cgroup]
23+
path = ""
24+
25+
[plugins]
26+
[plugins.cgroups]
27+
no_prometheus = false
28+
[plugins.cri]
29+
stream_server_address = ""
30+
stream_server_port = "10010"
31+
enable_selinux = false
32+
sandbox_image = "k8s.gcr.io/pause:3.1"
33+
stats_collect_period = 10
34+
systemd_cgroup = false
35+
enable_tls_streaming = false
36+
max_container_log_line_size = 16384
37+
[plugins.cri.containerd]
38+
snapshotter = "overlayfs"
39+
no_pivot = true
40+
[plugins.cri.containerd.default_runtime]
41+
runtime_type = "io.containerd.runtime.v1.linux"
42+
runtime_engine = ""
43+
runtime_root = ""
44+
[plugins.cri.containerd.untrusted_workload_runtime]
45+
runtime_type = ""
46+
runtime_engine = ""
47+
runtime_root = ""
48+
[plugins.cri.cni]
49+
bin_dir = "/opt/cni/bin"
50+
conf_dir = "/etc/cni/net.d"
51+
conf_template = ""
52+
[plugins.cri.registry]
53+
[plugins.cri.registry.mirrors]
54+
[plugins.cri.registry.mirrors."docker.io"]
55+
endpoint = ["https://registry-1.docker.io"]
56+
[plugins.diff-service]
57+
default = ["walking"]
58+
[plugins.linux]
59+
shim = "containerd-shim"
60+
runtime = "runc"
61+
runtime_root = ""
62+
no_shim = false
63+
shim_debug = false
64+
[plugins.scheduler]
65+
pause_threshold = 0.02
66+
deletion_threshold = 0
67+
mutation_threshold = 100
68+
schedule_delay = "0s"
69+
startup_delay = "100ms"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sha256 08f057ece7e518b14cce2e9737228a5a899a7b58b78248a03e02f4a6c079eeaf v1.1.3.tar.gz
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
################################################################################
2+
#
3+
# containerd
4+
#
5+
################################################################################
6+
CONTAINERD_BIN_VERSION = v1.1.3
7+
CONTAINERD_BIN_SITE = https://github.com/containerd/containerd/archive
8+
CONTAINERD_BIN_SOURCE = $(CONTAINERD_BIN_VERSION).tar.gz
9+
CONTAINERD_BIN_DEPENDENCIES = host-go libgpgme
10+
CONTAINERD_BIN_GOPATH = $(@D)/_output
11+
CONTAINERD_BIN_ENV = \
12+
CGO_ENABLED=1 \
13+
GOPATH="$(CONTAINERD_BIN_GOPATH)" \
14+
GOBIN="$(CONTAINERD_BIN_GOPATH)/bin" \
15+
PATH=$(CONTAINERD_BIN_GOPATH)/bin:$(BR_PATH)
16+
17+
CONTAINERD_BIN_COMPILE_SRC = $(CONTAINERD_BIN_GOPATH)/src/github.com/containerd/containerd
18+
19+
define CONTAINERD_BIN_USERS
20+
- -1 containerd-admin -1 - - - - -
21+
- -1 containerd -1 - - - - -
22+
endef
23+
24+
define CONTAINERD_BIN_CONFIGURE_CMDS
25+
mkdir -p $(CONTAINERD_BIN_GOPATH)/src/github.com/containerd
26+
ln -sf $(@D) $(CONTAINERD_BIN_COMPILE_SRC)
27+
endef
28+
29+
define CONTAINERD_BIN_BUILD_CMDS
30+
PWD=$(CONTAINERD_BIN_COMPILE_SRC) $(CONTAINERD_BIN_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) binaries
31+
endef
32+
33+
define CONTAINERD_BIN_INSTALL_TARGET_CMDS
34+
$(INSTALL) -Dm755 \
35+
$(@D)/bin/containerd \
36+
$(TARGET_DIR)/usr/bin
37+
$(INSTALL) -Dm755 \
38+
$(@D)/bin/containerd-shim \
39+
$(TARGET_DIR)/usr/bin
40+
$(INSTALL) -Dm755 \
41+
$(@D)/bin/ctr \
42+
$(TARGET_DIR)/usr/bin
43+
$(INSTALL) -Dm644 \
44+
$(BR2_EXTERNAL_MINIKUBE_PATH)/package/containerd-bin/config.toml \
45+
$(TARGET_DIR)/etc/containerd/config.toml
46+
endef
47+
48+
define CONTAINERD_BIN_INSTALL_INIT_SYSTEMD
49+
$(INSTALL) -Dm755 \
50+
$(BR2_EXTERNAL_MINIKUBE_PATH)/package/containerd-bin/containerd.service \
51+
$(TARGET_DIR)/usr/lib/systemd/system/containerd.service
52+
$(call link-service,containerd.service)
53+
$(call link-service,containerd-shutdown.service)
54+
endef
55+
56+
$(eval $(generic-package))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[Unit]
2+
Description=containerd container runtime
3+
Documentation=https://containerd.io
4+
After=network-online.target minikube-automount.service
5+
Requires=minikube-automount.service
6+
7+
[Service]
8+
EnvironmentFile=-/etc/sysconfig/containerd
9+
EnvironmentFile=-/etc/sysconfig/containerd.minikube
10+
EnvironmentFile=/var/run/minikube/env
11+
Environment=GOTRACEBACK=crash
12+
ExecStartPre=/sbin/modprobe overlay
13+
ExecStart=/usr/bin/containerd \
14+
$CONTAINERD_OPTIONS \
15+
$CONTAINERD_MINIKUBE_OPTIONS \
16+
--root ${PERSISTENT_DIR}/var/lib/containerd
17+
TasksMax=8192
18+
Delegate=yes
19+
KillMode=process
20+
LimitNOFILE=1048576
21+
# Having non-zero Limit*s causes performance problems due to accounting overhead
22+
# in the kernel. We recommend using cgroups to do container-local accounting.
23+
LimitNPROC=infinity
24+
LimitCORE=infinity
25+
TimeoutStartSec=0
26+
Restart=on-abnormal
27+
28+
[Install]
29+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)