Skip to content

Commit

Permalink
delete init.sh; modify init-kube.sh and docker.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Stevent-fei committed Dec 27, 2022
1 parent cbf1f2c commit 1d2ed1a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
5 changes: 3 additions & 2 deletions context/docker/rootfs/scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ set -e
# shellcheck disable=SC2006
scripts_path=$(cd `dirname "$0"`; pwd)
image_dir="$scripts_path/../images"
DOCKER_VERSION="19.03.14-sealer"
DOCKER_VERSION="19.03.15"

# shellcheck disable=SC1091
get_distribution() {
Expand Down Expand Up @@ -119,4 +119,5 @@ systemctl daemon-reload
systemctl restart docker.service
check_docker_valid

load_images
load_images
bash "${scripts_path}"/init-kube.sh
3 changes: 2 additions & 1 deletion context/docker/rootfs/scripts/uninstall-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ rm -f /usr/bin/runc
rm -f /usr/bin/vpnkit
rm -f /usr/bin/containerd-rootless-setuptool.sh
rm -f /usr/bin/containerd-rootless.sh
rm -f /usr/bin/nerdctl
rm -f /usr/bin/nerdctl
rm -f /usr/bin/seautil
14 changes: 7 additions & 7 deletions context/rootfs/scripts/init-kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# shellcheck disable=SC2164
# shellcheck disable=SC2006
# shellcheck disable=SC1091
#scripts_path=$(cd `dirname "$0"`; pwd)
scripts_path=$(cd `dirname "$0"`; pwd)
#source "${scripts_path}"/utils.sh

set -x
Expand Down Expand Up @@ -38,18 +38,18 @@ disable_firewalld() {
}

copy_bins() {
chmod -R 755 ../bin/*
chmod 644 ../bin
cp ../bin/* /usr/bin
cp ../scripts/kubelet-pre-start.sh /usr/bin
chmod -R 755 "${scripts_path}"/../bin/*
chmod 644 "${scripts_path}"/../bin
cp "${scripts_path}"/../bin/* /usr/bin
cp "${scripts_path}"/../scripts/kubelet-pre-start.sh /usr/bin
chmod +x /usr/bin/kubelet-pre-start.sh
}

copy_kubelet_service(){
mkdir -p /etc/systemd/system
cp ../etc/kubelet.service /etc/systemd/system/
cp "${scripts_path}"/../etc/kubelet.service /etc/systemd/system/
[ -d /etc/systemd/system/kubelet.service.d ] || mkdir /etc/systemd/system/kubelet.service.d
cp ../etc/10-kubeadm.conf /etc/systemd/system/kubelet.service.d/
cp "${scripts_path}"/../etc/10-kubeadm.conf /etc/systemd/system/kubelet.service.d/
}

disable_firewalld
Expand Down

0 comments on commit 1d2ed1a

Please sign in to comment.