Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
40 changes: 40 additions & 0 deletions .pipelines/e2e-gpu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: $(Date:yyyyMMdd)$(Rev:.r)
variables:
TAGS_TO_RUN: "gpu=true"
TAGS_TO_SKIP: "os=windows"
SKIP_E2E_TESTS: false
trigger:
branches:
include:
- main
pr:
branches:
include:
- official/*
- windows/*
- main
paths:
include:
- .pipelines/e2e.yaml
- .pipelines/templates/e2e-template.yaml
- .pipelines/scripts/e2e_run.sh
- e2e
- parts/linux
- parts/common/components.json
- pkg/agent
- go.mod
- go.sum
exclude:
- pkg/agent/datamodel/sig_config*.go # SIG config changes
- pkg/agent/datamodel/*.json # SIG version changes
- pkg/agent/testdata/AKSWindows* # Windows test data
- parts/common/components.json # centralized components management file
- staging/cse/windows/README
- /**/*.md
- e2e/scenario_win_test.go

jobs:
- template: ./templates/e2e-template.yaml
parameters:
name: Linux GPU Tests
IgnoreScenariosWithMissingVhd: false
2 changes: 1 addition & 1 deletion .pipelines/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: $(Date:yyyyMMdd)$(Rev:.r)
variables:
TAGS_TO_SKIP: "os=windows"
TAGS_TO_SKIP: "os=windows,gpu=true"
SKIP_E2E_TESTS: false
trigger:
branches:
Expand Down
25 changes: 23 additions & 2 deletions .pipelines/scripts/e2e_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,37 @@ if [ -n "${SIG_GALLERY_NAME}" ]; then
export GALLERY_NAME=$SIG_GALLERY_NAME
fi

az extension add --name bastion

# this software is used to take the output of "go test" and produce a junit report that we can upload to the pipeline
# and see fancy test results.
cd e2e
mkdir -p bin
GOBIN=`pwd`/bin/ go install gotest.tools/gotestsum@latest
architecture=$(uname -m)

case "$architecture" in
x86_64 | amd64) architecture="amd64" ;;
aarch64 | arm64) architecture="arm64" ;;
*)
echo "Unsupported architecture: $architecture"
exit 1
;;
esac

gotestsum_version="1.13.0"
gotestsum_archive="gotestsum_${gotestsum_version}_linux_${architecture}.tar.gz"
gotestsum_url="https://github.com/gotestyourself/gotestsum/releases/download/v${gotestsum_version}/${gotestsum_archive}"

temp_file="$(mktemp)"
curl -fsSL "$gotestsum_url" -o "$temp_file"
tar -xzf "$temp_file" -C bin
chmod +x bin/gotestsum
rm -f "$temp_file"

# gotestsum configure to only show logs for failed tests, json file for detailed logs
# Run the tests! Yey!
test_exit_code=0
./bin/gotestsum --format testdox --junitfile "${BUILD_SRC_DIR}/e2e/report.xml" --jsonfile "${BUILD_SRC_DIR}/e2e/test-log.json" -- -parallel 100 -timeout 90m || test_exit_code=$?
./bin/gotestsum --format testdox --junitfile "${BUILD_SRC_DIR}/e2e/report.xml" --jsonfile "${BUILD_SRC_DIR}/e2e/test-log.json" -- -parallel 150 -timeout 90m || test_exit_code=$?

# Upload test results as Azure DevOps artifacts
echo "##vso[artifact.upload containerfolder=test-results;artifactname=e2e-test-log]${BUILD_SRC_DIR}/e2e/test-log.json"
Expand Down
2 changes: 2 additions & 0 deletions .pipelines/templates/e2e-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
displayName: Run AgentBaker E2E
env:
E2E_SUBSCRIPTION_ID: $(E2E_SUBSCRIPTION_ID)
SYS_SSH_PUBLIC_KEY: $(SYS_SSH_PUBLIC_KEY)
SYS_SSH_PRIVATE_KEY_B64: $(SYS_SSH_PRIVATE_KEY_B64)
BUILD_SRC_DIR: $(System.DefaultWorkingDirectory)
DefaultWorkingDirectory: $(Build.SourcesDirectory)
VHD_BUILD_ID: $(VHD_BUILD_ID)
Expand Down
16 changes: 11 additions & 5 deletions aks-node-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,21 @@ Clients need to provide CSE and Custom Data. [nodeconfigutils](pkg/nodeconfiguti
```mermaid
sequenceDiagram
participant Client as Client
participant ARM as Azure Resource Manager (ARM)
participant VM as Virtual Machine (VM)
participant AgentBaker as Versioned AgentBaker Services<br/>(Deprecated)
participant ARM as Azure Resource Manager<br/>(ARM)
participant VM as Virtual Machine<br/>(VM)

Client->>ARM: Request to create VM<br/>with CustomData & CSE
Client -x AgentBaker: ~~Request artifacts for<br/> node provisioning~~ (deprecated)
note over Client, AgentBaker: Scriptless no longer needs the 26+ absvc pods.<br/> Instead it uses one AgentBaker service that keeps<br/> providing the latest SIG images list (not shown).

AgentBaker-->>Client: ~~Provide "CSE command<br/> & provisioning scripts"~~ (deprecated)

Client->>ARM: Request to create VM<br/>with CustomData & CSE<br/>(using AgentBaker artifacts)
ARM->>VM: Deploy config.json<br/>(CustomData)
note over VM: cloud-init handles<br/>config.json deployment

note over VM: cloud-init completes processing
note over VM: Start aks-node-controller.service (systemd service)<br/> after cloud-init
note over VM: Start aks-node-controller.service (systemd service)<br/>after cloud-init
VM->>VM: Run aks-node-controller<br/>(Go binary) in provision mode<br/>using config.json

ARM->>VM: Initiate aks-node-controller (Go binary)<br/>in provision-wait mode via CSE
Expand All @@ -126,7 +132,7 @@ sequenceDiagram
VM->>VM: Check /opt/azure/containers/provision.complete
end

VM->>Client: Return CSE status with<br/>/var/log/azure/aks/provision.json content
VM-->>Client: Return CSE status with<br/>/var/log/azure/aks/provision.json content
```

Key components:
Expand Down
4 changes: 2 additions & 2 deletions aks-node-controller/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ type ProvisionStatusFiles struct {
}

func (a *App) Run(ctx context.Context, args []string) int {
slog.Info("aks-node-controller started")
slog.Info("aks-node-controller started", "args", args)
err := a.run(ctx, args)
exitCode := errToExitCode(err)
if exitCode == 0 {
slog.Info("aks-node-controller finished successfully")
slog.Info("aks-node-controller finished successfully.")
} else {
slog.Error("aks-node-controller failed", "error", err)
}
Expand Down
4 changes: 2 additions & 2 deletions aks-node-controller/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/agentbaker/aks-node-controller

go 1.23.7
go 1.24.0

require (
github.com/Azure/agentbaker v0.20240503.0
Expand Down Expand Up @@ -28,7 +28,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/vincent-petithory/dataurl v1.0.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/sys v0.39.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
12 changes: 6 additions & 6 deletions aks-node-controller/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ github.com/vincent-petithory/dataurl v1.0.0 h1:cXw+kPto8NLuJtlMsI152irrVw9fRDX8A
github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9CvnvxyvZy6I1MrG/U=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
golang.org/x/net v0.48.0 h1:zyQRTTrjc33Lhh0fBgT/H3oZq9WuvRR5gPC70xpDiQU=
golang.org/x/net v0.48.0/go.mod h1:+ndRgGjkh8FGtu1w1FGbEC31if4VrNVMuKTgcAAnQRY=
golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk=
golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
Loading
Loading