Skip to content

Commit

Permalink
feat(framework:skip) Update Docker Compose complete files for 1.13.0 (
Browse files Browse the repository at this point in the history
#4413)

Signed-off-by: Robert Steiner <[email protected]>
Co-authored-by: Chong Shen Ng <[email protected]>
  • Loading branch information
Robert-Steiner and chongshenng authored Nov 11, 2024
1 parent 92c0856 commit cb673d6
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 64 deletions.
1 change: 0 additions & 1 deletion src/docker/complete/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
superexec-certificates
superlink-certificates
state
22 changes: 0 additions & 22 deletions src/docker/complete/certs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,7 @@ services:
ARG SUPEREXEC_IP=127.0.0.1
COPY <<-EOF superexec-certificate.conf
[req]
default_bits = 4096
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[dn]
C = US
O = Flower
CN = localhost
[req_ext]
subjectAltName = @alt_names
[alt_names]
DNS.0 = superexec
IP.1 = ::1
IP.2 = $${SUPEREXEC_IP}
EOF
COPY --chmod=744 <<-'EOF' generate.sh
#!/bin/bash
Expand Down Expand Up @@ -113,12 +93,10 @@ services:
-extensions req_ext
}
generate superlink-certificates superlink-certificate.conf
generate superexec-certificates superexec-certificate.conf
EOF
WORKDIR /app
ENTRYPOINT ["./script/generate.sh"]
volumes:
- ./superlink-certificates/:/app/superlink-certificates/:rw
- ./superexec-certificates/:/app/superexec-certificates/:rw
36 changes: 19 additions & 17 deletions src/docker/complete/compose.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
services:
# create a SuperLink service
superlink:
image: flwr/superlink:${FLWR_VERSION:-1.12.0}
image: flwr/superlink:${FLWR_VERSION:-nightly}
command:
- --insecure
- --executor
- flwr.superexec.deployment:executor
- --isolation
- process
ports:
- 9093:9093

# create a SuperExec service
superexec:
# create a ServerApp service
serverapp:
build:
context: ${PROJECT_DIR:-.}
dockerfile_inline: |
FROM flwr/superexec:${FLWR_VERSION:-1.12.0}
FROM flwr/serverapp:${FLWR_VERSION:-nightly}
# gcc is required for the fastai quickstart example
USER root
Expand All @@ -25,21 +31,17 @@ services:
RUN sed -i 's/.*flwr\[simulation\].*//' pyproject.toml \
&& python -m pip install -U --no-cache-dir .
ENTRYPOINT ["flower-superexec"]
ports:
- 9093:9093
ENTRYPOINT ["flwr-serverapp"]
command:
- --executor
- flwr.superexec.deployment:executor
- --insecure
- --executor-config
- superlink="superlink:9091"
- --superlink
- superlink:9091
depends_on:
- superlink

# create a two SuperNode service with different node configs
supernode-1:
image: flwr/supernode:${FLWR_VERSION:-1.12.0}
image: flwr/supernode:${FLWR_VERSION:-nightly}
command:
- --insecure
- --superlink
Expand All @@ -54,7 +56,7 @@ services:
- superlink

supernode-2:
image: flwr/supernode:${FLWR_VERSION:-1.12.0}
image: flwr/supernode:${FLWR_VERSION:-nightly}
command:
- --insecure
- --superlink
Expand All @@ -71,7 +73,7 @@ services:
# uncomment to add another SuperNode
#
# supernode-3:
# image: flwr/supernode:${FLWR_VERSION:-1.12.0}
# image: flwr/supernode:${FLWR_VERSION:-nightly}
# command:
# - --insecure
# - --superlink
Expand All @@ -89,7 +91,7 @@ services:
build:
context: ${PROJECT_DIR:-.}
dockerfile_inline: |
FROM flwr/clientapp:${FLWR_VERSION:-1.12.0}
FROM flwr/clientapp:${FLWR_VERSION:-nightly}
# gcc is required for the fastai quickstart example
USER root
Expand Down Expand Up @@ -120,7 +122,7 @@ services:
build:
context: ${PROJECT_DIR:-.}
dockerfile_inline: |
FROM flwr/clientapp:${FLWR_VERSION:-1.12.0}
FROM flwr/clientapp:${FLWR_VERSION:-nightly}
# gcc is required for the fastai quickstart example
USER root
Expand Down Expand Up @@ -153,7 +155,7 @@ services:
# build:
# context: ${PROJECT_DIR:-.}
# dockerfile_inline: |
# FROM flwr/clientapp:${FLWR_VERSION:-1.12.0}
# FROM flwr/clientapp:${FLWR_VERSION:-nightly}

# # gcc is required for the fastai quickstart example
# USER root
Expand Down
16 changes: 12 additions & 4 deletions src/docker/complete/with-state.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@ services:
superlink:
command:
- --insecure
- --executor
- flwr.superexec.deployment:executor
- --isolation
- process
- --database=state/state.db
# To toggle TLS encryption and persisting state for the SuperLink, comment the key `command`
# above and uncomment the lines below:
# command:
# - --ssl-ca-certfile=certificates/ca.crt
# - --ssl-certfile=certificates/server.pem
# - --ssl-keyfile=certificates/server.key
# - --database=state/state.db
# - --executor
# - flwr.superexec.deployment:executor
# - --isolation
# - process
# - --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
29 changes: 9 additions & 20 deletions src/docker/complete/with-tls.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
services:
superlink:
command:
- --executor
- flwr.superexec.deployment:executor
- --isolation
- process
- --ssl-ca-certfile=certificates/ca.crt
- --ssl-certfile=certificates/server.pem
- --ssl-keyfile=certificates/server.key
Expand All @@ -12,24 +16,15 @@ services:
- source: superlink-keyfile
target: /app/certificates/server.key

superexec:
serverapp:
command:
- --executor
- flwr.superexec.deployment:executor
- --executor-config
- 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
- --superlink
- superlink:9091
- --root-certificates
- certificates/ca.crt
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

supernode-1:
command:
Expand Down Expand Up @@ -88,9 +83,3 @@ secrets:
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

0 comments on commit cb673d6

Please sign in to comment.