Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions framework/docs/source/how-to-run-flower-on-azure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ VM Networking
During the execution of the Flower application, the server VM (``SuperLink``) will be
responsible to orchestrate the execution of the application across the client VMs
(``SuperNode``). When the SuperLink server starts, by default, it listens to the
following ports: ``{9092, 9093}``. Port `9092` is used to communicate with the
Federation clients (``SuperNode``) and port ``9093`` to receive and execute Flower
applications.
following ports: ``{8000, 9092}``. Port ``9092`` is used to communicate with the
federation clients (``SuperNode``), and port ``8000`` serves the HTTP Control API used
to submit and execute Flower applications.

Therefore, to enable this communication we need to allow inbound traffic to the server
VM instance. To achieve this, we need to navigate to the Networking page of the server
Expand All @@ -117,9 +117,9 @@ The rest of the fields can be left at their default values.
- - **Protocol**
- ``TCP``

Finally, we need to also open port 9093 to allow receiving and executing incoming
Finally, we need to also open port 8000 to allow receiving and executing incoming
application requests. To enable this we just need to repeat the steps above, i.e.,
create a new inbound rule, where for port range we assign port 9093. If we already know
create a new inbound rule, where for port range we assign port 8000. If we already know
the Public IP from which our local machine (e.g., laptop) will be submitting
applications to the Azure cluster, then we just need to specify the Source IP
address/CIDR range. However, if we want to keep the port widely open we simply need to
Expand All @@ -136,7 +136,7 @@ changes:
- - **Source IP addresses/CIDR ranges**
- add machine's Public IP
- - **Destination port ranges**
- ``9093``
- ``8000``

Otherwise, we change the properties as follows:

Expand All @@ -148,7 +148,7 @@ Otherwise, we change the properties as follows:
- - **Source**
- ``Any``
- - **Destination port ranges**
- ``9093``
- ``8000``

********************
Flower Environment
Expand Down Expand Up @@ -183,7 +183,7 @@ and then at each client (``SuperNode``).
.. code-block:: bash

# Server VM (SuperLink)
flower-superlink --insecure
flower-superlink --insecure --host="0.0.0.0"

# Client-1 VM (SuperNode-1)
flower-supernode \
Expand Down Expand Up @@ -231,7 +231,7 @@ Next, we need to create a new SuperLink connection in the Flower Configuration f
:caption: config.toml

[superlink.my-federation]
address = "SUPERLINK_PUBLIC_IP:9093" # Address of the SuperLink Control API
address = "SUPERLINK_PUBLIC_IP:8000" # Address of the SuperLink Control API
insecure = true

Then from our local machine we need to run ``flwr run . my-federation``.
Expand Down
19 changes: 8 additions & 11 deletions framework/docs/source/how-to-run-flower-on-gcp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,13 @@ provide the definition of the six ``yaml`` files that are necessary to deploy th
image: flwr/superlink:|stable_flwr_version|
args:
- "--insecure"
- "--host"
- "0.0.0.0"
- "--isolation"
- "process"
ports: # which ports to expose/available
- containerPort: 9091
- containerPort: 9092
- containerPort: 9093
- containerPort: 8000
Comment thread
tanertopal marked this conversation as resolved.
---
apiVersion: v1
kind: Service
Expand All @@ -350,18 +351,14 @@ provide the definition of the six ``yaml`` files that are necessary to deploy th
selector:
app: superlink
ports: # like a dynamic IP routing table/mapping that routes traffic to the designated ports
- protocol: TCP
port: 9091 # Port for ServerApp connection
targetPort: 9091 # the SuperLink container port
name: superlink-serverappioapi
- protocol: TCP
port: 9092 # Port for SuperNode connection
targetPort: 9092 # the SuperLink container port
name: superlink-fleetapi
- protocol: TCP
port: 9093 # Port for Flower app submission
targetPort: 9093 # the SuperLink container port
name: superlink-controlapi
port: 8000 # Port for Control and Runtime API connections over HTTP
targetPort: 8000 # the SuperLink container port
name: superlink-http-api
type: LoadBalancer # balances workload, makes the service publicly available

.. dropdown:: supernode-1-deployment.yaml
Expand Down Expand Up @@ -483,7 +480,7 @@ provide the definition of the six ``yaml`` files that are necessary to deploy th
args:
- "--insecure"
- "--runtime-api-address"
- "superlink-service:9091"
- "superlink-service:8000"
- "--plugin-type"
- "serverapp"

Expand Down Expand Up @@ -629,7 +626,7 @@ Flower Configuration file:
:caption: config.toml

[superlink.gcp-deployment]
address = "<EXTERNAL_IP>:9093" # replace the EXTERNAL_IP with the correct value
address = "<EXTERNAL_IP>:8000" # replace the EXTERNAL_IP with the correct value
insecure = true

Then we can execute the example on the GCP cluster by running:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,12 @@ tutorial on :doc:`how to deploy Flower in GCP <how-to-run-flower-on-gcp>`.
image: flwr/superlink:|stable_flwr_version|
args:
- "--insecure"
- "--host"
- "0.0.0.0"
ports: # which ports to expose/available
- containerPort: 9092
name: fleet
- containerPort: 9093
- containerPort: 8000
name: control
volumeMounts:
- name: cache-volume
Expand Down Expand Up @@ -289,7 +291,7 @@ pod and insert the following YAML definition:
targetPort: fleet # the SuperLink container port
name: superlink-fleetapi
- protocol: TCP
port: 9093 # Port for Flower app submission
port: 8000 # Port for Flower app submission over HTTP
targetPort: control # the SuperLink container port
name: superlink-controlapi
type: LoadBalancer # balances workload, makes the service publicly available
Expand Down Expand Up @@ -683,7 +685,7 @@ connection in the Flower Configuration file:
:caption: config.toml

[superlink.remote]
address = "superlink-service:9093" # use the service name created earlier
address = "superlink-service:8000" # use the service name created earlier
insecure = true

And finally, run your Flower app as usual with ``flwr run``:
Expand Down
Loading