-
Notifications
You must be signed in to change notification settings - Fork 128
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
Helm charts #3841
Merged
Merged
Helm charts #3841
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
581d702
helm chart
gearama 97a5c14
first pipe setup
gearama 8e63b06
poi
gearama 383b5f4
magiks
gearama 63fdcfc
ewewe
gearama cbe4c7b
stress
gearama c9668b8
cleanup
gearama 7664f59
pr
gearama 93219db
merge main
gearama 3c490de
QFE and readme
gearama 179e34c
clang
gearama a4449f7
stupid clang , waste of time
gearama fa01ff9
ewqwewewrqrewewrqewrqwrqr
gearama f2a2a74
stupid clang
gearama 6dfedb9
cspell
gearama 237034a
PR
gearama c922b91
try try again
gearama d9000ce
clang again
gearama 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 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 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 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,16 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# SPDX-License-Identifier: MIT | ||
gearama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
apiVersion: v2 | ||
name: libcurl-stress-test | ||
description: An example of c++ stress test | ||
version: 0.0.1 | ||
appVersion: v0.1 | ||
annotations: | ||
stressTest: 'true' # enable auto-discovery of this test via `find-all-stress-packages.ps1` | ||
namespace: 'azuresdkforcpp' | ||
|
||
dependencies: | ||
- name: stress-test-addons | ||
version: 0.1.19 | ||
repository: https://stresstestcharts.blob.core.windows.net/helm/ |
This file contains 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 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,29 @@ | ||
# Stress test prototype | ||
gearama marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This is work in progress. It's a prototype of how a stress test would look. This PR is to park the work in progress while being dealing with higher priority issues. | ||
## Components | ||
### Code (https://en.wikipedia.org/wiki/C%2B%2B) | ||
The cpp file represents the code for the test, it will generate a number of invalid URLs and then issue CURL send commands. The requests are expected to fail. The point was that it exposes memory leaks in handling the error cases, which we fixed since. | ||
|
||
### Dockerfile (https://www.docker.com/) | ||
Represents the build file for the container in which the test runs, it is based on ubuntu 22.04 , from mcr. | ||
The main change from default ubuntu is making sure we have the valgrind tool installed. Valgrind is a heap monitoring tool that helps identify potential stack traces that might leak memory. While not 100% effective is is great at reducing the surface are for investigations. | ||
|
||
### Helm chart (https://helm.sh/) | ||
Chart.yaml together with the bicep file(https://docs.microsoft.com/azure/azure-resource-manager/bicep/overview?tabs=bicep) and the deploy job file , represent the helm chart needed to deploy to the docker image built from the dockerfile to the stress cluster and execute the stress test. | ||
|
||
The helm chart creates a pod with a container based on the docker image, and executes the test under valgrind. | ||
|
||
To deploy the chart you will need to run "azure-sdk-for-cpp\eng\common\scripts\stress-testing> .\deploy-stress-tests.ps1 -Namespace azuresdkforcpp -SearchDirectory E:\src\azure-sdk-for-cpp\sdk\core\azure-core\test -PushImage" | ||
|
||
Where namaspace will be created if missing , search directory can be any folder where it will search for charts in it and all it's sub dirs, push image will call it to build the docker image. | ||
|
||
ATM the docker image is build by hand and harcoded in the chart to simplify matters. | ||
|
||
To build the image run "docker build -t stresstesttbiruti6oi24k.acr.io/azuresdkforcpp/curlstress:v8 --build-arg targetTest=azure-core-libcurl-stress-test --build-arg build=on ." | ||
|
||
To push to mcr : "docker push stresstesttbiruti6oi24k.acr.io/azuresdkforcpp/curlstress:v8" | ||
Obviously after logging in to the acr "az acr login -n stresspgs7b6dif73rup6.azurecr.io" | ||
|
||
To use another image you will need to go to line 12 in deploy job and update with your new file. | ||
|
||
Once the deploy succeeds run " kubectl logs -n azuresdkforcpp -f libcurl-stress-test" to grab the logs in real time . |
This file contains 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
16 changes: 16 additions & 0 deletions
16
sdk/core/azure-core/test/libcurl-stress-test/stress-test-resources.bicep
This file contains 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,16 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
// | ||
// Dummy parameter to handle defaults the script passes in | ||
param testApplicationOid string = '' | ||
|
||
resource config 'Microsoft.AppConfiguration/configurationStores@2020-07-01-preview' = { | ||
name: 'config-${resourceGroup().name}' | ||
location: resourceGroup().location | ||
sku: { | ||
name: 'Standard' | ||
} | ||
} | ||
|
||
output RESOURCE_GROUP string = resourceGroup().name | ||
output AZURE_CLIENT_OID string = testApplicationOid |
22 changes: 22 additions & 0 deletions
22
sdk/core/azure-core/test/libcurl-stress-test/templates/deploy-job.yaml
This file contains 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,22 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# SPDX-License-Identifier: MIT | ||
{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.deploy-example") -}} | ||
{{- define "stress.deploy-example" -}} | ||
metadata: | ||
labels: | ||
testName: "libcurl-stress-test" | ||
name: "libcurl-stress-test" | ||
spec: | ||
containers: | ||
- name: libcurl-stress-test | ||
image: stresspgs7b6dif73rup6.azurecr.io/azuresdkforcpp/curlstress:latest | ||
imagePullPolicy: Always | ||
command: | ||
[ | ||
"valgrind", | ||
"--tool=memcheck", | ||
"-s", | ||
"./azure-core-libcurl-stress-test", | ||
] | ||
{{- include "stress-test-addons.container-env" . | nindent 6 }} | ||
{{- end -}} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should try not be disable cspell on markdown text files, like this. Either we fix the spelling errors, or if there are false positives, please add them to the dictionary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC there may be a way to add cspell words to markdown files, which allows you to add them to a local dictionary instead of modifying the master dictionary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, there is! :)
You can add them as a comment on the top, as metadata (which isn't visible), like so:
https://raw.githubusercontent.com/Azure/azure-sdk-for-cpp/86aa9b4b0cfdef2af103ed2330064079ada68773/doc/DistributedTracing.md