Skip to content

Commit

Permalink
simplify compose file
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Steiner <[email protected]>
  • Loading branch information
Robert-Steiner committed Sep 2, 2024
1 parent a9b4acb commit 24b420a
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 105 deletions.
54 changes: 51 additions & 3 deletions src/docker/distributed/client/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ services:
supernode-1:
image: flwr/supernode:${FLWR_VERSION:-1.10.0}
command:
- --insecure
- --superlink
- ${SUPERLINK_IP:-127.0.0.1}:9092
- --supernode-address
Expand All @@ -11,11 +10,15 @@ services:
- process
- --node-config
- "partition-id=0 num-partitions=2"
- --root-certificates
- certificates/ca.crt
secrets:
- source: superlink-ca-certfile
target: /app/certificates/ca.crt

supernode-2:
image: flwr/supernode:${FLWR_VERSION:-1.10.0}
command:
- --insecure
- --superlink
- ${SUPERLINK_IP:-127.0.0.1}:9092
- --supernode-address
Expand All @@ -24,10 +27,30 @@ services:
- process
- --node-config
- "partition-id=1 num-partitions=2"
- --root-certificates
- certificates/ca.crt
secrets:
- source: superlink-ca-certfile
target: /app/certificates/ca.crt

# uncomment to add another SuperNode
#

# supernode-3:
# image: flwr/supernode:${FLWR_VERSION:-1.10.0}
# command:
# - --superlink
# - ${SUPERLINK_IP:-127.0.0.1}:9092
# - --supernode-address
# - 0.0.0.0:9096
# - --isolation
# - process
# - --node-config
# - "partition-id=1 num-partitions=2"
# - --root-certificates
# - certificates/ca.crt
# secrets:
# - source: superlink-ca-certfile
# target: /app/certificates/ca.crt

clientapp-1:
build:
Expand Down Expand Up @@ -77,4 +100,29 @@ services:

# uncomment to add another ClientApp
#
# clientapp-3:
# build:
# context: ${PROJECT_DIR:-.}
# dockerfile_inline: |
# FROM flwr/clientapp:${FLWR_VERSION:-1.10.0}

# WORKDIR /app
# COPY --chown=app:app pyproject.toml .
# RUN sed -i 's/.*flwr\[simulation\].*//' pyproject.toml \
# && python -m pip install -U --no-cache-dir .

# ENTRYPOINT ["flwr-clientapp"]
# command:
# - --supernode
# - supernode-3:9096
# deploy:
# resources:
# limits:
# cpus: "2"
# stop_signal: SIGINT
# depends_on:
# - supernode-3

secrets:
superlink-ca-certfile:
file: ../superlink-certificates/ca.crt
39 changes: 0 additions & 39 deletions src/docker/distributed/client/with-tls.yml

This file was deleted.

43 changes: 40 additions & 3 deletions src/docker/distributed/server/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,19 @@ services:
superlink:
image: flwr/superlink:${FLWR_VERSION:-1.10.0}
command:
- --insecure
- --ssl-ca-certfile=certificates/ca.crt
- --ssl-certfile=certificates/server.pem
- --ssl-keyfile=certificates/server.key
- --database=state/state.db
volumes:
- ./state/:/app/state/:rw
secrets:
- source: superlink-ca-certfile
target: /app/certificates/ca.crt
- source: superlink-certfile
target: /app/certificates/server.pem
- source: superlink-keyfile
target: /app/certificates/server.key
ports:
- 9092:9092

Expand All @@ -21,10 +33,35 @@ services:
command:
- --executor
- flwr.superexec.deployment:executor
- --insecure
- --executor-config
- superlink="superlink:9091"
- superlink="superlink:9091" root-certificates="certificates/superlink-ca.crt"
- --ssl-ca-certfile=certificates/ca.crt
- --ssl-certfile=certificates/server.pem
- --ssl-keyfile=certificates/server.key
secrets:
- source: superlink-ca-certfile
target: /app/certificates/superlink-ca.crt
- source: superexec-ca-certfile
target: /app/certificates/ca.crt
- source: superexec-certfile
target: /app/certificates/server.pem
- source: superexec-keyfile
target: /app/certificates/server.key
ports:
- 9093:9093
depends_on:
- superlink

secrets:
superlink-ca-certfile:
file: ../superlink-certificates/ca.crt
superlink-certfile:
file: ../superlink-certificates/server.pem
superlink-keyfile:
file: ../superlink-certificates/server.key
superexec-ca-certfile:
file: ../superexec-certificates/ca.crt
superexec-certfile:
file: ../superexec-certificates/server.pem
superexec-keyfile:
file: ../superexec-certificates/server.key
14 changes: 0 additions & 14 deletions src/docker/distributed/server/with-state.yml

This file was deleted.

46 changes: 0 additions & 46 deletions src/docker/distributed/server/with-tls.yml

This file was deleted.

0 comments on commit 24b420a

Please sign in to comment.