From 174e371f22597f444a9fa414cc812f1ba3736533 Mon Sep 17 00:00:00 2001 From: Santosh Mahto Date: Wed, 24 Jul 2024 23:18:00 +0530 Subject: [PATCH 1/2] lambda.md : Add the lambda flow section for clarity. Signed-off-by: Santosh Mahto --- resctl-bench/doc/README.md | 4 ++++ resctl-bench/doc/lambda.md | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/resctl-bench/doc/README.md b/resctl-bench/doc/README.md index 6ab115b2..ad3efd32 100644 --- a/resctl-bench/doc/README.md +++ b/resctl-bench/doc/README.md @@ -20,6 +20,10 @@ The benchmarks * [iocost-qos](iocost-qos.md): Benchmark IO isolation with different io.cost QoS configurations * [iocost-tune](iocost-tune.md): Benchmark storage device to determine io.cost QoS solutions +AWS lambda workflow +=================== + +* [lambda](lambda.md) : Lambda overview, configurations and setups Other Notes =========== diff --git a/resctl-bench/doc/lambda.md b/resctl-bench/doc/lambda.md index 411099bc..d82d318e 100644 --- a/resctl-bench/doc/lambda.md +++ b/resctl-bench/doc/lambda.md @@ -87,10 +87,8 @@ We still need to configure our S3 bucket to allow public read only access, so th } ``` - We also store the credential parameters required to file a github issue in AWS Systems Manager -> parameter store. -We use github app `iocost-issue-creater` to file a github issue, thus it's credentials information `App Id` and -`Private Key` are stored in parameter store. +Lambda uses github app [iocost-issue-creater](https://github.com/apps/iocost-issue-creater) to file a github issue, thus it's credentials information `App Id` and `Private Key` are stored in AWS parameter store. ``` { /iocost-bot/appid : "xxxx" @@ -100,18 +98,22 @@ We use github app `iocost-issue-creater` to file a github issue, thus it's crede AWS lambda flow =============== -1. User generates the benchmark result on their device. -`$ resctl-bench -r "$RESULT_JSON" --logfile=$LOG_FILE run iocost-tun` -2. User uploads the result to aws lambda function url as: -`resctl-bench -r upload --upload-url ` +1. User generates the benchmark result on their device. +`$ resctl-bench -r "$RESULT_JSON" --logfile=$LOG_FILE run iocost-tune` +2. User uploads the result to aws lambda function url as: +`resctl-bench -r upload --upload-url ` e.g `$resctl-bench --result resctl-bench-result_2022_07_01-00_26_40.json.gz upload --upload-url https://ygvr6jnjckwamfao5xztg6idiu0ukjeb.lambda-url.eu-west-1.on.aws` 3. Lamda is tiggered automatically in AWS. - It saves the benchmark result to S3 bucket. - - Then create a issue in iocost-benchmark/iocost-benchmarks project using `iocost-issue-creater` github app. + - Then creates an issue in [iocost-benchmarks](https://github.com/iocost-benchmark/iocost-benchmarks) project using [iocost-issue-creater](https://github.com/apps/iocost-issue-creater) github app. - Issue contain a link to benchmark result stored in s3 bucket. + e.g https://github.com/iocost-benchmark/iocost-benchmarks/issues/88 +### Lambda workflow: +Client uploads the benchmark result (above steps) -> AWS Lambda runs -> save result to s3 bucket -> Create github Issue with link of result stored in s3. +Thereafter it's job of [iocost-benchmarks project](https://github.com/iocost-benchmark/iocost-benchmarks) to import and merge the results with existing database and generate final hwdb file. Deploying ========= From cfdcd3457ed7edf33474b2c4780f3a08d4e644fc Mon Sep 17 00:00:00 2001 From: Santosh Mahto Date: Sun, 4 Aug 2024 20:17:51 +0530 Subject: [PATCH 2/2] Update resctl-bench/doc/README.md Co-authored-by: Christopher Obbard --- resctl-bench/doc/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resctl-bench/doc/README.md b/resctl-bench/doc/README.md index ad3efd32..71b6ad3b 100644 --- a/resctl-bench/doc/README.md +++ b/resctl-bench/doc/README.md @@ -23,7 +23,7 @@ The benchmarks AWS lambda workflow =================== -* [lambda](lambda.md) : Lambda overview, configurations and setups +* [lambda](lambda.md): Lambda Result Upload overview, configuration and setup Other Notes ===========