@@ -74,10 +74,6 @@ stages:
7474 arch : amd64
7575 name : npm
7676 os : linux
77- npm_windows_amd64 :
78- arch : amd64
79- name : npm
80- os : windows
8177 steps :
8278 - template : ../containers/container-template.yaml
8379 parameters :
@@ -102,10 +98,6 @@ stages:
10298 AZURE_CLUSTER : " conformance-v2-background"
10399 PROFILE : " v2-background"
104100 IS_STRESS_TEST : " false"
105- v2-ws22 :
106- AZURE_CLUSTER : " conformance-v2-ws22"
107- PROFILE : " v2-default-ws22"
108- IS_STRESS_TEST : " false"
109101 v2-linux-stress :
110102 AZURE_CLUSTER : " conformance-v2-linux-stress"
111103 PROFILE : " v2-linux-stress"
@@ -172,63 +164,13 @@ stages:
172164 export PUBLIC_IP_ID=$(az network public-ip show -g $(RESOURCE_GROUP) -n $(PUBLIC_IP_NAME) --query id -o tsv)
173165 echo Public IP ID $PUBLIC_IP_ID
174166
175- if [[ $(AZURE_CLUSTER) == *ws22 ]] # * is used for pattern matching
176- then
177- az extension add --name aks-preview
178- az extension update --name aks-preview
179-
180- echo "creating WS22 Cluster";
181- az aks create \
182- --resource-group $(RESOURCE_GROUP) \
183- --name $(AZURE_CLUSTER) \
184- --generate-ssh-keys \
185- --windows-admin-username e2eadmin \
186- --windows-admin-password alpha@numeric!password2 \
187- --network-plugin azure \
188- --vm-set-type VirtualMachineScaleSets \
189- --node-vm-size Standard_D4s_v3 \
190- --node-count 1 \
191- --load-balancer-outbound-ips $PUBLIC_IP_ID
192-
193- if [ $? != 0 ]
194- then
195- echo "Failing fast since previous command failed"
196- exit 1
197- fi
198-
199- # don't schedule anything on the linux system pool
200- echo "Updating $(AZURE_CLUSTER) to not schedule anything on linux pool..."
201- az aks nodepool update \
202- --cluster-name $(AZURE_CLUSTER) \
203- -g $(RESOURCE_GROUP) \
204- -n nodepool1 \
205- --node-taints CriticalAddonsOnly=true:NoSchedule
206-
207- if [ $? != 0 ]
208- then
209- echo "Failing fast since previous command failed"
210- exit 1
211- fi
212-
213- echo "Adding Windows nodepool to $(AZURE_CLUSTER) to group $(RESOURCE_GROUP)"
214- az aks nodepool add \
215- --resource-group $(RESOURCE_GROUP) \
216- --cluster-name $(AZURE_CLUSTER) \
217- --name awin22 \
218- --os-type Windows \
219- --os-sku Windows2022 \
220- --node-vm-size Standard_D4s_v3 \
221- --node-count 2
222-
223167 if [ $? != 0 ]
224168 then
225169 echo "Failing fast since previous command failed"
226170 exit 1
227171 fi
228172
229173 az aks get-credentials -n $(AZURE_CLUSTER) -g $(RESOURCE_GROUP) --file ./kubeconfig
230- ./kubectl --kubeconfig=./kubeconfig apply -f $(Pipeline.Workspace)/s/npm/examples/windows/azure-npm.yaml
231- ./kubectl --kubeconfig=./kubeconfig set image daemonset/azure-npm-win -n kube-system azure-npm=$IMAGE_REGISTRY/azure-npm:windows-amd64-$(TAG)
232174
233175 else
234176 echo "Creating Linux Cluster";
@@ -461,177 +403,3 @@ stages:
461403 inlineScript : |
462404 echo Deleting $(RESOURCE_GROUP)
463405 az group delete -n $(RESOURCE_GROUP) --yes
464-
465- # - stage: cyclonus_win
466- # displayName: Windows Cyclonus
467- # dependsOn: [setup, build]
468- # jobs:
469- # - job: Create_Windows_Cluster_and_Run_Test
470- # timeoutInMinutes: 360
471- # displayName: "Run Windows Cyclonus"
472- # pool:
473- # name: $(BUILD_POOL_NAME_DEFAULT)
474- # demands:
475- # - agent.os -equals Linux
476- # - Role -equals Build
477- # variables:
478- # RESOURCE_GROUP: $[ stagedependencies.setup.setup.outputs['EnvironmentalVariables.RESOURCE_GROUP'] ]
479- # TAG: $[ stagedependencies.setup.setup.outputs['EnvironmentalVariables.TAG'] ]
480- # FQDN: empty
481- # strategy:
482- # matrix:
483- # v2-windows:
484- # PROFILE: "cyc-ws22"
485- # steps:
486- # - checkout: self
487- # - task: AzureCLI@2
488- # displayName: "Create AKS Cluster"
489- # inputs:
490- # azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
491- # scriptType: "bash"
492- # scriptLocation: "inlineScript"
493- # failOnStderr: true
494- # inlineScript: |
495- # az extension add --name aks-preview
496- # az extension update --name aks-preview
497-
498- # export CLUSTER_NAME=$(RESOURCE_GROUP)-$(PROFILE)
499-
500- # echo "Creating resource group named $CLUSTER_NAME"
501- # az group create --name $CLUSTER_NAME -l $(LOCATION) -o table
502-
503- # echo "Creating resource group named $CLUSTER_NAME"
504- # az aks create \
505- # --resource-group $CLUSTER_NAME \
506- # --name $CLUSTER_NAME \
507- # --generate-ssh-keys \
508- # --windows-admin-username e2eadmin \
509- # --windows-admin-password alpha@numeric!password2 \
510- # --network-plugin azure \
511- # --vm-set-type VirtualMachineScaleSets \
512- # --node-vm-size Standard_D8s_v3 \
513- # --node-count 1 \
514- # --uptime-sla
515-
516- # # don't schedule anything on the linux system pool
517- # echo "Updating $CLUSTER_NAME to not schedule anything on linux pool..."
518- # az aks nodepool update \
519- # --cluster-name $CLUSTER_NAME \
520- # -g $CLUSTER_NAME \
521- # -n nodepool1 \
522- # --node-taints CriticalAddonsOnly=true:NoSchedule
523-
524- # echo "Adding Windows nodepool to $CLUSTER_NAME"
525- # az aks nodepool add \
526- # --resource-group $CLUSTER_NAME \
527- # --cluster-name $CLUSTER_NAME \
528- # --name awin22 \
529- # --os-type Windows \
530- # --os-sku Windows2022 \
531- # --node-vm-size Standard_D4s_v3 \
532- # --node-count 3
533-
534- # echo "Getting credentials to $CLUSTER_NAME"
535- # az aks get-credentials -g $CLUSTER_NAME -n $CLUSTER_NAME --overwrite-existing --file ./kubeconfig
536- # mkdir -p ~/.kube/
537- # cp ./kubeconfig ~/.kube/config
538-
539- # - task: AzureCLI@2
540- # displayName: "Deploy NPM to Test Cluster"
541- # inputs:
542- # azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
543- # scriptType: "bash"
544- # scriptLocation: "inlineScript"
545- # failOnStderr: true
546- # inlineScript: |
547- # export CLUSTER_NAME=$(RESOURCE_GROUP)-$(PROFILE)
548-
549- # curl -LO https://dl.k8s.io/release/v1.23.0/bin/linux/amd64/kubectl
550- # chmod +x kubectl
551-
552- # # deploy azure-npm
553- # ./kubectl --kubeconfig=./kubeconfig apply -f $(Pipeline.Workspace)/s/npm/examples/windows/azure-npm.yaml
554-
555- # # swap azure-npm image with one built during run
556- # ./kubectl --kubeconfig=./kubeconfig set image daemonset/azure-npm-win -n kube-system azure-npm=$IMAGE_REGISTRY/azure-npm:windows-amd64-$(TAG)
557-
558- # echo "sleeping and waiting for NPM pods to be ready..."
559- # sleep 1m
560- # ./kubectl --kubeconfig=./kubeconfig wait --for=condition=Ready pod -n kube-system -l k8s-app=azure-npm --timeout=5m
561- # echo "sleeping 3 more minutes to let windows NPM finish bootup phase"
562-
563- # ./kubectl --kubeconfig=./kubeconfig get po -n kube-system -owide -A
564-
565- # echo "Showing cluster status for $CLUSTER_NAME"
566- # FQDN=`az aks show -n $CLUSTER_NAME -g $CLUSTER_NAME --query fqdn -o tsv`
567- # echo "##vso[task.setvariable variable=FQDN]$FQDN"
568-
569- # - script: |
570- # cat ~/.kube/config
571- # curl -fsSL github.com/mattfenwick/cyclonus/releases/latest/download/cyclonus_linux_amd64.tar.gz | tar -zxv
572- # name: download_cyclonus
573- # displayName: "Download Cyclonus"
574- # failOnStderr: false
575- # condition: always()
576-
577- # - script: |
578- # ./test/cyclonus/test-cyclonus-windows.sh
579- # name: cyclonus
580- # displayName: "Run Cyclonus Test"
581- # failOnStderr: false
582- # condition: succeeded()
583-
584- # - bash: |
585- # export CLUSTER_NAME=$(RESOURCE_GROUP)-$(PROFILE)
586- # cp cyclonus-$CLUSTER_NAME $(System.DefaultWorkingDirectory)/$CLUSTER_NAME/cyclonus-$CLUSTER_NAME
587- # echo "Getting cluster state for $CLUSTER_NAME"
588- # mkdir -p $(System.DefaultWorkingDirectory)/$CLUSTER_NAME
589- # kubectl get pods -n kube-system | grep npm
590- # kubectl logs -n kube-system -l k8s-app=azure-npm --tail -1 --prefix > $(System.DefaultWorkingDirectory)/$CLUSTER_NAME/npm-logs_$(PROFILE).txt
591- # # capture any previous logs in case there was a crash
592- # npmPodList=`kubectl get pods -n kube-system | grep npm | awk '{print $1}'`
593- # for npmPod in $npmPodList; do
594- # previousLogFile=$(System.DefaultWorkingDirectory)/$CLUSTER_NAME/previous-npm-logs_$(PROFILE).txt
595- # kubectl logs -n kube-system $npmPod -p > $previousLogFile
596- # if [[ $? -ne 0 ]]; then
597- # # remove the empty file if kubectl logs failed (e.g. there was no previous terminated container)
598- # rm $previousLogFile
599- # fi
600- # done
601- # cp ./kubeconfig $(System.DefaultWorkingDirectory)/$CLUSTER_NAME/.kubeconfig
602- # condition: always()
603-
604- # - publish: $(System.DefaultWorkingDirectory)/$(RESOURCE_GROUP)-$(PROFILE)
605- # condition: always()
606- # artifact: NpmLogs-$(RESOURCE_GROUP)-$(PROFILE)
607-
608- # - stage: clean_up_cyclonus_win
609- # displayName: Cleanup Cyclonus
610- # dependsOn: [setup, cyclonus_win]
611- # condition: always()
612- # jobs:
613- # - job: clean_up
614- # displayName: "Cleanup"
615- # pool:
616- # name: $(BUILD_POOL_NAME_DEFAULT)
617- # demands:
618- # - agent.os -equals Linux
619- # - Role -equals Build
620- # variables:
621- # RESOURCE_GROUP: $[ stagedependencies.setup.setup.outputs['EnvironmentalVariables.RESOURCE_GROUP'] ]
622- # strategy:
623- # matrix:
624- # v2-windows:
625- # PROFILE: "cyc-ws22"
626- # steps:
627- # - checkout: none
628- # - task: AzureCLI@2
629- # displayName: "Delete Test Cluster Resource Group"
630- # inputs:
631- # azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
632- # scriptType: "bash"
633- # scriptLocation: "inlineScript"
634- # inlineScript: |
635- # echo Deleting $(RESOURCE_GROUP)-$(PROFILE)
636- # az group delete -n $(RESOURCE_GROUP)-$(PROFILE) --yes
637-
0 commit comments