diff --git a/build/installer/install_cmd.sh b/build/installer/install_cmd.sh index 8e16372b..8b460e7c 100644 --- a/build/installer/install_cmd.sh +++ b/build/installer/install_cmd.sh @@ -1079,9 +1079,6 @@ install_velero_plugin_terminus() { exit $ERR_EXIT fi - velero_plugin_image_pull=$($sh_c "${CRICTL} pull ${image}") - velero_plugin_image_pull=$($sh_c "${CRICTL} pull ${plugin}") - terminus_backup_location=$($sh_c "${VELERO} backup-location get -n os-system | awk '\$1 == \"${storage_location}\" {count++} END{print count}'") if [[ ${terminus_backup_location} == x"" || ${terminus_backup_location} -lt 1 ]]; then velero_storage_location_install_cmd="${VELERO} backup-location create $storage_location" @@ -1134,7 +1131,7 @@ install_containerd(){ # preinstall containerd for k8s if command_exists containerd && [ -f /etc/systemd/system/containerd.service ]; then ctr_cmd=$(command -v ctr) - if ! system_service_active "containerd"; then + if ! system_service_active "containerd"; then ensure_success $sh_c "systemctl start containerd" fi else @@ -1145,7 +1142,6 @@ install_containerd(){ if [ -f "$containerd_tar" ]; then ensure_success $sh_c "cp ${containerd_tar} containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz" else - echo "---download containerd---" # ! debug ensure_success $sh_c "wget https://github.com/containerd/containerd/releases/download/v${CONTAINERD_VERSION}/containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz" fi ensure_success $sh_c "tar Cxzvf /usr/local containerd-${CONTAINERD_VERSION}-linux-amd64.tar.gz" @@ -1153,18 +1149,17 @@ install_containerd(){ if [ -f "$runc_tar" ]; then ensure_success $sh_c "cp ${runc_tar} runc.amd64" else - echo "---download runc---" # ! debug - ensure_success $sh_c "wget https://github.com/opencontainers/runc/releases/download/v1.1.4/runc.amd64" + ensure_success $sh_c "wget https://github.com/opencontainers/runc/releases/download/v${RUNC_VERSION}/runc.amd64" fi ensure_success $sh_c "install -m 755 runc.amd64 /usr/local/sbin/runc" if [ -f "$cni_plugin_tar" ]; then ensure_success $sh_c "cp ${cni_plugin_tar} cni-plugins-linux-amd64-v${CNI_PLUGIN_VERSION}.tgz" else - ensure_success $sh_c "wget https://github.com/containernetworking/plugins/releases/download/v1.1.1/cni-plugins-linux-amd64-v1.1.1.tgz" + ensure_success $sh_c "wget https://github.com/containernetworking/plugins/releases/download/v${CNI_PLUGIN_VERSION}/cni-plugins-linux-amd64-v${CNI_PLUGIN_VERSION}.tgz" fi ensure_success $sh_c "mkdir -p /opt/cni/bin" - ensure_success $sh_c "tar Cxzvf /opt/cni/bin cni-plugins-linux-amd64-v1.1.1.tgz" + ensure_success $sh_c "tar Cxzvf /opt/cni/bin cni-plugins-linux-amd64-v${CNI_PLUGIN_VERSION}.tgz" ensure_success $sh_c "mkdir -p /etc/containerd" ensure_success $sh_c "containerd config default | tee /etc/containerd/config.toml" ensure_success $sh_c "sed -i 's/SystemdCgroup \= false/SystemdCgroup \= true/g' /etc/containerd/config.toml" @@ -1231,18 +1226,23 @@ install_k8s_ks() { KKE_VERSION=0.1.20 ensure_success $sh_c "mkdir -p /etc/kke" + local kk_bin="${BASE_DIR}/components/kk" local kk_tar="${BASE_DIR}/components/kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" - if [ ! -f "$kk_tar" ]; then - if [ x"$PROXY" != x"" ]; then - ensure_success $sh_c "curl ${CURL_TRY} -k -sfLO https://github.com/beclab/kubekey-ext/releases/download/${KKE_VERSION}/kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" - ensure_success $sh_c "tar xf kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" + if [ ! -f "$kk_bin" ]; then + if [ ! -f "$kk_tar" ]; then + if [ x"$PROXY" != x"" ]; then + ensure_success $sh_c "curl ${CURL_TRY} -k -sfLO https://github.com/beclab/kubekey-ext/releases/download/${KKE_VERSION}/kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" + ensure_success $sh_c "tar xf kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" + else + ensure_success $sh_c "curl ${CURL_TRY} -sfL https://raw.githubusercontent.com/beclab/kubekey-ext/master/downloadKKE.sh | VERSION=${KKE_VERSION} sh -" + fi else - ensure_success $sh_c "curl ${CURL_TRY} -sfL https://raw.githubusercontent.com/beclab/kubekey-ext/master/downloadKKE.sh | VERSION=${KKE_VERSION} sh -" + ensure_success $sh_c "cp ${kk_tar} kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" + ensure_success $sh_c "tar xf kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" fi - else - ensure_success $sh_c "cp ${kk_tar} kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" - ensure_success $sh_c "tar xf kubekey-ext-v${KKE_VERSION}-linux-amd64.tar.gz" + else + ensure_success $sh_c "cp ${kk_bin} ./" fi ensure_success $sh_c "chmod +x kk" diff --git a/build/manifest/dependencies b/build/manifest/dependencies index 6898e604..ca556d81 100644 --- a/build/manifest/dependencies +++ b/build/manifest/dependencies @@ -29,21 +29,14 @@ https://github.com/containerd/containerd/releases/download/v1.6.4/containerd-1.6 https://github.com/kubernetes-sigs/cri-tools/releases/download/v1.24.0/crictl-v1.24.0-linux-amd64.tar.gz,crictl/v1.24.0,, -https://download.docker.com/linux/static/stable/x86_64/docker-20.10.8.tgz,docker/20.10.8,, - https://github.com/coreos/etcd/releases/download/v3.4.13/etcd-v3.4.13-linux-amd64.tar.gz,etcd/v3.4.13,, https://get.helm.sh/helm-v3.9.0-linux-amd64.tar.gz,helm/v3.9.0,,helm -https://github.com/xiaods/k8e/releases/download/v1.21.14%2Bk8e2/k8e,kube/v1.21.14,, https://github.com/k3s-io/k3s/releases/download/v1.21.4+k3s1/k3s,kube/v1.21.4,, https://storage.googleapis.com/kubernetes-release/release/v1.22.10/bin/linux/amd64/kubeadm,kube/v1.22.10,, https://storage.googleapis.com/kubernetes-release/release/v1.22.10/bin/linux/amd64/kubelet,kube/v1.22.10,, https://storage.googleapis.com/kubernetes-release/release/v1.22.10/bin/linux/amd64/kubectl,kube/v1.22.10,, -https://github.com/docker/compose/releases/download/v2.2.2/docker-compose-linux-x86_64,registry/compose/v2.2.2,docker-compose-linux-x86_64,, -https://github.com/goharbor/harbor/releases/download/v2.5.3/harbor-offline-installer-v2.5.3.tgz,registry/harbor/v2.5.3,, -https://github.com/kubesphere/kubekey/releases/download/v2.0.0-alpha.1/registry-2-linux-amd64.tar.gz,registry/registry/2,, - https://github.com/opencontainers/runc/releases/download/v1.1.1/runc.amd64,runc/v1.1.1,, https://github.com/opencontainers/runc/releases/download/v1.1.4/runc.amd64,runc/v1.1.4,, \ No newline at end of file diff --git a/build/manifest/images b/build/manifest/images index 849af26f..330bd2bd 100644 --- a/build/manifest/images +++ b/build/manifest/images @@ -10,17 +10,21 @@ calico/pod2daemon-flexvol:v3.23.2 citusdata/citus:11.3.0-alpine coredns/coredns:1.8.0 csiplugin/snapshot-controller:v4.0.0 -beclab/ks-installer-ext:v0.1.7-ext +beclab/ks-installer-ext:v0.1.8-ext kubesphere/k8s-dns-node-cache:1.15.12 kubesphere/ks-console:v3.3.0 kubesphere/ks-controller-manager:v3.3.0 kubesphere/kube-apiserver:v1.22.10 +kubesphere/kube-apiserver:v1.21.4 kubesphere/kube-controller-manager:v1.22.10 +kubesphere/kube-controller-manager:v1.21.4 kubesphere/kubectl:v1.22.0 kubesphere/kube-proxy:v1.22.10 +kubesphere/kube-proxy:v1.21.4 kubesphere/kube-rbac-proxy:v0.11.0 kubesphere/kube-rbac-proxy:v0.8.0 kubesphere/kube-scheduler:v1.22.10 +kubesphere/kube-scheduler:v1.21.4 kubesphere/pause:3.5 kubesphere/pause:3.4.1 k8s.gcr.io/pause:3.6 @@ -40,6 +44,6 @@ quay.io/argoproj/argocli:v3.5.0 quay.io/argoproj/argoexec:v3.5.0 quay.io/argoproj/workflow-controller:v3.5.0 redis:5.0.14-alpine -beclab/velero:v1.11.0 -beclab/velero-plugin-for-terminus:v1.0.1 +beclab/velero:v1.11.1 +beclab/velero-plugin-for-terminus:v1.0.2 rancher/coredns-coredns:1.8.3