Skip to content

Commit 6b35039

Browse files
committed
fix image name
1 parent 607480f commit 6b35039

File tree

9 files changed

+58
-22
lines changed

9 files changed

+58
-22
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636
- name: centos-8
3737
image_name: os-packages-centos8
3838
package_name: kubeplay
39-
- name: fedora-33
40-
image_name: os-packages-fedora33
39+
- name: fedora-35
40+
image_name: os-packages-fedora35
4141
package_name: kubeplay
42-
- name: fedora-34
43-
image_name: os-packages-fedora34
42+
- name: fedora-36
43+
image_name: os-packages-fedora36
4444
package_name: kubeplay
4545
- name: debian-9
4646
image_name: os-packages-debian9
@@ -54,6 +54,9 @@ jobs:
5454
- name: ubuntu-2004
5555
image_name: os-packages-ubuntu2004
5656
package_name: kubeplay
57+
- name: ubuntu-2204
58+
image_name: os-packages-ubuntu2204
59+
package_name: kubeplay
5760

5861
steps:
5962
- name: Checkout

.github/workflows/pull_request_test_build.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
image_name: os-packages-centos8
4343
package_name: kubeplay
4444
- name: fedora-33
45-
image_name: os-packages-fedora33
45+
image_name: os-packages-fedora35
4646
package_name: kubeplay
4747
- name: fedora-34
48-
image_name: os-packages-fedora34
48+
image_name: os-packages-fedora36
4949
package_name: kubeplay
5050
- name: debian-9
5151
image_name: os-packages-debian9
@@ -59,6 +59,9 @@ jobs:
5959
- name: ubuntu-2004
6060
image_name: os-packages-ubuntu2004
6161
package_name: kubeplay
62+
- name: ubuntu-2204
63+
image_name: os-packages-ubuntu2204
64+
package_name: kubeplay
6265

6366
steps:
6467
- name: Checkout

.github/workflows/release.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636
- name: centos-8
3737
image_name: os-packages-centos8
3838
package_name: kubeplay
39-
- name: fedora-33
40-
image_name: os-packages-fedora33
39+
- name: fedora-35
40+
image_name: os-packages-fedora35
4141
package_name: kubeplay
42-
- name: fedora-34
43-
image_name: os-packages-fedora34
42+
- name: fedora-36
43+
image_name: os-packages-fedora36
4444
package_name: kubeplay
4545
- name: debian-9
4646
image_name: os-packages-debian9
@@ -54,6 +54,9 @@ jobs:
5454
- name: ubuntu-2004
5555
image_name: os-packages-ubuntu2004
5656
package_name: kubeplay
57+
- name: ubuntu-2204
58+
image_name: os-packages-ubuntu2204
59+
package_name: kubeplay
5760

5861
steps:
5962
- name: Checkout

config/containerd.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ oom_score = 0
1616

1717
[plugins]
1818
[plugins."io.containerd.grpc.v1.cri"]
19-
sandbox_image = "REGISTRY_DOMAIN/library/pause:3.3"
19+
sandbox_image = "REGISTRY_DOMAIN/library/pause:3.7"
2020
max_container_log_line_size = -1
21+
enable_unprivileged_ports = false
22+
enable_unprivileged_icmp = false
2123
[plugins."io.containerd.grpc.v1.cri".containerd]
2224
default_runtime_name = "runc"
2325
snapshotter = "overlayfs"
@@ -26,9 +28,12 @@ oom_score = 0
2628
runtime_type = "io.containerd.runc.v2"
2729
runtime_engine = ""
2830
runtime_root = ""
31+
base_runtime_spec = "/etc/containerd/cri-base.json"
32+
2933
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
3034
systemdCgroup = true
3135
[plugins."io.containerd.grpc.v1.cri".registry]
3236
[plugins."io.containerd.grpc.v1.cri".registry.mirrors]
3337
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."docker.io"]
34-
endpoint = ["https://registry-1.docker.io"]
38+
endpoint = ["https://registry-1.docker.io"]
39+

config/cri-base.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ociVersion": "1.0.2-dev", "process": {"user": {"uid": 0, "gid": 0}, "cwd": "/", "capabilities": {"bounding": ["CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_FSETID", "CAP_FOWNER", "CAP_MKNOD", "CAP_NET_RAW", "CAP_SETGID", "CAP_SETUID", "CAP_SETFCAP", "CAP_SETPCAP", "CAP_NET_BIND_SERVICE", "CAP_SYS_CHROOT", "CAP_KILL", "CAP_AUDIT_WRITE"], "effective": ["CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_FSETID", "CAP_FOWNER", "CAP_MKNOD", "CAP_NET_RAW", "CAP_SETGID", "CAP_SETUID", "CAP_SETFCAP", "CAP_SETPCAP", "CAP_NET_BIND_SERVICE", "CAP_SYS_CHROOT", "CAP_KILL", "CAP_AUDIT_WRITE"], "permitted": ["CAP_CHOWN", "CAP_DAC_OVERRIDE", "CAP_FSETID", "CAP_FOWNER", "CAP_MKNOD", "CAP_NET_RAW", "CAP_SETGID", "CAP_SETUID", "CAP_SETFCAP", "CAP_SETPCAP", "CAP_NET_BIND_SERVICE", "CAP_SYS_CHROOT", "CAP_KILL", "CAP_AUDIT_WRITE"]}, "rlimits": [{"type": "RLIMIT_NOFILE", "hard": 65535, "soft": 65535}], "noNewPrivileges": true}, "root": {"path": "rootfs"}, "mounts": [{"destination": "/proc", "type": "proc", "source": "proc", "options": ["nosuid", "noexec", "nodev"]}, {"destination": "/dev", "type": "tmpfs", "source": "tmpfs", "options": ["nosuid", "strictatime", "mode=755", "size=65536k"]}, {"destination": "/dev/pts", "type": "devpts", "source": "devpts", "options": ["nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620", "gid=5"]}, {"destination": "/dev/shm", "type": "tmpfs", "source": "shm", "options": ["nosuid", "noexec", "nodev", "mode=1777", "size=65536k"]}, {"destination": "/dev/mqueue", "type": "mqueue", "source": "mqueue", "options": ["nosuid", "noexec", "nodev"]}, {"destination": "/sys", "type": "sysfs", "source": "sysfs", "options": ["nosuid", "noexec", "nodev", "ro"]}, {"destination": "/run", "type": "tmpfs", "source": "tmpfs", "options": ["nosuid", "strictatime", "mode=755", "size=65536k"]}], "linux": {"resources": {"devices": [{"allow": false, "access": "rwm"}]}, "cgroupsPath": "/default", "namespaces": [{"type": "pid"}, {"type": "ipc"}, {"type": "uts"}, {"type": "mount"}, {"type": "network"}], "maskedPaths": ["/proc/acpi", "/proc/asound", "/proc/kcore", "/proc/keys", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/sys/firmware", "/proc/scsi"], "readonlyPaths": ["/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger"]}}

config/nerdctl.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
debug = false
2+
debug_full = false
3+
address = "unix:///var/run/containerd/containerd.sock"
4+
namespace = "k8s.io"
5+
snapshotter = "native"
6+
cni_path = "/opt/cni/bin"
7+
cni_netconfpath = "/etc/cni/net.d"
8+
cgroup_manager = "systemd"
9+
insecure_registry = false
10+
hosts_dir = ["/etc/containerd/certs.d"]

install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ NGINX_CONFIG_FILE="${KUBE_ROOT}/config/nginx.conf"
2929
REGISTRY_CONFIG_FILE="${KUBE_ROOT}/config/registry.yaml"
3030
CONTAINERD_CONFIG_FILE="${KUBE_ROOT}/config/containerd.toml"
3131
CONTAINERD_SERVICE_FILE="${KUBE_ROOT}/config/containerd.service"
32+
CONTAINERD_CRI_BASE_CONFIG_FILE="${KUBE_ROOT}/config/cri-base.json"
33+
NERDCTL_CONFIG_FILE="${KUBE_ROOT}/config/nerdctl.toml"
3234

3335
# Include all functions from library/*.sh
3436
for file in ${KUBE_ROOT}/library/*.sh; do source ${file}; done

library/common.sh

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Set logging colors
55
#
66

7+
set +e
78
NORMAL_COL=$(tput sgr0)
89
RED_COL=$(tput setaf 1)
910
WHITE_COL=$(tput setaf 7)
@@ -14,6 +15,7 @@ debuglog(){ printf "${WHITE_COL}%s${NORMAL_COL}\n" "$@"; }
1415
infolog(){ printf "${GREEN_COL}✔ %s${NORMAL_COL}\n" "$@"; }
1516
warnlog(){ printf "${YELLOW_COL}➜ %s${NORMAL_COL}\n" "$@"; }
1617
errorlog(){ printf "${RED_COL}✖ %s${NORMAL_COL}\n" "$@"; }
18+
set -e
1719

1820
common::usage(){
1921
cat <<EOF
@@ -59,7 +61,12 @@ common::install_tools(){
5961

6062
# Install containerd and buildkit
6163
local nerdctl_tar_file=$(find ${RESOURCES_NGINX_DIR}/files -type f -name "nerdctl-*-linux-${ARCH}.tar.gz" | sort -r --version-sort | head -n1)
62-
tar -xf ${nerdctl_tar_file} -C /usr/bin/
64+
tar -xf ${nerdctl_tar_file} -C /usr/local/bin/
65+
mkdir -p /etc/nerdctl
66+
/bin/cp -f ${NERDCTL_CONFIG_FILE} /etc/nerdctl/nerdctl.toml
67+
local cni_plugins_tar_file=$(find ${RESOURCES_NGINX_DIR}/ -type f -name "cni-plugins-linux-${ARCH}-*.tgz" | sort -r --version-sort | head -n1)
68+
mkdir -p /opt/cni/bin/
69+
tar -xf ${cni_plugins_tar_file} -C /opt/cni/bin/
6370
mkdir -p /etc/containerd
6471
DATA_DIR=$(yq eval '.kubespray.data_dir' ${CONFIG_FILE})
6572
if [[ "${DATA_DIR}" == "null" ]]; then
@@ -74,7 +81,8 @@ common::install_tools(){
7481
REGISTRY_DOMAIN="${IMAGEREPO_DOMAIN}:${REGISTRY_HTTPS_PORT}"
7582
fi
7683
fi
77-
/bin/cp -f ${CONTAINERD_CONFIG_FILE} /etc/containerd/config.toml
84+
/bin/cp -f ${CONTAINERD_CONFIG_FILE} /etc/containerd/config.toml
85+
/bin/cp -f ${CONTAINERD_CRI_BASE_CONFIG_FILE} /etc/containerd/cri-base.json
7886
sed -i "s|CONTAINERD_ROOT_DIR|${CONTAINERD_ROOT_DIR}|g" /etc/containerd/config.toml
7987
sed -i "s|REGISTRY_DOMAIN|${REGISTRY_DOMAIN}|g" /etc/containerd/config.toml
8088
systemctl daemon-reload
@@ -148,6 +156,7 @@ common::generate_domain_certs(){
148156
# Copy domain.crt, domain.key to nginx certs directory
149157
infolog "Copy certs to ${COMPOSE_CONFIG_DIR}"
150158
cp -f ${CERTS_DIR}/rootCA.pem ${RESOURCES_NGINX_DIR}/certs/rootCA.crt
159+
chmod -R 777 ${RESOURCES_NGINX_DIR}/certs/
151160
fi
152161
}
153162

@@ -223,11 +232,11 @@ common::run_kubespray(){
223232
infolog "进入后台安装,可以ctrl-C退出"
224233
infolog "进入后台安装,可以ctrl-C退出"
225234
sleep 3
226-
infolog "如果log停止,可以自行退出重新输入'nerdctl logs -f kubespray-runner'查看日志"
227-
infolog "如果log停止,可以自行退出重新输入'nerdctl logs -f kubespray-runner'查看日志"
228-
infolog "如果log停止,可以自行退出重新输入'nerdctl logs -f kubespray-runner'查看日志"
235+
infolog "如果log停止,可以自行退出重新输入 tail -f ${KUBESPRAYDIR}/runner.log 查看日志"
236+
infolog "如果log停止,可以自行退出重新输入 tail -f ${KUBESPRAYDIR}/runner.log 查看日志"
237+
infolog "如果log停止,可以自行退出重新输入 tail -f ${KUBESPRAYDIR}/runner.log 查看日志"
229238
sleep 3
230-
nerdctl logs -f kubespray-runner
239+
tail -f ${KUBESPRAYDIR}/runner.log
231240
}
232241

233242
# Push kubespray image to registry

library/system.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ system::centos::config_repo(){
2929
infolog "Updated the repo file successfully"
3030
fi
3131
local containerd_tar_file=$(find ${RESOURCES_NGINX_DIR}/files -type f -name "containerd-*-linux-${ARCH}.tar.gz" | sort -r --version-sort | head -n1)
32-
tar -xf ${containerd_tar_file} -C /usr/bin/
32+
tar -xf ${containerd_tar_file} -C /usr/bin/ --strip-components=1
3333
local runc_file=$(find ${RESOURCES_NGINX_DIR}/files -type f -name "runc.${ARCH}" | sort -r --version-sort | head -n1)
3434
cp -raf ${runc_file} /usr/bin/runc
3535
chmod 0755 /usr/bin/runc
@@ -48,7 +48,7 @@ system::fedora::config_repo(){
4848
infolog "Updated the repo file successfully"
4949
fi
5050
local containerd_tar_file=$(find ${RESOURCES_NGINX_DIR}/files -type f -name "containerd-*-linux-${ARCH}.tar.gz" | sort -r --version-sort | head -n1)
51-
tar -xf ${containerd_tar_file} -C /usr/bin/
51+
tar -xf ${containerd_tar_file} -C /usr/bin/ --strip-components=1
5252
local runc_file=$(find ${RESOURCES_NGINX_DIR}/files -type f -name "runc.${ARCH}" | sort -r --version-sort | head -n1)
5353
cp -raf ${runc_file} /usr/bin/runc
5454
chmod 0755 /usr/bin/runc
@@ -66,7 +66,7 @@ system::debian::config_repo(){
6666
infolog "Updated the repo file successfully"
6767
fi
6868
local containerd_tar_file=$(find ${RESOURCES_NGINX_DIR}/files -type f -name "containerd-*-linux-${ARCH}.tar.gz" | sort -r --version-sort | head -n1)
69-
tar -xf ${containerd_tar_file} -C /usr/bin/
69+
tar -xf ${containerd_tar_file} -C /usr/bin/ --strip-components=1
7070
local runc_file=$(find ${RESOURCES_NGINX_DIR}/files -type f -name "runc.${ARCH}" | sort -r --version-sort | head -n1)
7171
cp -raf ${runc_file} /usr/bin/runc
7272
chmod 0755 /usr/bin/runc
@@ -84,7 +84,7 @@ system::ubuntu::config_repo(){
8484
infolog "Updated the repo file successfully"
8585
fi
8686
local containerd_tar_file=$(find ${RESOURCES_NGINX_DIR}/tools -type f -name "containerd-*-linux-${ARCH}.tar.gz" | sort -r --version-sort | head -n1)
87-
tar -xf ${containerd_tar_file} -C /usr/bin/
87+
tar -xf ${containerd_tar_file} -C /usr/bin/ --strip-components=1
8888
local runc_file=$(find ${RESOURCES_NGINX_DIR}/files -type f -name "runc.${ARCH}" | sort -r --version-sort | head -n1)
8989
cp -raf ${runc_file} /usr/bin/runc
9090
chmod 0755 /usr/bin/runc

0 commit comments

Comments
 (0)