-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #85 from betarixm/refactor/services
Minimal PoC
- Loading branch information
Showing
41 changed files
with
2,423 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.bsp | ||
.idea | ||
docs | ||
**/.bloop | ||
target | ||
**/target | ||
**/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../log4j2.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
services: | ||
master: | ||
build: | ||
context: . | ||
dockerfile: docker/master/Dockerfile | ||
args: | ||
- NUMBER_OF_WORKERS=2 | ||
worker: | ||
build: | ||
context: . | ||
dockerfile: docker/worker/Dockerfile | ||
args: | ||
- MASTER_HOST=master | ||
- MASTER_PORT=50051 | ||
deploy: | ||
replicas: 2 | ||
depends_on: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM sbtscala/scala-sbt:eclipse-temurin-jammy-20.0.2_9_1.9.6_2.13.12 | ||
|
||
ARG NUMBER_OF_WORKERS | ||
|
||
ENV NUMBER_OF_WORKERS=${NUMBER_OF_WORKERS} | ||
|
||
RUN mkdir -p /app | ||
|
||
WORKDIR /app | ||
|
||
COPY build.sbt log4j2.properties ./ | ||
COPY core/build.sbt ./core/ | ||
COPY master/build.sbt ./master/ | ||
COPY rpc/build.sbt ./rpc/ | ||
COPY utils/build.sbt ./utils/ | ||
COPY worker/build.sbt ./worker/ | ||
COPY project/build.properties project/plugins.sbt project/scalapb.sbt ./project/ | ||
|
||
RUN sbt --batch compile | ||
|
||
COPY rpc/src/main/protobuf ./rpc/src/main/protobuf | ||
|
||
RUN sbt --batch compile | ||
|
||
COPY . . | ||
|
||
RUN sbt --batch compile | ||
|
||
ENTRYPOINT sbt --batch -v "master/run ${NUMBER_OF_WORKERS}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
FROM sbtscala/scala-sbt:eclipse-temurin-jammy-20.0.2_9_1.9.6_2.13.12 | ||
|
||
ARG MASTER_HOST | ||
ARG MASTER_PORT | ||
|
||
ENV MASTER_HOST=${MASTER_HOST} | ||
ENV MASTER_PORT=${MASTER_PORT} | ||
|
||
ENV SBT_OPTS="-Xmx2G -Xss2M" | ||
|
||
RUN mkdir -p /app /data /output | ||
|
||
COPY docker/worker/data /data | ||
|
||
WORKDIR /app | ||
|
||
COPY build.sbt log4j2.properties ./ | ||
COPY core/build.sbt ./core/ | ||
COPY master/build.sbt ./master/ | ||
COPY rpc/build.sbt ./rpc/ | ||
COPY utils/build.sbt ./utils/ | ||
COPY worker/build.sbt ./worker/ | ||
COPY project/build.properties project/plugins.sbt project/scalapb.sbt ./project/ | ||
|
||
RUN sbt --batch compile | ||
|
||
COPY rpc/src/main/protobuf ./rpc/src/main/protobuf | ||
|
||
RUN sbt --batch compile | ||
|
||
COPY . . | ||
|
||
RUN sbt --batch compile | ||
|
||
ENTRYPOINT sbt --batch -v "worker/run ${MASTER_HOST}:${MASTER_PORT} -I /data/0 /data/1 /data/2 -O /output/" |
Oops, something went wrong.