2022-11-01 07:23:01 -04:00
|
|
|
name: k-bench
|
|
|
|
description: "Run K-Bench"
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
cloudProvider:
|
|
|
|
description: "Which cloud provider to use."
|
|
|
|
required: true
|
|
|
|
kubeconfig:
|
|
|
|
description: "The kubeconfig of the cluster to test."
|
|
|
|
required: true
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
2022-10-22 10:07:54 -04:00
|
|
|
|
2022-11-01 07:23:01 -04:00
|
|
|
steps:
|
2022-11-01 07:24:29 -04:00
|
|
|
- name: Setup python
|
2022-11-02 06:00:40 -04:00
|
|
|
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # tag=v4.3.0
|
2022-11-01 07:24:29 -04:00
|
|
|
with:
|
|
|
|
python-version: "3.10"
|
2022-10-27 10:57:54 -04:00
|
|
|
|
2022-11-01 07:24:29 -04:00
|
|
|
- name: Install evaluation dependencies
|
|
|
|
shell: bash
|
2022-11-08 10:13:10 -05:00
|
|
|
run: pip install -r .github/actions/e2e_kbench/evaluate/requirements.txt
|
2022-11-01 07:24:29 -04:00
|
|
|
|
2022-11-01 07:23:01 -04:00
|
|
|
- name: Checkout patched K-Bench
|
|
|
|
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
repository: "edgelesssys/k-bench"
|
2022-10-27 10:57:54 -04:00
|
|
|
ref: "feat/constellation"
|
2022-11-01 07:23:01 -04:00
|
|
|
path: k-bench
|
|
|
|
|
|
|
|
- name: Install patched K-Bench
|
|
|
|
working-directory: "k-bench"
|
|
|
|
run: ./install.sh
|
|
|
|
shell: bash
|
|
|
|
|
2022-10-27 10:57:54 -04:00
|
|
|
- name: Install Constellation CSI drivers and create storage class
|
|
|
|
uses: ./.github/actions/install_csi_drivers
|
|
|
|
with:
|
|
|
|
kubeconfig: ${{ inputs.kubeconfig }}
|
|
|
|
cloudProvider: ${{ inputs.cloudProvider }}
|
2022-11-01 07:23:01 -04:00
|
|
|
|
|
|
|
- name: Run K-Bench
|
|
|
|
shell: bash
|
|
|
|
working-directory: k-bench
|
|
|
|
run: |
|
|
|
|
mkdir -p ./out
|
|
|
|
kubectl create namespace kbench-pod-namespace --dry-run=client -o yaml | kubectl apply -f -
|
2022-11-08 10:13:10 -05:00
|
|
|
kubectl apply -f ../.github/actions/e2e_kbench/encrypted_storage.yml
|
2022-11-01 07:23:01 -04:00
|
|
|
./run.sh -r "kbench-constellation-${{ inputs.cloudProvider }}" -t "default" -o "./out/"
|
|
|
|
kubectl delete namespace kbench-pod-namespace --wait=true || true
|
|
|
|
kubectl create namespace kbench-pod-namespace --dry-run=client -o yaml | kubectl apply -f -
|
2022-11-08 10:13:10 -05:00
|
|
|
kubectl apply -f ../.github/actions/e2e_kbench/encrypted_storage.yml
|
2022-11-01 07:23:01 -04:00
|
|
|
./run.sh -r "kbench-constellation-${{ inputs.cloudProvider }}" -t "dp_fio" -o "./out/"
|
|
|
|
kubectl delete namespace kbench-pod-namespace --wait=true || true
|
|
|
|
kubectl create namespace kbench-pod-namespace --dry-run=client -o yaml | kubectl apply -f -
|
2022-11-08 10:13:10 -05:00
|
|
|
kubectl apply -f ../.github/actions/e2e_kbench/encrypted_storage.yml
|
2022-11-01 07:23:01 -04:00
|
|
|
./run.sh -r "kbench-constellation-${{ inputs.cloudProvider }}" -t "dp_network_internode" -o "./out/"
|
|
|
|
kubectl delete namespace kbench-pod-namespace --wait=true || true
|
|
|
|
kubectl create namespace kbench-pod-namespace --dry-run=client -o yaml | kubectl apply -f -
|
2022-11-08 10:13:10 -05:00
|
|
|
kubectl apply -f ../.github/actions/e2e_kbench/encrypted_storage.yml
|
2022-11-01 07:23:01 -04:00
|
|
|
./run.sh -r "kbench-constellation-${{ inputs.cloudProvider }}" -t "dp_network_intranode" -o "./out/"
|
|
|
|
env:
|
|
|
|
KUBECONFIG: ${{ inputs.kubeconfig }}
|
|
|
|
|
|
|
|
- name: Merge K-Bench results
|
|
|
|
working-directory: k-bench
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir -p "./out/kbench-constellation-${{ inputs.cloudProvider }}"
|
|
|
|
mv ./out/results_kbench-constellation-${{ inputs.cloudProvider }}_*m/* "./out/kbench-constellation-${{ inputs.cloudProvider }}/"
|
|
|
|
ls -l "./out/kbench-constellation-${{ inputs.cloudProvider }}"
|
|
|
|
cat ./out/kbench-constellation-${{ inputs.cloudProvider }}/*/kbench.log
|
|
|
|
|
|
|
|
- name: Upload original benchmark results
|
2022-11-02 06:00:40 -04:00
|
|
|
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3.1.1
|
2022-11-01 07:23:01 -04:00
|
|
|
if: ${{ !env.ACT }}
|
|
|
|
with:
|
|
|
|
path: "k-bench/out/kbench-constellation-${{ inputs.cloudProvider }}"
|
|
|
|
name: "k-bench-constellation-${{ inputs.cloudProvider }}"
|
2022-11-01 07:24:29 -04:00
|
|
|
|
2022-10-22 10:07:54 -04:00
|
|
|
- name: Assume AWS role to retrieve and update benchmarks in S3
|
|
|
|
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # tag=v1.7.0
|
|
|
|
with:
|
|
|
|
role-to-assume: arn:aws:iam::795746500882:role/GithubActionUpdateBenchmarks
|
|
|
|
aws-region: us-east-2
|
|
|
|
|
|
|
|
- name: Set S3 artifact store
|
2022-11-01 07:24:29 -04:00
|
|
|
shell: bash
|
2022-10-22 10:07:54 -04:00
|
|
|
run: echo S3_PATH=s3://${ARTIFACT_BUCKET_CONSTELLATION}/benchmarks >> $GITHUB_ENV
|
|
|
|
env:
|
|
|
|
ARTIFACT_BUCKET_CONSTELLATION: "edgeless-artifact-store/constellation"
|
|
|
|
|
|
|
|
- name: Get previous benchmark records from S3
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
mkdir -p benchmarks
|
|
|
|
aws s3 cp --recursive ${S3_PATH} benchmarks --no-progress
|
|
|
|
mv benchmarks/constellation-${CSP}.json benchmarks/constellation-${CSP}-previous.json
|
2022-11-01 07:24:29 -04:00
|
|
|
env:
|
|
|
|
KBENCH_RESULTS: ${{ github.workspace }}/k-bench/out/
|
|
|
|
CSP: ${{ inputs.cloudProvider }}
|
|
|
|
|
2022-10-22 10:07:54 -04:00
|
|
|
- name: Parse K-Bench results, create diagrams and post the progression summary
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
python .github/actions/e2e_kbench/evaluate/parse.py
|
|
|
|
python .github/actions/e2e_kbench/evaluate/graph.py
|
|
|
|
python .github/actions/e2e_kbench/evaluate/compare.py >> $GITHUB_STEP_SUMMARY
|
|
|
|
env:
|
|
|
|
# Original K-Bench result directory
|
|
|
|
KBENCH_RESULTS: k-bench/out/
|
|
|
|
# Working directory containing the previous results as JSON and to contain the graphs
|
|
|
|
BDIR: benchmarks
|
|
|
|
# Paths to benchmark results as JSON of the previous run and the current run
|
|
|
|
PREV_BENCH: benchmarks/constellation-${{ inputs.cloudProvider }}-previous.json
|
|
|
|
CURR_BENCH: benchmarks/constellation-${{ inputs.cloudProvider }}.json
|
|
|
|
CSP: ${{ inputs.cloudProvider }}
|
|
|
|
|
|
|
|
- name: Upload benchmark results and graphs to action run
|
2022-11-02 06:00:40 -04:00
|
|
|
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3.1.1
|
2022-11-01 07:24:29 -04:00
|
|
|
if: ${{ !env.ACT }}
|
|
|
|
with:
|
|
|
|
path: |
|
2022-10-22 10:07:54 -04:00
|
|
|
benchmarks/*_perf.png
|
|
|
|
benchmarks/constellation-${{ inputs.cloudProvider }}.json
|
|
|
|
name: "benchmarks"
|
|
|
|
|
|
|
|
- name: Update benchmark records in S3
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
aws s3 cp benchmarks/constellation-${CSP}.json ${S3_PATH}/constellation-${CSP}.json
|
|
|
|
env:
|
|
|
|
CSP: ${{ inputs.cloudProvider }}
|
|
|
|
if: github.ref == 'refs/heads/main'
|