File tree Expand file tree Collapse file tree 2 files changed +22
-6
lines changed
.pipelines/swiftv2-long-running Expand file tree Collapse file tree 2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,33 @@ az account set --subscription "$SUBSCRIPTION_ID"
1717echo " ==> Creating resource group: $RG "
1818az group create -n " $RG " -l " $LOCATION " --output none
1919
20- # AKS clusters
21- for CLUSTER in " aks-cluster-a" " aks-cluster-b" ; do
20+ # Enable parallel cluster creation
21+ create_cluster () {
22+ local CLUSTER=$1
2223 echo " ==> Creating AKS cluster: $CLUSTER "
24+
2325 az aks create -g " $RG " -n " $CLUSTER " -l " $LOCATION " \
2426 --network-plugin azure --node-count 1 \
2527 --node-vm-size " $VM_SKU_DEFAULT " \
2628 --enable-managed-identity --generate-ssh-keys \
27- --load-balancer-sku standard --yes
29+ --load-balancer-sku standard --yes --only-show-errors
2830
2931 echo " ==> Adding high-NIC nodepool to $CLUSTER "
3032 az aks nodepool add -g " $RG " -n highnic \
3133 --cluster-name " $CLUSTER " --node-count 2 \
32- --node-vm-size " $VM_SKU_HIGHNIC " --mode User
33- done
34+ --node-vm-size " $VM_SKU_HIGHNIC " --mode User --only-show-errors
35+
36+ echo " Finished AKS cluster: $CLUSTER "
37+ }
38+
39+ # Run both clusters in parallel
40+ create_cluster " aks-cluster-a" &
41+ pid_a=$!
42+
43+ create_cluster " aks-cluster-b" &
44+ pid_b=$!
45+
46+ # Wait for both to finish
47+ wait $pid_a $pid_b
48+
49+ echo " AKS clusters created successfully!"
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ stages:
8787 # ------------------------------------------------------------
8888 - job : Create_Storage
8989 displayName : " Create Storage"
90- dependsOn : Create_Peerings
90+ dependsOn : Create_AKS
9191 pool :
9292 vmImage : ubuntu-latest
9393 steps :
You can’t perform that action at this time.
0 commit comments