Skip to content

Commit 7144daa

Browse files
authored
Add integration test to CI
2 parents d46a6c6 + e3e3b3b commit 7144daa

File tree

3 files changed

+121
-0
lines changed

3 files changed

+121
-0
lines changed

.github/workflows/armada.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Aramda
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
armada:
8+
name: Armada integration
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
path: spark-armada
14+
- uses: actions/checkout@v4
15+
with:
16+
repository: armadaproject/armada-operator
17+
path: armada-operator
18+
- run: |
19+
cd spark-armada
20+
./build/sbt package -Parmada -Pkubernetes
21+
./bin/docker-image-tool.sh -t testing build
22+
docker image save -o ../spark_testing.tar spark:testing
23+
cd ..
24+
25+
cd armada-operator
26+
make kind-all
27+
./bin/tooling/kind load image-archive ../spark_testing.tar --name armada
28+
29+
# sleep a bit, or we see: create queue request failed: rpc error: code = DeadlineExceeded
30+
sleep 60
31+
32+
./bin/app/armadactl create queue test
33+
34+
# sleep a bit, or we see: rpc error: code = PermissionDenied desc = could not find queue "test"
35+
sleep 60
36+
37+
./bin/app/armadactl submit ../spark-armada/examples/spark-driver-job.yaml
38+
./bin/app/armadactl submit ../spark-armada/examples/spark-executor-job.yaml
39+
40+
# wait for the jobs to start
41+
sleep 60
42+
43+
# inspect jobs
44+
kubectl get pods
45+
for pod in $(kubectl get pods | grep armada | cut -d " " -f 1)
46+
do
47+
echo "$pod"
48+
kubectl logs pod/$pod
49+
echo
50+
done
51+

examples/spark-driver-job.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
queue: test
2+
jobSetId: job-set-1
3+
jobs:
4+
- namespace: default
5+
priority: 0
6+
podSpec:
7+
terminationGracePeriodSeconds: 0
8+
restartPolicy: Never
9+
containers:
10+
- name: spark-driver
11+
image: spark:testing
12+
env:
13+
- name: SPARK_DRIVER_BIND_ADDRESS
14+
value: "0.0.0.0:1234"
15+
command:
16+
- /opt/entrypoint.sh
17+
args:
18+
- driver
19+
- --verbose
20+
- --class
21+
- org.apache.spark.examples.LocalPi
22+
- --master
23+
- armada://192.168.1.167:50051
24+
- submit
25+
resources:
26+
limits:
27+
memory: 1Gi
28+
cpu: 1
29+
requests:
30+
memory: 1Gi
31+
cpu: 1

0 commit comments

Comments
 (0)