-
Notifications
You must be signed in to change notification settings - Fork 18
trident-acl-agent: add storm trident-acl-agent E2E test harness, test images, and pipeline #731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bfjelds (bfjelds)
wants to merge
11
commits into
main
from
user/bfjelds/acl-agent-rollback-grpc-storm
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
704cf75
storm/aclagent: add trident-acl-agent E2E test harness, test images, …
bfjelds 4a5b130
storm/aclagent: pin annotation prefix and version key via systemd dro…
bfjelds 614c964
storm/aclagent: bake annotation-prefix/version-key drop-in into both …
bfjelds 41dbee4
storm/aclagent: use UUID-format operation IDs in test scenarios
bfjelds 5c2a065
storm/aclagent: fix Copilot review findings (PR 731)
bfjelds 5f6b515
storm/aclagent: fix latest Copilot review findings (PR 731)
bfjelds 0dbe5a8
storm/aclagent: fix misattributed doc comment for sha384File
bfjelds 8a18732
test: add explicit mode/version-path/fallback env vars to acl-agent d…
bfjelds 15a2c56
storm/aclagent: fix 2 open Copilot review comments
bfjelds 548e0f3
docs: fix broken anchor link in Trident-ACL-Agent.md
bfjelds f74d19d
storm/aclagent: install trident-acl RPM instead of trident-acl-agent
bfjelds File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
.pipelines/templates/stages/testing_acl_agent/trident-acl-agent-test.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,137 @@ | ||
| parameters: | ||
| - name: dependsOnStage | ||
| type: string | ||
| default: "" | ||
|
|
||
| - name: micBuildType | ||
| displayName: MIC Build Type | ||
| type: string | ||
| values: | ||
| - dev | ||
| - preview | ||
| - release | ||
| default: release | ||
|
|
||
| - name: micVersion | ||
| displayName: MIC Version | ||
| type: string | ||
| default: "*.*.*" | ||
|
|
||
| - name: baseimgAzlVersion | ||
| displayName: Base Image AZL version | ||
| type: string | ||
| default: "3.0" | ||
|
|
||
| - name: verboseLogging | ||
| displayName: "Enable verbose logging" | ||
| type: boolean | ||
| default: false | ||
|
|
||
| stages: | ||
| - stage: BuildImagesAclAgent | ||
| displayName: Build Base and Update Images for trident-acl-agent | ||
| dependsOn: | ||
| - PrepareSSHKeys | ||
| - GetTridentBinaries_rpms_amd64 | ||
| - ${{ if ne(parameters.dependsOnStage, '') }}: | ||
| - ${{ parameters.dependsOnStage }} | ||
|
|
||
| jobs: | ||
| - template: ../trident_images/build-image.yml | ||
| parameters: | ||
| label: "acl-agent-base" | ||
| makeTarget: "artifacts/trident-vm-acl-agent-testimage.qcow2" | ||
| baseimgType: qemu_guest | ||
| baseimgAzlVersion: ${{ parameters.baseimgAzlVersion }} | ||
| micBuildType: ${{ parameters.micBuildType }} | ||
| micVersion: ${{ parameters.micVersion }} | ||
| useStagedSshKeys: true | ||
|
|
||
| - template: ../trident_images/build-image.yml | ||
| parameters: | ||
| label: "acl-agent-update" | ||
| makeTarget: "artifacts/trident-vm-acl-agent-update-testimage.cosi" | ||
| baseimgType: qemu_guest | ||
| baseimgAzlVersion: ${{ parameters.baseimgAzlVersion }} | ||
| micBuildType: ${{ parameters.micBuildType }} | ||
| micVersion: ${{ parameters.micVersion }} | ||
| useStagedSshKeys: true | ||
|
|
||
| - stage: TridentAclAgentTest | ||
| displayName: Validate trident-acl-agent | ||
| dependsOn: | ||
| - BuildingTools | ||
| - BuildImagesAclAgent | ||
|
|
||
| jobs: | ||
| - job: AclAgentStormTest | ||
| displayName: Run storm aclagent scenario | ||
| timeoutInMinutes: 30 | ||
| pool: | ||
| type: linux | ||
| name: trident-ubuntu-1es-pool-eastus2 | ||
| hostArchitecture: amd64 | ||
|
|
||
| variables: | ||
| ob_outputDirectory: /tmp/output | ||
| ob_artifactBaseName: "aclagent-storm-test" | ||
|
|
||
| steps: | ||
| - template: ../common_tasks/checkout_trident.yml | ||
| - template: ../common_tasks/avoid-pypi-usage.yml | ||
|
|
||
| - task: DownloadPipelineArtifact@2 | ||
| inputs: | ||
| buildType: current | ||
| artifactName: image-acl-agent-base | ||
| targetPath: "$(Build.ArtifactStagingDirectory)" | ||
| displayName: Download Base Image (qcow2) | ||
|
|
||
| - task: DownloadPipelineArtifact@2 | ||
| inputs: | ||
| buildType: current | ||
| artifactName: image-acl-agent-update | ||
| targetPath: "$(Build.ArtifactStagingDirectory)" | ||
| displayName: Download Update Image (cosi) | ||
|
|
||
| - task: DownloadPipelineArtifact@2 | ||
| inputs: | ||
| buildType: current | ||
| artifactName: ssh-keys | ||
| targetPath: "$(Build.ArtifactStagingDirectory)/ssh" | ||
| displayName: Download SSH Keys | ||
|
|
||
| - task: DownloadPipelineArtifact@2 | ||
| displayName: "Download go-tools" | ||
| inputs: | ||
| buildType: current | ||
| artifactName: "go-tools" | ||
| patterns: | | ||
| storm-trident | ||
| targetPath: "$(TRIDENT_SOURCE_DIR)/bin" | ||
|
|
||
| - bash: | | ||
| set -eux | ||
| chmod +x $(TRIDENT_SOURCE_DIR)/bin/storm-trident | ||
| cp $(Build.ArtifactStagingDirectory)/ssh/id_rsa* ~/.ssh/ | ||
| chmod -R 700 ~/.ssh/ | ||
| mkdir -p $(ob_outputDirectory) | ||
| displayName: Set up SSH keys and output directory | ||
| workingDirectory: $(TRIDENT_SOURCE_DIR) | ||
|
|
||
| - bash: | | ||
| set -eux | ||
| ls -la $(Build.ArtifactStagingDirectory)/ | ||
| displayName: List downloaded image artifacts | ||
|
|
||
| - bash: | | ||
| set -eux | ||
|
|
||
| FLAGS="-a --verbose" | ||
|
|
||
| sudo ./bin/storm-trident run aclagent $FLAGS \ | ||
| --output-path $(ob_outputDirectory) \ | ||
| --artifacts-dir $(Build.ArtifactStagingDirectory) \ | ||
| --ssh-private-key-path ~/.ssh/id_rsa | ||
|
bfjelds marked this conversation as resolved.
|
||
| displayName: "🧪 Run trident-acl-agent A/B update + rollback scenario" | ||
| workingDirectory: $(TRIDENT_SOURCE_DIR) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.