Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
1e4fde4
byo cluster pipeline update
camrynl Jul 18, 2022
9cd6d9b
adding sub var
camrynl Jul 19, 2022
1b0713b
use build validations sub
camrynl Jul 19, 2022
7b26b8d
test
rbtr Jul 19, 2022
b568d74
use native azcli
camrynl Jul 19, 2022
0da8099
test /usr/bin/az
camrynl Jul 19, 2022
cc3f504
login and set sub
camrynl Jul 19, 2022
4bdb0ac
testing
camrynl Jul 19, 2022
7ae90f4
try upgrade cli
camrynl Jul 20, 2022
b6307ea
try upgrade azcli 2
camrynl Jul 20, 2022
77fb911
testing
camrynl Jul 20, 2022
c4efd9f
testing
camrynl Jul 20, 2022
e0f02d4
test svc conn
camrynl Jul 20, 2022
4f93cac
test svc conn
camrynl Jul 20, 2022
78b2468
test svc conn
camrynl Jul 20, 2022
a2ca982
test svc conn
camrynl Jul 20, 2022
545968d
test svc conn
camrynl Jul 20, 2022
b52073e
test svc conn
camrynl Jul 20, 2022
4deb45b
testing
camrynl Jul 20, 2022
709d80e
testing
camrynl Jul 20, 2022
719f3b4
testing
camrynl Jul 20, 2022
7aefdd2
testing
camrynl Jul 20, 2022
9e37a97
testing
camrynl Jul 20, 2022
ee6668d
testing
camrynl Jul 20, 2022
410fafa
fix conflict
camrynl Jul 20, 2022
f3985fd
testing
camrynl Jul 21, 2022
6ede83b
testing
camrynl Jul 21, 2022
847e926
testing
camrynl Jul 21, 2022
b161403
testing
camrynl Jul 21, 2022
dbffdea
testing
camrynl Jul 21, 2022
b049b06
testing
camrynl Jul 21, 2022
c591cf2
testing
camrynl Jul 21, 2022
05ef974
testing
camrynl Jul 21, 2022
4c562fa
testing
camrynl Jul 21, 2022
98a072b
fix rg-down
camrynl Jul 22, 2022
07d4e5d
testing
camrynl Jul 25, 2022
1339d9a
testing
camrynl Jul 25, 2022
c3bcc58
testing
camrynl Jul 25, 2022
975a540
testing
camrynl Jul 25, 2022
b2fff9d
testing
camrynl Jul 25, 2022
7511179
testing
camrynl Jul 25, 2022
90db37c
testing
camrynl Jul 25, 2022
774600c
update ds
camrynl Jul 25, 2022
0f3cd4a
testing
camrynl Jul 26, 2022
0b49dcb
build imgs
camrynl Jul 26, 2022
eaa3589
test
camrynl Jul 26, 2022
df86fc1
uncomment pipeline
camrynl Jul 27, 2022
f13ea20
remove debug
camrynl Jul 27, 2022
06065a5
pipeline update
camrynl Jul 27, 2022
4be9395
review fixes
camrynl Jul 27, 2022
0ff8186
update svc conn
camrynl Jul 27, 2022
cf61295
testing
camrynl Jul 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pipelines/singletenancy/aks-swift/e2e-job-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ parameters:
stages:
- stage: ${{ parameters.name }}
displayName: E2E - ${{ parameters.displayName }}
lockBehavior: sequential
dependsOn:
- setup
- publish
Expand Down
34 changes: 22 additions & 12 deletions .pipelines/singletenancy/aks-swift/e2e-step-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,17 @@ steps:

- task: AzureCLI@1
inputs:
azureSubscription: $(BUILD_VALIDATIONS_SERVICE_CONNECTION)
azureSubscription: $(AZURE_TEST_AGENT_SERVICE_CONNECTION)
scriptLocation: "inlineScript"
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
mkdir -p ~/.kube/
echo "DNC Underlay config"
az keyvault secret show --name $(KV_DNC_UNDERLAY_SECRET_NAME) --vault-name $(KV_NAME) --query value | sed 's/\\n/\n/g' | sed -e 's/^"//' -e 's/"$//'
az keyvault secret show --name $(KV_DNC_UNDERLAY_SECRET_NAME) --vault-name $(KV_NAME) --query value | sed 's/\\n/\n/g' | sed -e 's/^"//' -e 's/"$//' > ~/.kube/dnc-underlay
echo "Dirty ACN ccp config"
az keyvault secret show --name $(KV_AKS_SWIFT_CX_SECRET_NAME) --vault-name $(KV_NAME) --query value | sed 's/\\n/\n/g' | sed -e 's/^"//' -e 's/"$//'
az keyvault secret show --name $(KV_AKS_SWIFT_CX_SECRET_NAME) --vault-name $(KV_NAME) --query value | sed 's/\\n/\n/g' | sed -e 's/^"//' -e 's/"$//' > ~/.kube/config
displayName: Pull Kubeconfig from Keyvault
echo "Create AKS cluster"
make -C ./hack/swift azcfg AZCLI=az
make -C ./hack/swift byocni-up SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) AZCLI=az CLUSTER=swifte2e-$(make revision)
echo "Cluster successfully created"
displayName: Create test cluster
condition: succeeded()

- script: |
Expand All @@ -60,10 +59,6 @@ steps:
sudo rm -rf $ARTIFACT_DIR
sudo mkdir $ARTIFACT_DIR
sudo cp test/integration/logs/* $ARTIFACT_DIR
export KUBECONFIG=~/.kube/dnc-underlay
kubectl logs -n $STABLE_DNC_NAMESPACE -l app=dnc --tail -1 -c dnc --prefix > dnc-logs.txt
kubectl logs -n $STABLE_DNC_NAMESPACE -l app=dnc --tail -1 -c requestcontroller --prefix > dnc-rc-logs.txt
sudo cp *.txt $ARTIFACT_DIR
name: "GetLogs"
displayName: "Get logs"
condition: always()
Expand All @@ -82,3 +77,18 @@ steps:
name: "Cleanupartifactdir"
displayName: "Cleanup artifact dir"
condition: always()

- task: AzureCLI@2
inputs:
azureSubscription: "Azure Container Networking - Test"
scriptLocation: "inlineScript"
scriptType: "bash"
addSpnToEnvironment: true
inlineScript: |
echo "Deleting cluster"
make -C ./hack/swift azcfg AZCLI=az
make -C ./hack/swift down SUB=$(SUB_AZURE_NETWORK_AGENT_TEST) AZCLI=az CLUSTER=swifte2e-$(make revision)
echo "Cluster and resources down"
name: "Cleanupcluster"
displayName: "Cleanup cluster"
condition: always()
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ CNS_IMAGE_INFO_FILE = azure-cns-$(VERSION).txt
CNM_PLUGIN_IMAGE ?= microsoft/azure-vnet-plugin
CNM_PLUGIN_ROOTFS = azure-vnet-plugin-rootfs

VERSION ?= $(shell git describe --exclude "zapai*" --tags --always --dirty)
REVISION ?= $(shell git rev-parse --short HEAD)
VERSION ?= $(shell git describe --exclude "zapai*" --tags --always --dirty)

# Default target
all-binaries-platforms: ## Make all platform binaries
Expand Down Expand Up @@ -558,6 +559,9 @@ install-hooks: $(REPO_ROOT)/.git/hooks/pre-push ## installs git hooks

setup: tools install-hooks ## performs common required repo setup

revision: ## print the current git revision
@echo $(REVISION)

version: ## prints the version
@echo $(VERSION)

Expand Down
24 changes: 14 additions & 10 deletions hack/swift/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ KUBECFG = $(HOME)/.kube
SSH = $(HOME)/.ssh
AZCFG = $(HOME)/.azure
AZIMG = mcr.microsoft.com/azure-cli
AZCLI = docker run -v $(AZCFG):/root/.azure -v $(KUBECFG):/root/.kube -v $(SSH):/root/.ssh $(AZIMG) az
AZCLI ?= docker run -v $(AZCFG):/root/.azure -v $(KUBECFG):/root/.kube -v $(SSH):/root/.ssh $(AZIMG) az

# overrideable variables
USER ?= $(whoami)
Expand All @@ -25,10 +25,9 @@ help: ## Display this help

azlogin:
@$(AZCLI) login
@$(AZCLI) account set -s $(SUB)

azcfg:
@$(AZCLI) account set -s $(SUB)
@$(AZCLI) group create --location $(REGION) --name $(GROUP)
@$(AZCLI) extension add --name aks-preview --yes

set-kubeconf: ## Adds the kubeconf for $CLUSTER
Expand All @@ -52,17 +51,21 @@ vars: ## Show the env vars configured for the swift command
@echo VNET=$(VNET)
@echo CLUSTER=$(CLUSTER)

swift-net-up: azcfg ## Create required swift vnet/subnets
rg-up: ## Create resource group $GROUP in $SUB/$REGION
@$(AZCLI) group create --location $(REGION) --name $(GROUP)

rg-down: ## Delete the $GROUP in $SUB/$REGION
$(AZCLI) group delete -g $(GROUP) --yes

net-up: ## Create required swift vnet/subnets
$(AZCLI) network vnet create -g $(GROUP) -l $(REGION) --name $(VNET) --address-prefixes 10.0.0.0/8 -o none
$(AZCLI) network vnet subnet create -g $(GROUP) --vnet-name $(VNET) --name nodenet --address-prefixes 10.240.0.0/16 -o none
$(AZCLI) network vnet subnet create -g $(GROUP) --vnet-name $(VNET) --name podnet --address-prefixes 10.241.0.0/16 -o none

rg-down: azcfg ## Delete the $GROUP in $SUB/$REGION
$(AZCLI) group delete -g $(GROUP) --yes

##@ AKS Clusters

swift-up: azcfg swift-net-up ## Brings up a swift cluster $name in $SUB/$REGION
swift-up: rg-up net-up ## Brings up a swift cluster $name in $SUB/$REGION
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
--max-pods 250 \
--node-count 3 \
Expand All @@ -72,17 +75,18 @@ swift-up: azcfg swift-net-up ## Brings up a swift cluster $name in $SUB/$REGION
--yes
@$(MAKE) set-kubeconf

byocni-up: azcfg swift-net-up ## Brings up a swift cluster $name in $SUB/$REGION
byocni-up: rg-up net-up ## Brings up a swift cluster $name in $SUB/$REGION
$(AZCLI) aks create -n $(CLUSTER) -g $(GROUP) -l $(REGION) \
--max-pods 250 \
--node-count 3 \
--network-plugin none \
--vnet-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/nodenet \
--pod-subnet-id /subscriptions/$(SUB)/resourceGroups/$(GROUP)/providers/Microsoft.Network/virtualNetworks/$(VNET)/subnets/podnet \
--generate-ssh-keys \
--yes
@$(MAKE) set-kubeconf

down: azcfg ## Deletes the swift resources $SUB/$REGION
down: ## Deletes the swift resources $SUB/$REGION
$(AZCLI) aks delete -g $(GROUP) -n $(CLUSTER) --yes
@$(MAKE) unset-kubeconf
@$(MAKE) swift-rg-down
@$(MAKE) rg-down
5 changes: 4 additions & 1 deletion test/integration/manifests/cni/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ spec:
- effect: NoSchedule
key: node-role.kubernetes.io/master
operator: Exists
- effect: NoSchedule
key: node.kubernetes.io/not-ready
operator: Exists
hostNetwork: true
containers:
- name: azure-cni-installer
image: acnpublic.azurecr.io/acncli:v1.2.8-32-g77506640
image: acnpublic.azurecr.io/acncli:v1.4.28-42-gd086cf1b
command: ["./acn"]
args: ["cni", "manager", "--follow", "--mode", "transparent", "--ipam", "azure-cns"]
imagePullPolicy: Always
Expand Down
2 changes: 1 addition & 1 deletion test/integration/manifests/cns/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
effect: NoSchedule
containers:
- name: cns-container
image: acnpublic.azurecr.io/azure-cns:v1.2.8
image: acnpublic.azurecr.io/azure-cns:v1.4.29
imagePullPolicy: IfNotPresent
args: [ "-c", "tcp://$(CNSIpAddress):$(CNSPort)", "-t", "$(CNSLogTarget)"]
volumeMounts:
Expand Down