From 4423a944d61cf88016b6a5ca9dbeab278dc6eebc Mon Sep 17 00:00:00 2001 From: jshr-w <144164353+jshr-w@users.noreply.github.com> Date: Thu, 28 Sep 2023 20:17:36 -0700 Subject: [PATCH] ci: add CNIv2 testing for different proc/OS (#2230) * ci: proc/os load tests * ci: update deprecated param * ci: update naming * ci: add other proc/os load tests * ci: add other proc/os load tests * remove ubuntu18 test * remove redundant test * fix template call * add infiniband test, arm binary * fix rdma node name, build * update RDMA node count for quota * force pipeline permissions * undo force permissions * remove hardcoding * add os as parameter for cniv1 * set default osSKU * merge variable name change * set default OSSKU * set default OSSKU --------- Signed-off-by: jshr-w <144164353+jshr-w@users.noreply.github.com> --- .../create-cluster-template.yaml | 7 ++- .pipelines/cni/pipeline.yaml | 58 ++++++++++++++++++- .../cni/singletenancy/cniv1-template.yaml | 2 + .../singletenancy/linux-cniv2-template.yaml | 2 + hack/aks/Makefile | 1 + 5 files changed, 66 insertions(+), 4 deletions(-) diff --git a/.pipelines/cni/load-test-templates/create-cluster-template.yaml b/.pipelines/cni/load-test-templates/create-cluster-template.yaml index 1ec53f4a10..e09673c1b6 100644 --- a/.pipelines/cni/load-test-templates/create-cluster-template.yaml +++ b/.pipelines/cni/load-test-templates/create-cluster-template.yaml @@ -4,6 +4,7 @@ parameters: nodeCount: "" vmSize: "" vmSizeWin: "" + osSKU: Ubuntu steps: - task: AzureCLI@1 @@ -15,13 +16,13 @@ steps: inlineScript: | set -ex make -C ./hack/aks azcfg AZCLI=az REGION=${{ parameters.region }} - make -C ./hack/aks ${{ parameters.clusterType }} \ AZCLI=az REGION=${{ parameters.region }} SUB=$(SUB_AZURE_NETWORK_AGENT_BUILD_VALIDATIONS) \ CLUSTER=${{ parameters.clusterName }} NODE_COUNT=${{ parameters.nodeCount }} \ VM_SIZE=${{ parameters.vmSize }} VM_SIZE_WIN=${{ parameters.vmSizeWin }} \ - WINDOWS_USERNAME=${WINDOWS_USERNAME} WINDOWS_PASSWORD=${WINDOWS_PASSWORD} - + WINDOWS_USERNAME=${WINDOWS_USERNAME} WINDOWS_PASSWORD=${WINDOWS_PASSWORD} \ + OS_SKU=${{parameters.osSKU}} echo "Cluster successfully created" + name: "CreateAksCluster" displayName: "Create AKS Cluster" diff --git a/.pipelines/cni/pipeline.yaml b/.pipelines/cni/pipeline.yaml index 5ad46898b6..4cbc86aae9 100644 --- a/.pipelines/cni/pipeline.yaml +++ b/.pipelines/cni/pipeline.yaml @@ -47,6 +47,22 @@ stages: name: $(name) os: $(os) os_version: $(os_version) + - job: containerize_linux_arm64 + displayName: Build Images + pool: + name: "$(BUILD_POOL_NAME_LINUX_ARM64)" + strategy: + matrix: + cni_dropgz_test_linux_arm64: + arch: arm64 + name: cni-dropgz-test + os: linux + steps: + - template: ../containers/container-template.yaml + parameters: + arch: $(arch) + name: $(name) + os: $(os) - stage: binaries displayName: Build Binaries @@ -93,7 +109,7 @@ stages: matrix: cni_dropgz_test: name: cni-dropgz-test - platforms: linux/amd64 windows/amd64 + platforms: linux/amd64 linux/arm64 windows/amd64 steps: - template: ../containers/manifest-template.yaml parameters: @@ -153,6 +169,34 @@ stages: vmSize: ${VM_SIZE} arch: amd64 + - template: singletenancy/linux-cniv2-template.yaml + parameters: + name: mariner_linux_overlay + clusterType: overlay-byocni-up + clusterName: mariner-cniv2-overlay + nodeCount: ${NODE_COUNT_LINUX} + vmSize: ${VM_SIZE} + arch: amd64 + osSKU: AzureLinux + + - template: singletenancy/linux-cniv2-template.yaml + parameters: + name: arm_linux_overlay + clusterType: overlay-byocni-up + clusterName: arm-cniv2-overlay + nodeCount: ${NODE_COUNT_LINUX} + vmSize: Standard_D8ps_v5 + arch: arm64 + + - template: singletenancy/linux-cniv2-template.yaml + parameters: + name: rdma_linux_overlay + clusterType: overlay-byocni-up + clusterName: rdma-cniv2-overlay + nodeCount: 2 + vmSize: Standard_NC24r + arch: amd64 + - stage: delete_resources displayName: "Delete Resources" pool: @@ -164,6 +208,9 @@ stages: - linux_cniv1 - linux_podsubnet - linux_overlay + - mariner_linux_overlay + - arm_linux_overlay + - rdma_linux_overlay - setup variables: commitID: $[ stagedependencies.setup.env.outputs['SetEnvVars.commitID'] ] @@ -189,6 +236,15 @@ stages: linux_overlay: name: linux_overlay clusterName: linux-cniv2-overlay + mariner_linux_overlay: + name: mariner_linux_overlay + clusterName: mariner-cniv2-overlay + arm_linux_overlay: + name: arm_linux_overlay + clusterName: arm-cniv2-overlay + rdma_linux_overlay: + name: rdma_linux_overlay + clusterName: rdma-cniv2-overlay steps: - task: AzureCLI@1 inputs: diff --git a/.pipelines/cni/singletenancy/cniv1-template.yaml b/.pipelines/cni/singletenancy/cniv1-template.yaml index eca9f0cf1b..af3c003d22 100644 --- a/.pipelines/cni/singletenancy/cniv1-template.yaml +++ b/.pipelines/cni/singletenancy/cniv1-template.yaml @@ -11,6 +11,7 @@ parameters: scaleup: 100 iterations: 3 os_version: "" + osSKU: Ubuntu # CNIv1 # + Should be able to scale up/down the pods successfully certain number of times. @@ -42,6 +43,7 @@ stages: vmSize: ${{ parameters.vmSize }} vmSizeWin: ${{ parameters.vmSizeWin }} region: $(LOCATION) + osSKU: ${{ parameters.osSKU }} - stage: ${{ parameters.name }} variables: diff --git a/.pipelines/cni/singletenancy/linux-cniv2-template.yaml b/.pipelines/cni/singletenancy/linux-cniv2-template.yaml index e90a71fef9..e15415df9d 100644 --- a/.pipelines/cni/singletenancy/linux-cniv2-template.yaml +++ b/.pipelines/cni/singletenancy/linux-cniv2-template.yaml @@ -8,6 +8,7 @@ parameters: os: linux arch: "" testDropgz: true + osSKU: Ubuntu # + Should be able to scale up/down the pods successfully certain number of times. # + Node reboot scenarios should be covered. @@ -34,6 +35,7 @@ stages: nodeCount: ${{ parameters.nodeCount }} vmSize: ${{ parameters.vmSize }} region: $(LOCATION) + osSKU: ${{ parameters.osSKU }} - stage: ${{ parameters.name }} variables: diff --git a/hack/aks/Makefile b/hack/aks/Makefile index 45156412ae..e44391c090 100644 --- a/hack/aks/Makefile +++ b/hack/aks/Makefile @@ -100,6 +100,7 @@ overlay-byocni-up: rg-up overlay-net-up ## Brings up an Overlay BYO CNI cluster --pod-cidr 192.168.0.0/16 \ --vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \ --no-ssh-key \ + --os-sku $(OS_SKU) \ --yes @$(MAKE) set-kubeconf