[CELEBORN-2390] Add docker-compose for local cluster - #3768
Conversation
e17f836 to
0c8a74e
Compare
0c8a74e to
b6fce04
Compare
|
@SteNicholas @RexXiong @zaynt4606 Could you help review this PR? Thanks! |
|
Ping @pan3793, @cxzl25, @RexXiong, @SteNicholas |
|
I feel this might be less useful without Compute Engine integration ... if you suppose run Compute Engine outside, e.g., run Spark on your host with local mode, then it requires a direct connection from Spark to Celeborn Worker, you should expose the Worker's port too |
|
Thanks @pan3793. Added an example Spark cluster (1 master + 2 workers) to docker-compose so the stack can be exercised end-to-end.
|
Reviewer noted the standalone Celeborn compose is less useful without a compute engine: it cannot be exercised end-to-end, and running Spark in local mode on the host would require exposing worker ports. Add an example Spark cluster (1 master + 2 workers) to docker-compose whose shuffle is served by Celeborn, addressing both concerns: - Spark runs inside the celeborn-net, so the client only contacts the master RPC (celeborn-master:9097); worker push/fetch ports stay random and unexposed. - A GroupByTest spark-submit example gives an end-to-end shuffle check. Changes: - docker/spark/Dockerfile: apache/spark:3.5.0 + celeborn client shaded jar - docker/spark/conf/spark-defaults.conf: CelebornShuffleManager/Kryo/... - docker-compose.yaml: spark-master/spark-worker services + shared volume - build-image.sh: optionally build celeborn-spark:dev when -Pspark-3.x produces dist/spark/*.jar; base tag via CELEBORN_SPARK_BASE_TAG (renamed to avoid collision with Spark's own SPARK_IMAGE_TAG env) - README.md: Spark build + GroupByTest run/verify instructions - .gitignore: exclude any jar copied into the docker/spark build context
116e390 to
4d37e7d
Compare
pan3793
left a comment
There was a problem hiding this comment.
couples of minor issues, overall lgtm
| tmp/ | ||
|
|
||
| # Spark client shaded jar copied into the docker build context by build-image.sh | ||
| docker/spark/*.jar |
| BASE_SPARK_IMAGE_TAG="${CELEBORN_SPARK_BASE_TAG:-3.5.0}" | ||
|
|
||
| echo "==> Building distribution (./build/make-distribution.sh $*) ..." | ||
| ./build/make-distribution.sh "$@" |
| # Only build it when make-distribution produced a Spark client shaded jar, which | ||
| # happens when a -Pspark-3.x profile was passed. If absent, skip gracefully so | ||
| # the Celeborn-only workflow keeps working. | ||
| SPARK_CLIENT_JAR="$(ls dist/spark/celeborn-client-spark-3-shaded_*.jar 2>/dev/null || true)" |
| docker exec celeborn-spark-master /opt/spark/bin/spark-submit \ | ||
| --master spark://celeborn-spark-master:7077 \ | ||
| --class org.apache.spark.examples.GroupByTest \ | ||
| /opt/spark/examples/jars/spark-examples_2.12-3.5.0.jar 10 100 1000 10 |
There was a problem hiding this comment.
replace with the version-agnostic bin/run-example
| docker exec celeborn-spark-master /opt/spark/bin/spark-submit \ | |
| --master spark://celeborn-spark-master:7077 \ | |
| --class org.apache.spark.examples.GroupByTest \ | |
| /opt/spark/examples/jars/spark-examples_2.12-3.5.0.jar 10 100 1000 10 | |
| docker exec celeborn-spark-master /opt/spark/bin/run-example \ | |
| --master spark://celeborn-spark-master:7077 \ | |
| GroupByTest 10 100 1000 10 |
| # Usage (built by build-image.sh, not directly): | ||
| # docker build -t celeborn-spark:dev docker/spark/ | ||
|
|
||
| ARG spark_image_tag=3.5.0 |
There was a problem hiding this comment.
Why choose 3.5.0 instead of 3.5.9?
- .gitignore: exclude *.jar globally instead of docker/spark/*.jar - build-image.sh: pass --sbt-enabled to make-distribution.sh - build-image.sh/Dockerfile: support Spark 4 client jar, derive default base image tag from Spark major version (3 -> 3.5.9, 4 -> 4.0.4) - Dockerfile: bump default apache/spark base tag from 3.5.0 to 3.5.9 - README.md: use version-agnostic bin/run-example in the example


What changes were proposed in this pull request?
Add a
docker-compose.yamlunderdocker/to run a minimal local Celeborn cluster (1 master + 3 workers) for development and debugging, with abuild-image.shwrapper and aconf/. The existingdocker/Dockerfileis unchanged.Why are the changes needed?
There is no lightweight local deployment path today — only the K8s Helm chart or running master/worker manually on the host.
Does this PR resolve a correctness bug?
Does this PR introduce any user-facing change?
How was this patch tested?
Ran the cluster locally with
docker compose up -d: