-
Notifications
You must be signed in to change notification settings - Fork 17
140 lines (126 loc) · 5.5 KB
/
htcmock-localhost.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
name: "Bench ArmoniK on localhost"
on:
push:
branches:
- "main"
- "ts/generalize-bench-runs"
workflow_dispatch: # Possibility to run this workflow for debugging purposes
# inputs can be useful for tests in further developments
inputs:
htc-mock-ntasks:
description: "Number of tasks to be created for HTC Mock"
default: "100"
required: false
htc-mock-subtasks-levels:
description: "Levels of subtasking for HTC Mock"
default: "1"
required: false
htc-mock-polling-limit:
description: "Polling duration (in seconds) for HTC Mock session completion"
default: "180"
required: false
bench-ntasks:
description: "Number of tasks to be created for Bench "
default: "1000"
required: false
bench-polling-limit:
description: "Polling duration (in seconds) for Bench session completion"
default: "1200"
purge-data:
description: "Whether to purge session"
default: "false"
required: false
release:
types: [created, published]
jobs:
htc-mock:
name: Get HTC Mock throughput
runs-on: ubuntu-latest
outputs:
terraform-output: ${{ steps.deploy.outputs.terraform-output }}
armonik-endpoint: ${{ steps.get-armonik-endpoint.outputs.endpoint }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
terraform: true
k3s: true
docker: true
- name: Define runner env variables
run: |
echo "core-version=$(cat versions.tfvars.json | jq -r '.armonik_versions.core'" >> $GITHUB_ENV
echo "htcmock-ntasks=${{ inputs.htcmock-ntasks || null }}" >> $GITHUB_ENV
echo "htcmock-subtasks-levels=${{ inputs.htcmock-subtasks-levels || null }}" >> $GITHUB_ENV
echo "htcmock-polling-limit=${{ inputs.htcmock-polling-limit || null }}" >> $GITHUB_ENV"
echo "bench-ntasks=${{ inputs.bench-ntasks || null }}" >> $GITHUB_ENV
echo "bench-polling-limit=${{ inputs.bench-polling-limit || null }}" >> $GITHUB_ENV"
echo "purge-data=${{ inputs.purge-data || false }}" >> $GITHUB_ENV
- id: deploy
name: "Deploy ArmoniK"
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
type: localhost
- id: get-armonik-endpoint
name: "Get ArmoniK's control plane endpoint"
run: |
grpc-endpoint=$(cat infrastructure/quick-deploy/localhost/generated/armonik-output.json | jq -r '.armonik.control_plane_url' | sed -r 's/(http:\/\/)([^:]*)(:.*)/\2/')
echo "grpc-endpoint=$grpc-endpoint" >> "$GITHUB_OUTPUT"
- id: htcmock
name: Run HTC Mock
uses: aneoconsulting/ArmoniK.Action.Deploy/htcmock@main
with:
armonik-core-version: ${{ env.core-version }}
ntasks: ${{ env.htcmock-ntasks || null}}
subtasks-levels: ${{ env.htcmock-subtasks-levels || null}}
session-name: htcmock
grpc-client-endpoint: ${{ steps.get-armonik-endpoint.outputs.grpc-endpoint }}
purge-data: ${{ env.purge-data }}
- id: get-htcmock-stats
name: Get HTC Mock Stats
uses: aneoconsulting/ArmoniK.Action.Deploy/get-throughput@main
with:
grpc-client-endpoint: ${{ steps.get-armonik-endpoint.outputs.endpoint }}
session-name: ${{ steps.htcmock.outputs.session-name }}
- name: Upload HTC Mock results to artifact registry
uses: actions/upload-artifact@v4
with:
name: main_benchmark_htcmock_${{ github.run_id }}
path: ${{ steps.get-htcmock-stats.outputs.bench-file-path }}
- id: bench
name: Run Bench
uses: aneoconsulting/ArmoniK.Action.Deploy/htcmock@ts/add-bench-action
with:
armonik-core-version: ${{ env.core-version }}
ntasks: ${{ env.bench-ntasks }}
session-name: bench
grpc-client-endpoint: ${{ steps.get-armonik-endpoint.outputs.grpc-endpoint }}
purge-data: ${{ env.purge-data }}
- id: get-bench-stats
name: Get Bench Stats
uses: aneoconsulting/ArmoniK.Action.Deploy/get-throughput@main
with:
grpc-client-endpoint: ${{ steps.get-armonik-endpoint.outputs.endpoint }}
session-name: ${{ steps.bench.outputs.session-name }}
- name: Upload Bench results to artifact registry
uses: actions/upload-artifact@v4
with:
name: main_benchmark_bench_${{ github.run_id }}
path: ${{ steps.get-bench-stats.outputs.bench-file-path }}
- name: Upload benchmarks results to s3
env:
HTCMOCK_RESULTS_PATH: ${{ steps.get-htcmock-stats.outputs.bench-file-path }}
BENCH_RESULTS_PATH: ${{ steps.get-bench-stats.outputs.bench-file-path }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
run: |
aws s3 cp "$HTCMOCK_RESULTS_PATH" "s3://test-armonik-bench-storage/main_benchmark_htcmock_$GITHUB_RUN_ID.json"
aws s3 cp "$BENCH_RESULTS_PATH" "s3://test-armonik-bench-storage/main_benchmark_bench_$GITHUB_RUN_ID.json"
- if: "always()"
id: destroy
name: Destroy deployment
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main
with:
type: localhost