Skip to content
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

lambda.md : Add the lambda flow section #319

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

santoshmahto7
Copy link
Contributor

No description provided.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 24, 2024
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 <RESULT_JSON> upload --upload-url <AWS lambda function 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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to confirm the URL first.

resctl-bench/doc/README.md Outdated Show resolved Hide resolved
@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
AWS lambda workflow
AWS Lambda Result Upload workflow

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
The Lambda function uses a GitHub app [iocost-issue-creater](https://github.com/apps/iocost-issue-creater) to file a GitGub issue, thus it's credentials information `App Id` and `Private Key` are stored in the AWS parameter store.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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.
- Then creates an issue in the [iocost-benchmarks](https://github.com/iocost-benchmark/iocost-benchmarks) project using [iocost-issue-creater](https://github.com/apps/iocost-issue-creater) GitHub app.

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Issue contain a link to benchmark result stored in s3 bucket.
- Issue contains a link to the benchmark result stored in an S3 bucket.


### 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
User uploads the benchmark result (following the above steps), the AWS Lambda function runs and saves the result into the S3 bucket, then the Lambda function creates a GitHub Issue with a link to the result stored in the S3 bucket.


### 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
The submitted result is further processed by the CI workflows running in the [iocost-benchmarks](https://github.com/iocost-benchmark/iocost-benchmarks/) repository, importing and merging the results with the existing database and finally generating the hwdb file.

Co-authored-by: Christopher Obbard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants