From db1a52643fd021c4561de98d1b99b6d894e30499 Mon Sep 17 00:00:00 2001 From: Congqi Xia Date: Fri, 4 Aug 2023 11:13:12 +0800 Subject: [PATCH] Configure schedule nightly for branch v2.2.x Signed-off-by: Congqi Xia --- .github/workflows/nightly_ci.yml | 61 +++++++++++- ci/milvus-operator/milvus-nightly.yaml | 129 +++++++++++++++++++++++++ 2 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 ci/milvus-operator/milvus-nightly.yaml diff --git a/.github/workflows/nightly_ci.yml b/.github/workflows/nightly_ci.yml index 64119bc3..d1d029e0 100644 --- a/.github/workflows/nightly_ci.yml +++ b/.github/workflows/nightly_ci.yml @@ -15,7 +15,7 @@ on: - cron: '0 18 * * *' jobs: - nightly: + nightly-master: name: Run Nightly CI runs-on: ubuntu-latest timeout-minutes: 90 @@ -56,7 +56,7 @@ jobs: run: | echo "IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG, RELEASE_NAME=$RELEASE_NAME" kubectl create namespace ${QA_NAMESPACE} - envsubst < milvus-cluster.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE} + envsubst < milvus-nightly.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE} kubectl -n ${QA_NAMESPACE} wait --for=condition=MilvusReady milvus/${RELEASE_NAME} --timeout 20m kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=${RELEASE_NAME} -n ${QA_NAMESPACE} kubectl describe milvus ${RELEASE_NAME} -n ${QA_NAMESPACE} @@ -71,4 +71,61 @@ jobs: nc -vz 127.0.0.1 19530 curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.8.2/gotestsum_1.8.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum gotestsum --format testname --hide-summary=output ./testcases/... --tags L0,L1,L2,L3 --addr=127.0.0.1:19530 -timeout=60m + + nightly-v2_2_x: + name: Run Nightly CI + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + IMAGE_REPO: "milvusdb/milvus" + TAG_PREFIX: "2.2.0-" + RELEASE_NAME: "go-test" + IMAGE_TAG: "2.2.0-latest" + QA_NAMESPACE: "qa" + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + ref: "v2.2.x" + fetch-depth: '0' + + - name: Get the latest of Milvus dev image tag + shell: bash + id: extracter + working-directory: ci/scripts + run: | + echo "IMAGE_TAG=$(./docker_image_find_tag.sh -n ${IMAGE_REPO} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV + # echo "::set-output name=tag::$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/milvus-dev -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" + + - name: Create cluster + uses: helm/kind-action@v1.3.0 + + - name: Deploy milvus operator + shell: bash + run: | + kubectl get sc + helm install milvus-operator -n milvus-operator --create-namespace https://github.com/milvus-io/milvus-operator/releases/download/v0.6.9/milvus-operator-0.6.9.tgz + kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=milvus-operator -n milvus-operator + kubectl get pods -n milvus-operator + - name: Install Milvus + shell: bash + working-directory: "ci/milvus-operator" + run: | + echo "IMAGE_REPO=$IMAGE_REPO, IMAGE_TAG=$IMAGE_TAG, RELEASE_NAME=$RELEASE_NAME" + kubectl create namespace ${QA_NAMESPACE} + envsubst < milvus-nightly.yaml | cat - | kubectl apply -f - -n ${QA_NAMESPACE} + kubectl -n ${QA_NAMESPACE} wait --for=condition=MilvusReady milvus/${RELEASE_NAME} --timeout 20m + kubectl --timeout 20m wait --for=condition=ready pod -l app.kubernetes.io/instance=${RELEASE_NAME} -n ${QA_NAMESPACE} + kubectl describe milvus ${RELEASE_NAME} -n ${QA_NAMESPACE} + kubectl get pod -o wide -n ${QA_NAMESPACE} | grep -E "NAME|${RELEASE_NAME}" + kubectl get svc -n ${QA_NAMESPACE} + kubectl port-forward service/${RELEASE_NAME}-milvus 19530 -n ${QA_NAMESPACE} >/dev/null 2>&1 & sleep 10s + + - name: Run Ci Test + shell: bash + working-directory: test/ + run: | + nc -vz 127.0.0.1 19530 + curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v1.8.2/gotestsum_1.8.2_linux_amd64.tar.gz" | sudo tar -xz -C /usr/local/bin gotestsum + gotestsum --format testname --hide-summary=output ./testcases/... --tags L0,L1,L2,L3 --addr=127.0.0.1:19530 -timeout=60m diff --git a/ci/milvus-operator/milvus-nightly.yaml b/ci/milvus-operator/milvus-nightly.yaml new file mode 100644 index 00000000..8144d0ed --- /dev/null +++ b/ci/milvus-operator/milvus-nightly.yaml @@ -0,0 +1,129 @@ +apiVersion: milvus.io/v1beta1 +kind: Milvus +metadata: + name: ${RELEASE_NAME} +spec: + mode: cluster + dependencies: + etcd: + inCluster: + deletionPolicy: Delete + pvcDeletion: true + storage: + inCluster: + deletionPolicy: Delete + pvcDeletion: true + values: + resources: + requests: + memory: 256Mi + pulsar: + inCluster: + deletionPolicy: Delete + pvcDeletion: true + values: + components: + autorecovery: false + functions: false + toolset: false + pulsar_manager: false + monitoring: + prometheus: false + grafana: false + node_exporter: false + alert_manager: false + proxy: + replicaCount: 1 + resources: + requests: + cpu: 0.1 + memory: 256Mi + wsResources: + requests: + memory: 256Mi + cpu: 0.1 + configData: + PULSAR_MEM: > + -Xms256m -Xmx256m + PULSAR_GC: > + -XX:MaxDirectMemorySize=512m + httpNumThreads: "50" + bookkeeper: + replicaCount: 2 + resources: + requests: + cpu: 0.1 + memory: 512Mi + configData: + PULSAR_MEM: > + -Xms512m + -Xmx512m + -XX:MaxDirectMemorySize=1024m + PULSAR_GC: > + -Dio.netty.leakDetectionLevel=disabled + -Dio.netty.recycler.linkCapacity=1024 + -XX:+UseG1GC -XX:MaxGCPauseMillis=10 + -XX:+ParallelRefProcEnabled + -XX:+UnlockExperimentalVMOptions + -XX:+DoEscapeAnalysis + -XX:ParallelGCThreads=32 + -XX:ConcGCThreads=32 + -XX:G1NewSizePercent=50 + -XX:+DisableExplicitGC + -XX:-ResizePLAB + -XX:+ExitOnOutOfMemoryError + -XX:+PerfDisableSharedMem + -XX:+PrintGCDetails + zookeeper: + replicaCount: 1 + resources: + requests: + cpu: 0.1 + memory: 256Mi + configData: + PULSAR_MEM: > + -Xms512m + -Xmx512m + PULSAR_GC: > + -Dcom.sun.management.jmxremote + -Djute.maxbuffer=10485760 + -XX:+ParallelRefProcEnabled + -XX:+UnlockExperimentalVMOptions + -XX:+DoEscapeAnalysis + -XX:+DisableExplicitGC + -XX:+PerfDisableSharedMem + -Dzookeeper.forceSync=no + broker: + replicaCount: 1 + resources: + requests: + cpu: 0.1 + memory: 512Mi + configData: + PULSAR_MEM: > + -Xms512m + -Xmx512m + -XX:MaxDirectMemorySize=1024m + PULSAR_GC: > + -Dio.netty.leakDetectionLevel=disabled + -Dio.netty.recycler.linkCapacity=1024 + -XX:+ParallelRefProcEnabled + -XX:+UnlockExperimentalVMOptions + -XX:+DoEscapeAnalysis + -XX:ParallelGCThreads=32 + -XX:ConcGCThreads=32 + -XX:G1NewSizePercent=50 + -XX:+DisableExplicitGC + -XX:-ResizePLAB + -XX:+ExitOnOutOfMemoryError + components: + image: ${IMAGE_REPO}:${IMAGE_TAG} + queryNode: + replicas: 2 + dataNode: + replicas: 1 + indexNode: + replicas: 1 + config: + log: + level: debug \ No newline at end of file