From 58877500cdfb680158e3e5ae3c1d8945b1763642 Mon Sep 17 00:00:00 2001 From: George Arama <50641385+gearama@users.noreply.github.com> Date: Tue, 24 Jan 2023 15:49:20 -0800 Subject: [PATCH] docs for stress perf (#4269) * docs for stress perf * dotnet contrib --- CONTRIBUTING.md | 4 ++++ doc/StressTest.md | 29 +++++++++++++++++++++++++++++ doc/TestProxy.md | 0 3 files changed, 33 insertions(+) create mode 100644 doc/StressTest.md create mode 100644 doc/TestProxy.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e35adf304..7d2a51a4a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,6 +65,10 @@ Codespaces is new technology that allows you to use a container as your developm CMake version 3.13 or higher is required to build these libraries. Download and install CMake from the project's [website](https://cmake.org/download/). +### Dotnet + +Required to get and execute test proxy(see /doc/TestProxy.md). [website](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet) + ### Third Party Dependencies Azure SDK uses Vcpkg manifest mode to declare the [list of required 3rd party dependencies](https://github.com/Azure/azure-sdk-for-cpp/blob/main/vcpkg.json) for building the SDK service libraries. It will also get and set up Vcpkg automatically. **You can move on to [Building the project](#building-the-project)** and skip the next part if you are not interested in learning about alternatives for setting up dependencies. diff --git a/doc/StressTest.md b/doc/StressTest.md new file mode 100644 index 000000000..2585c1e73 --- /dev/null +++ b/doc/StressTest.md @@ -0,0 +1,29 @@ +# Stress Test + +## Deps +Adding a stress test requires the following tools installed: +* Docker : https://www.docker.com/ +* Helm : https://helm.sh/ + + +Structure : + +A stress tests is composes of the following components : +* Source code : represents the test that is run, there are no prerequisites as to what the code does, the outputs of the tests can be at the cosole , as file share or Application Insights. +* DockerFile : represents the docker file that will build the continer image that will be executed by the stress automation, on the stress test clusters. +* Helm Chart : represents the deployment script for the docker image built by the Dockerfile. +* stress-test-resources.bicep/json ARM template for deploying azure resources required by the +tests +* scenarios-matrix.yaml : definition of tests and which are offered in one docker image. e.g. We can have multiple tests coexisting in a single docer image, the definition conmtains a list of test names and executables (with params) that will be executed in order to run those tests. + +To deploy a stress test to the playground (test) clusters, you will need to execute the following script : "eng/common/scripts/stress-testing/deploy-stress-tests.ps1 -Login -PushImages" in the folder of where the dockerfile exists. + +Example : \sdk\core\azure-core\test\libcurl-stress-test + +The deployment script will run the following steps : +* deploy the arm resources +* build the docker image +* read the scenarios and generate the final helm chart +* deploy the helm chart - caveat - make sure to have a .helmignore file present in which you exclude files that are not required for the deployment (e.g. test source code) . When initiating a deplyment helm zips the whole folder , in order to upload it the chart needs to be less than 1MB. Thus excluding any uneeded files is advisable. + +The Dockerfile is very flexible, it can be used to include the binaries for the tests or include the code and run the config/build of the tests as part of the build , or anything in between. The only requirement is that the command lines to run the test executables are specified in the scenarios.txt diff --git a/doc/TestProxy.md b/doc/TestProxy.md new file mode 100644 index 000000000..e69de29bb