From f03af4fe2e278d67ffe2ff43c445d2ef4c2035ef Mon Sep 17 00:00:00 2001 From: "panyintian.fu" Date: Tue, 5 Nov 2024 11:20:22 +0800 Subject: [PATCH] [Test] Replace the centos7 test label with rocky8 Signed-off-by: panyintian.fu --- .github/workflows/kubean_e2e_test_ci.yaml | 10 +++++----- hack/download-offline-files.sh | 4 ++-- hack/network_testcase.sh | 8 ++++---- hack/offline-util.sh | 4 ++-- hack/offline_run_centos.sh | 2 +- hack/resouce_util.sh | 2 +- hack/run-e2e.sh | 2 +- hack/run-network-e2e.sh | 8 ++++---- hack/run-sonobouy-e2e.sh | 2 +- hack/run-vip.sh | 6 +++--- hack/util.sh | 24 +++++++++++------------ hack/vm_config.yaml | 16 +++++++-------- 12 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.github/workflows/kubean_e2e_test_ci.yaml b/.github/workflows/kubean_e2e_test_ci.yaml index 67e55b267..25bcec02d 100644 --- a/.github/workflows/kubean_e2e_test_ci.yaml +++ b/.github/workflows/kubean_e2e_test_ci.yaml @@ -52,7 +52,7 @@ jobs: steps: - name: Set env for this job run: | - OS_TYPE="CENTOS7" + OS_TYPE="ROCKY8" ARCH="amd64" Network_TYPE="calico" GAP_TYPE="OFFLINE" @@ -84,7 +84,7 @@ jobs: steps: - name: Set env for this job run: | - OS_TYPE="CENTOS7" + OS_TYPE="ROCKY8" ARCH="amd64" Network_TYPE="calico" GAP_TYPE="ONLINE" @@ -121,7 +121,7 @@ jobs: uses: mikefarah/yq@v4.44.3 - name: Set env for this job run: | - OS_TYPE="CENTOS7" + OS_TYPE="ROCKY8" ARCH="amd64" Network_TYPE="cilium" GAP_TYPE="ONLINE" @@ -153,7 +153,7 @@ jobs: steps: - name: Set env for this job run: | - OS_TYPE="CENTOS7" + OS_TYPE="ROCKY8" ARCH="amd64" Network_TYPE="cilium" #GAP_TYPE="OFFLINE" # for test @@ -172,7 +172,7 @@ jobs: continue-on-error: ${{ vars.CENTOS_CILIUM_AIRGAP_ALLOW_FAILURE != 'false' }} run: | export runner_name=${{ runner.name }} - export OS_TYPE="CENTOS7" # for test + export OS_TYPE="ROCKY8" # for test export GAP_TYPE="ONLINE" # for test bash ./hack/newE2E.sh diff --git a/hack/download-offline-files.sh b/hack/download-offline-files.sh index 25b2b503c..58f082d8f 100644 --- a/hack/download-offline-files.sh +++ b/hack/download-offline-files.sh @@ -22,13 +22,13 @@ f_images_amd64_tgz=${base_url}/images-amd64-${TAG}.tar.gz f_files_arm64__tgz=${base_url}/files-arm64-${TAG}.tar.gz f_images_arm64_tgz=${base_url}/images-arm64-${TAG}.tar.gz # os pkgs -f_os_centos7=${base_url}/os-pkgs-centos7-${TAG}.tar.gz +f_os_rocky8=${base_url}/os-pkgs-rocky8-${TAG}.tar.gz f_os_kylin10=${base_url}/os-pkgs-kylin-v10sp2-${TAG}.tar.gz f_os_redhat8=${base_url}/os-pkgs-redhat8-${TAG}.tar.gz f_os_redhat7=${base_url}/os-pkgs-redhat7-${TAG}.tar.gz # shellcheck disable=SC2206 file_down_list=(${f_files_amd64_tgz} ${f_images_amd64_tgz} ${f_files_arm64__tgz} ${f_images_arm64_tgz} \ - ${f_os_centos7} ${f_os_kylin10} ${f_os_redhat8} ${f_os_redhat7}) + ${f_os_rocky8} ${f_os_kylin10} ${f_os_redhat8} ${f_os_redhat7}) for (( i=0; i<${#file_down_list[@]};i++)); do echo "${file_down_list[$i]}" timeout 1m wget -q -c -P "${DOWNLOAD_FOLDER}" "${file_down_list[$i]}" diff --git a/hack/network_testcase.sh b/hack/network_testcase.sh index 377963a51..0b6bd0297 100644 --- a/hack/network_testcase.sh +++ b/hack/network_testcase.sh @@ -322,22 +322,22 @@ main() { echo "🥦🥦🥦run testcase: "$case case $case in "kubean_ipvs_cluster_e2e") - export OS_NAME="CENTOS7" + export OS_NAME="ROCKY8" prepare_case_vars kubean_ipvs_cluster_e2e ;; "kubean_cilium_cluster_e2e") - export OS_NAME="CENTOS7-HK" + export OS_NAME="ROCKY8-HK" prepare_case_vars kubean_cilium_cluster_e2e ;; "kubean_calico_dualstack_e2e") - export OS_NAME="CENTOS7-HK" + export OS_NAME="ROCKY8-HK" prepare_case_vars kubean_calico_dualstack_e2e ;; "kubean_calico_single_stack_e2e") - export OS_NAME="CENTOS7" + export OS_NAME="ROCKY8" prepare_case_vars kubean_calico_single_stack_e2e ;; diff --git a/hack/offline-util.sh b/hack/offline-util.sh index 4db0932cb..7b0ad3170 100644 --- a/hack/offline-util.sh +++ b/hack/offline-util.sh @@ -66,7 +66,7 @@ function util::vm_name_ip_init_offline_by_os(){ vm_name1="gwt-kubean-offline-e2e-kylin-node3" vm_name2="gwt-kubean-offline-e2e-kylin-node4" ;; - "CENTOS7") + "ROCKY8") vm_ip_addr1="10.16.10.163" vm_ip_addr2="10.16.10.164" vm_name1="gwt-kubean-offline-e2e-node3" @@ -93,7 +93,7 @@ function util::vm_name_ip_init_offline_by_os(){ vm_name1="gwt-kubean-offline-e2e-kylin-node1" vm_name2="gwt-kubean-offline-e2e-kylin-node2" ;; - "CENTOS7") + "ROCKY8") vm_ip_addr1="10.16.10.161" vm_ip_addr2="10.16.10.162" vm_name1="gwt-kubean-offline-e2e-node1" diff --git a/hack/offline_run_centos.sh b/hack/offline_run_centos.sh index a2b68fb6f..65c0aa139 100644 --- a/hack/offline_run_centos.sh +++ b/hack/offline_run_centos.sh @@ -11,7 +11,7 @@ source "${REPO_ROOT}"/hack/util.sh source "${REPO_ROOT}"/hack/offline-util.sh ############### Base case -export OS_NAME="CENTOS7" +export OS_NAME="ROCKY8" CLUSTER_OPERATION_NAME1="cluster1-install-"`date "+%H-%M-%S"` cp -f ${REPO_ROOT}/test/offline-common/hosts-conf-cm.yml ${REPO_ROOT}/test/kubean_functions_e2e/e2e-install-cluster/ cp -f ${REPO_ROOT}/test/offline-common/kubeanCluster.yml ${REPO_ROOT}/test/kubean_functions_e2e/e2e-install-cluster/ diff --git a/hack/resouce_util.sh b/hack/resouce_util.sh index 7655a0a8a..2cfc9d88c 100644 --- a/hack/resouce_util.sh +++ b/hack/resouce_util.sh @@ -428,7 +428,7 @@ function resource::import_os_package_minio(){ } ##################################### -# when the imported os package is centos7 +# when the imported os package is rocky8 function resource::check_os_package_minio(){ file_list=( "${MINIO_URL}/kubean/rocky/8/os/aarch64/repodata/repomd.xml" \ "${MINIO_URL}/kubean/rocky/8/os/x86_64/repodata/repomd.xml" \ diff --git a/hack/run-e2e.sh b/hack/run-e2e.sh index 288424877..65f0b84b6 100644 --- a/hack/run-e2e.sh +++ b/hack/run-e2e.sh @@ -25,7 +25,7 @@ GOPATH=$(go env GOPATH | awk -F ':' '{print $1}') export PATH=$PATH:$GOPATH/bin rm -f ~/.ssh/known_hosts arch=amd64 -os_name="CENTOS7" +os_name="ROCKY8" util::vm_name_ip_init_online_by_os ${os_name} echo "vm_name1: ${vm_name1}" SNAPSHOT_NAME="os-installed" diff --git a/hack/run-network-e2e.sh b/hack/run-network-e2e.sh index 7f736c452..70b932e30 100644 --- a/hack/run-network-e2e.sh +++ b/hack/run-network-e2e.sh @@ -47,7 +47,7 @@ function func_prepare_config_yaml_single_stack() { ####################### create ipvs cluster ################ echo "create ipvs cluster....." -export OS_NAME="CENTOS7" +export OS_NAME="ROCKY8" echo "OS_NAME: ${OS_NAME}" util::power_on_2vms ${OS_NAME} @@ -70,7 +70,7 @@ ginkgo -v -race -timeout=3h --fail-fast ./${go_test_path} -- --kubeconfig="${K if [[ "${OFFLINE_FLAG}" == "true" ]]; then export OS_NAME="REDHAT8" else - export OS_NAME="CENTOS7-HK" + export OS_NAME="ROCKY8-HK" fi echo "create cilium cluster....." echo "OS_NAME: ${OS_NAME}" @@ -119,7 +119,7 @@ helm list -n "kubean-system" --kubeconfig ${KUBECONFIG_FILE} if [[ "${OFFLINE_FLAG}" == "true" ]]; then export OS_NAME="REDHAT8" else - export OS_NAME="CENTOS7-HK" + export OS_NAME="ROCKY8-HK" fi dest_config_path="${REPO_ROOT}"/test/kubean_calico_dualstack_e2e/e2e-install-calico-dual-stack-cluster @@ -195,7 +195,7 @@ util::restore_vsphere_vm_snapshot ${VSPHERE_HOST} ${VSPHERE_PASSWD} ${VSPHERE_US util::restore_vsphere_vm_snapshot ${VSPHERE_HOST} ${VSPHERE_PASSWD} ${VSPHERE_USER} "${SNAPSHOT_NAME}" "${vm_name2}" ############## calico single stuck ############## -export OS_NAME="CENTOS7" +export OS_NAME="ROCKY8" ### CALICO: IPIP_ALWAYS ### util::power_on_2vms ${OS_NAME} sshpass -p ${AMD_ROOT_PASSWORD} scp -o StrictHostKeyChecking=no ${REPO_ROOT}/test/tools/sonobuoy root@$vm_ip_addr1:/usr/bin/ diff --git a/hack/run-sonobouy-e2e.sh b/hack/run-sonobouy-e2e.sh index f79b1777e..e675312e8 100644 --- a/hack/run-sonobouy-e2e.sh +++ b/hack/run-sonobouy-e2e.sh @@ -22,7 +22,7 @@ generate_rsa_key(){ rm -f ~/.ssh/known_hosts export ARCH=amd64 -export OS_NAME="CENTOS7" +export OS_NAME="ROCKY8" export OFFLINE_FLAG=false export NIGHTLY_E2E_STEP=${1} if [ "${NIGHTLY_E2E_STEP}" == "ALL" ]; then diff --git a/hack/run-vip.sh b/hack/run-vip.sh index d94278f09..febbe9573 100644 --- a/hack/run-vip.sh +++ b/hack/run-vip.sh @@ -12,7 +12,7 @@ source "${REPO_ROOT}"/hack/offline-util.sh rm -f ~/.ssh/known_hosts export ARCH=amd64 -export OS_NAME="CENTOS7" +export OS_NAME="ROCKY8" export OFFLINE_FLAG=false echo "ARCH: ${ARCH}" echo "IS_OFFLINE: ${OFFLINE_FLAG}" @@ -36,11 +36,11 @@ function func_prepare_config_yaml_3node() { ####################### create vip cluster ################ echo "create vip cluster....." -export OS_NAME="CENTOS7" +export OS_NAME="ROCKY8" echo "OS_NAME: ${OS_NAME}" util::power_on_2vms ${OS_NAME} -export OS_NAME="CENTOS7-3MASTER" +export OS_NAME="ROCKY8-3MASTER" echo "OS_NAME: ${OS_NAME}" util::power_on_third_vms ${OS_NAME} echo "this:" diff --git a/hack/util.sh b/hack/util.sh index 5cd4f5c4f..419c82eee 100644 --- a/hack/util.sh +++ b/hack/util.sh @@ -309,13 +309,13 @@ function util::vm_name_ip_init_online_by_os(){ echo "OS_NAME: " ${OS_NAME} if [ "${RUNNER_NAME}" == "debug" ]; then case ${OS_NAME} in - "CENTOS7") + "ROCKY8") vm_ip_addr1="10.6.178.211" vm_ip_addr2="10.6.178.212" vm_name1="gwt-kubean-e2e-node211" vm_name2="gwt-kubean-e2e-node212" ;; - "CENTOS7-3MASTER") + "ROCKY8-3MASTER") vm_ip_addr3="10.6.178.219" vm_name3="gwt-kubean-e2e-node219" vipadd="10.6.178.220" @@ -338,7 +338,7 @@ function util::vm_name_ip_init_online_by_os(){ vm_name1="gwt-kubean-e2e-redhat8-node213" vm_name2="gwt-kubean-e2e-redhat8-node214" ;; - "CENTOS7-HK") + "ROCKY8-HK") vm_ip_addr1="10.6.178.217" vm_ip_addr2="10.6.178.218" vm_name1="gwt-kubean-e2e-hk-node217" @@ -348,7 +348,7 @@ function util::vm_name_ip_init_online_by_os(){ fi if [ "${RUNNER_NAME}" == "debug2" ]; then case ${OS_NAME} in - "CENTOS7") + "ROCKY8") vm_ip_addr1="10.6.178.221" vm_ip_addr2="10.6.178.222" vm_name1="gwt-kubean-e2e-node221" @@ -376,13 +376,13 @@ function util::vm_name_ip_init_online_by_os(){ fi if [ "${RUNNER_NAME}" == "kubean-e2e-runner1" ]; then case ${OS_NAME} in - "CENTOS7") + "ROCKY8") vm_ip_addr1="172.30.41.71" vm_ip_addr2="172.30.41.72" vm_name1="gwt-kubean-e2e-node71" vm_name2="gwt-kubean-e2e-node72" ;; - "CENTOS7-3MASTER") + "ROCKY8-3MASTER") vm_ip_addr3="172.30.41.78" vm_name3="gwt-kubean-e2e-hk-node78" vipadd="172.30.41.128" @@ -405,7 +405,7 @@ function util::vm_name_ip_init_online_by_os(){ vm_name1="gwt-kubean-e2e-redhat7-node75" vm_name2="gwt-kubean-e2e-redhat7-node76" ;; - "CENTOS7-HK") + "ROCKY8-HK") vm_ip_addr1="172.30.41.77" vm_ip_addr2="172.30.41.78" vm_name1="gwt-kubean-e2e-hk-node77" @@ -415,13 +415,13 @@ function util::vm_name_ip_init_online_by_os(){ fi if [ "${RUNNER_NAME}" == "kubean-e2e-runner2" ]; then case ${OS_NAME} in - "CENTOS7") + "ROCKY8") vm_ip_addr1="10.6.178.201" vm_ip_addr2="10.6.178.202" vm_name1="gwt-kubean-e2e-node201" vm_name2="gwt-kubean-e2e-node202" ;; - "CENTOS7-3MASTER") + "ROCKY8-3MASTER") vm_ip_addr3="10.6.178.208" vm_name3="gwt-kubean-e2e-hk-node208" vipadd="10.6.178.220" @@ -444,7 +444,7 @@ function util::vm_name_ip_init_online_by_os(){ vm_name1="gwt-kubean-e2e-redhat7-node203" vm_name2="gwt-kubean-e2e-redhat7-node204" ;; - "CENTOS7-HK") + "ROCKY8-HK") vm_ip_addr1="10.6.178.207" vm_ip_addr2="10.6.178.208" vm_name1="gwt-kubean-e2e-hk-node207" @@ -621,11 +621,11 @@ function util::set_config_path(){ function util::debug_runner_vm_match(){ echo "RUNNER_NAME: ${RUNNER_NAME}" - export OS_NAME="CENTOS7-HK" + export OS_NAME="ROCKY8-HK" echo "OS_NAME: ${OS_NAME}" util::power_on_2vms ${OS_NAME} - export OS_NAME="CENTOS7" + export OS_NAME="ROCKY8" echo "OS_NAME: ${OS_NAME}" util::power_on_2vms ${OS_NAME} diff --git a/hack/vm_config.yaml b/hack/vm_config.yaml index fbeb10779..8a165eaec 100644 --- a/hack/vm_config.yaml +++ b/hack/vm_config.yaml @@ -6,7 +6,7 @@ Airgap: ip: 10.5.127.167 - name: gwt-kubean-offline-e2e-kylin-node4 ip: 10.5.127.168 - CENTOS7: + ROCKY8: - name: gwt-kubean-offline-e2e-node3 ip: 10.16.10.163 - name: gwt-kubean-offline-e2e-node4 @@ -28,7 +28,7 @@ Airgap: ip: 10.5.127.165 - name: gwt-kubean-offline-e2e-kylin-node2 ip: 10.5.127.166 - CENTOS7: + ROCKY8: - name: gwt-kubean-offline-e2e-node1 ip: 10.16.10.161 - name: gwt-kubean-offline-e2e-node2 @@ -47,7 +47,7 @@ Airgap: ### online vms config ONLINE: debug: - CENTOS7: + ROCKY8: - name: gwt-kubean-e2e-node71 ip: 172.30.41.71 - name: gwt-kubean-e2e-node72 @@ -62,13 +62,13 @@ ONLINE: ip: 172.30.41.75 - name: gwt-kubean-e2e-redhat7-node76 ip: 172.30.41.76 - CENTOS7-HK: + ROCKY8-HK: - name: gwt-kubean-e2e-hk-node77 ip: 172.30.41.77 - name: gwt-kubean-e2e-hk-node78 ip: 172.30.41.78 kubean-e2e-runner1: - CENTOS7: + ROCKY8: - name: gwt-kubean-e2e-node211 ip: 10.6.178.211 - name: gwt-kubean-e2e-node212 @@ -83,13 +83,13 @@ ONLINE: ip: 10.6.178.213 - name: gwt-kubean-e2e-redhat8-node214 ip: 10.6.178.214 - CENTOS7-HK: + ROCKY8-HK: - name: gwt-kubean-e2e-hk-node217 ip: 10.6.178.217 - name: gwt-kubean-e2e-hk-node218 ip: 10.6.178.218 kubean-e2e-runner2: - CENTOS7: + ROCKY8: - name: gwt-kubean-e2e-node201 ip: 10.6.178.201 - name: gwt-kubean-e2e-node202 @@ -104,7 +104,7 @@ ONLINE: ip: 10.6.178.203 - name: gwt-kubean-e2e-redhat7-node204 ip: 10.6.178.204 - CENTOS7-HK: + ROCKY8-HK: - name: gwt-kubean-e2e-hk-node207 ip: 10.6.178.207 - name: gwt-kubean-e2e-hk-node208