-
Notifications
You must be signed in to change notification settings - Fork 16
389 lines (378 loc) · 16.3 KB
/
deploy.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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
name: Deploy_localhost_AllInOne
on:
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
jobs:
versioning:
name: "Versioning"
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
outputs:
version: ${{ steps.genver.outputs.version }}
steps:
- name: Get type of VM
run: |
lscpu
uname -a
grep MemTotal /proc/meminfo
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Generate Version
id: genver
run: |
VERSION=$(docker run --rm -v $(pwd):/repo codacy/git-version /bin/git-version --folder=/repo --release-branch=release --dev-branch=main)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo $VERSION
echo "Version :" >> $GITHUB_STEP_SUMMARY
echo "$VERSION" >> $GITHUB_STEP_SUMMARY
AdminGUI:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Get type of VM
run: |
lscpu
uname -a
grep MemTotal /proc/meminfo
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
docker: true
terraform: true
k3s: true
aws: true
- name: Deploy
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
type: localhost
log-suffix: admin-gui
- name: Test ping AdminGUI
shell: bash
run: |
set -ex
export ADMIN_API_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.admin_api_url')
export ADMIN_APP_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.admin_app_url')
: "Add -f again when a success endpoint has been implemented"
curl -sSL "${ADMIN_API_URL}" -o /dev/null || true "in v2.7.2, there is no api endpoint"
curl -fsSL "${ADMIN_APP_URL}" -o /dev/null || true "in v2.7.2, there is no app endpoint"
- name: Show logs
if: always()
run: |
set -e
mkdir -p logs/infra/generated \
logs/infra/tfstates \
logs/app
if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then
cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json logs/infra/generated
fi
make -C infrastructure/quick-deploy/localhost/all-in-one/ state-pull > logs/infra/tfstates/armonik-terraform.tfstate
sudo find /var/log/pods/ -maxdepth 1 -iname 'armonik_*' -exec cp -rL '{}' logs/app/ ';'
sudo chown $USER -R logs
tar -czf admin-gui.tar.gz logs
aws s3 cp admin-gui.tar.gz s3://${{ secrets.AWS_LOG_BUCKET_NAME }}/armonik-pipeline/${{ github.run_number }}/${{ github.run_attempt }}/admin-gui.tar.gz
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
- name: Destroy deployment
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main
with:
type: localhost
coreStream:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Get type of VM
run: |
lscpu
uname -a
grep MemTotal /proc/meminfo
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Get Core Tag
id: core
run: |
TAG=$(cat versions.tfvars.json | jq -r '.armonik_versions.core')
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
docker: true
terraform: true
k3s: true
aws: true
- name: Deploy
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
type: localhost
log-suffix: core-stream
- name: Test Core Stream
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e Partition="stream" \
dockerhubaneo/armonik_core_stream_test_client:${{ steps.core.outputs.tag }}
- name: Show logs
if: always()
run: |
set -e
mkdir -p core-stream/infra/generated \
core-stream/infra/tfstates \
core-stream/app
if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then
cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json core-stream/infra/generated
fi
make -C infrastructure/quick-deploy/localhost/all-in-one/ state-pull > core-stream/infra/tfstates/armonik-terraform.tfstate
sudo find /var/log/pods/ -maxdepth 1 -iname 'armonik_*' -exec cp -rL '{}' core-stream/app/ ';'
sudo chown $USER -R core-stream
tar -czf core-stream.tar.gz core-stream
aws s3 cp core-stream.tar.gz s3://${{ secrets.AWS_LOG_BUCKET_NAME }}/armonik-pipeline/${{ github.run_number }}/${{ github.run_attempt }}/core-stream.tar.gz
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
- name: Destroy deployment
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main
with:
type: localhost
htcMock:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Get type of VM
run: |
lscpu
uname -a
grep MemTotal /proc/meminfo
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Get Core Tag
id: core
run: |
TAG=$(cat versions.tfvars.json | jq -r '.armonik_versions.core')
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
docker: true
terraform: true
k3s: true
aws: true
- name: Deploy
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
type: localhost
log-suffix: htc-mock
- name: Test HTC Mock
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e HtcMock__NTasks=2000 \
-e HtcMock__TotalCalculationTime=00:00:50.0 \
-e HtcMock__DataSize=50 \
-e HtcMock__MemorySize=50 \
-e HtcMock__SubTasksLevels=5 \
-e HtcMock__EnableUseLowMem=false \
-e HtcMock__EnableSmallOutput=false \
-e HtcMock__EnableFastCompute=false \
-e HtcMock__Partition="htcmock" \
dockerhubaneo/armonik_core_htcmock_test_client:${{ steps.core.outputs.tag }}
- name: Test HTC Mock - 1 level
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e HtcMock__NTasks=1000 \
-e HtcMock__TotalCalculationTime=00:00:00.100 \
-e HtcMock__DataSize=1 \
-e HtcMock__MemorySize=1 \
-e HtcMock__SubTasksLevels=1 \
-e HtcMock__EnableUseLowMem=true \
-e HtcMock__EnableSmallOutput=true \
-e HtcMock__EnableFastCompute=true \
-e HtcMock__Partition="htcmock" \
dockerhubaneo/armonik_core_htcmock_test_client:${{ steps.core.outputs.tag }}
- name: Test HTC Mock - 5 levels
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e HtcMock__NTasks=1000 \
-e HtcMock__TotalCalculationTime=00:00:00.100 \
-e HtcMock__DataSize=1 \
-e HtcMock__MemorySize=1 \
-e HtcMock__SubTasksLevels=5 \
-e HtcMock__EnableUseLowMem=true \
-e HtcMock__EnableSmallOutput=true \
-e HtcMock__EnableFastCompute=true \
-e HtcMock__Partition="htcmock" \
dockerhubaneo/armonik_core_htcmock_test_client:${{ steps.core.outputs.tag }}
- name: Test HTC Mock - 10 levels
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e HtcMock__NTasks=1000 \
-e HtcMock__TotalCalculationTime=00:00:00.100 \
-e HtcMock__DataSize=1 \
-e HtcMock__MemorySize=1 \
-e HtcMock__SubTasksLevels=10 \
-e HtcMock__EnableUseLowMem=true \
-e HtcMock__EnableSmallOutput=true \
-e HtcMock__EnableFastCompute=true \
-e HtcMock__Partition="htcmock" \
dockerhubaneo/armonik_core_htcmock_test_client:${{ steps.core.outputs.tag }}
- name: Show logs
if: always()
run: |
set -e
mkdir -p htcmock/infra/generated \
htcmock/infra/tfstates \
htcmock/app
if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then
cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json htcmock/infra/generated
fi
make -C infrastructure/quick-deploy/localhost/all-in-one/ state-pull > htcmock/infra/tfstates/armonik-terraform.tfstate
sudo find /var/log/pods/ -maxdepth 1 -iname 'armonik_*' -exec cp -rL '{}' htcmock/app/ ';'
sudo chown $USER -R htcmock
tar -czf htcmock.tar.gz htcmock
aws s3 cp htcmock.tar.gz s3://${{ secrets.AWS_LOG_BUCKET_NAME }}/armonik-pipeline/${{ github.run_number }}/${{ github.run_attempt }}/htcmock.tar.gz
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
- name: Destroy deployment
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main
with:
type: localhost
bench:
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
steps:
- name: Get type of VM
run: |
lscpu
uname -a
grep MemTotal /proc/meminfo
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: Get Core Tag
id: core
run: |
TAG=$(cat versions.tfvars.json | jq -r '.armonik_versions.core')
echo "tag=$TAG" >> $GITHUB_OUTPUT
- name: Install Dependencies
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main
with:
docker: true
terraform: true
k3s: true
aws: true
- name: Deploy
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main
with:
type: localhost
log-suffix: bench
- name: Test Bench - many tasks (200)
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e BenchOptions__NTasks=200 \
-e BenchOptions__TaskDurationMs=100 \
-e BenchOptions__Partition="bench"\
dockerhubaneo/armonik_core_bench_test_client:${{ steps.core.outputs.tag }}
- name: Test Bench - long tasks (10s)
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e BenchOptions__NTasks=2 \
-e BenchOptions__TaskDurationMs=10000 \
-e BenchOptions__Partition="bench"\
dockerhubaneo/armonik_core_bench_test_client:${{ steps.core.outputs.tag }}
- name: Test Bench - large payloads (10MB)
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e BenchOptions__NTasks=10 \
-e BenchOptions__TaskDurationMs=10 \
-e BenchOptions__ResultSize=1 \
-e BenchOptions__PayloadSize=10000 \
-e BenchOptions__Partition="bench"\
dockerhubaneo/armonik_core_bench_test_client:${{ steps.core.outputs.tag }}
- name: Test Bench - large results (10MB)
shell: bash
run: |
set -ex
export CONTROL_PLANE_URL=$(cat infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json | jq -r '.armonik.control_plane_url')
docker run --rm \
-e GrpcClient__Endpoint="${CONTROL_PLANE_URL}" \
-e BenchOptions__NTasks=10 \
-e BenchOptions__TaskDurationMs=10 \
-e BenchOptions__ResultSize=10000 \
-e BenchOptions__PayloadSize=1 \
-e BenchOptions__Partition="bench"\
dockerhubaneo/armonik_core_bench_test_client:${{ steps.core.outputs.tag }}
- name: Show logs
if: always()
run: |
set -e
mkdir -p bench/infra/generated \
bench/infra/tfstates \
bench/app
if [ -e infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json ] ; then
cp infrastructure/quick-deploy/localhost/all-in-one/generated/armonik-output.json bench/infra/generated
fi
make -C infrastructure/quick-deploy/localhost/all-in-one/ state-pull > bench/infra/tfstates/armonik-terraform.tfstate
sudo find /var/log/pods/ -maxdepth 1 -iname 'armonik_*' -exec cp -rL '{}' bench/app/ ';'
sudo chown $USER -R bench
tar -czf bench.tar.gz bench
aws s3 cp bench.tar.gz s3://${{ secrets.AWS_LOG_BUCKET_NAME }}/armonik-pipeline/${{ github.run_number }}/${{ github.run_attempt }}/bench.tar.gz
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
- name: Destroy deployment
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main
with:
type: localhost