-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs/SK-691 | Add tutorial for distributed deployment #530
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d13e5ee
Add tutorial for distributed deployment
f307152
Add tutorial for distributed deployment
viktorvaladi 5957221
clean-up generated files
viktorvaladi 1a9c338
clean-up generated files
viktorvaladi e3cf9f5
reST formatting fix
viktorvaladi ad9d396
add client step clarification
viktorvaladi cecc892
slim down
viktorvaladi 91cfbfd
clarifications
viktorvaladi 7bdf9ac
grammar
viktorvaladi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,70 @@ | ||
Distributed Deployment | ||
=================================== | ||
|
||
This tutorial outlines the steps for deploying the FEDn framework over a **local network**, using a workstation as | ||
the host and different devices as clients. For general steps on how to run FEDn, see one of the quickstart tutorials. | ||
|
||
|
||
.. note:: | ||
For a secure and production-grade deployment solution over **public networks**, explore the FEDn Studio service at | ||
**studio.scaleoutsystems.com**. | ||
|
||
Alternatively follow this tutorial substituting the hosts local IP with your public IP, open the neccesary | ||
ports (see which ports are used in docker-compose.yaml), and ensure you have taken additional neccesary security | ||
precautions. | ||
|
||
Prerequisites | ||
------------- | ||
- `One host workstation and atleast one client device` | ||
- `Python 3.8, 3.9 or 3.10 <https://www.python.org/downloads>`__ | ||
- `Docker <https://docs.docker.com/get-docker>`__ | ||
- `Docker Compose <https://docs.docker.com/compose/install>`__ | ||
|
||
Launch a distributed FEDn Network | ||
------------- | ||
|
||
|
||
Start by noting your host's local IP address, used within your network. Discover it by running ifconfig on UNIX or | ||
ipconfig on Windows, typically listed under inet for Unix and IPv4 for Windows. | ||
|
||
Continue with following the standard procedure to initiate a FEDn network, for example using by docker-compose. | ||
Once the network is active, upload your compute package and seed (for comprehensive details, see the quickstart tutorials). | ||
|
||
|
||
Configuring and Attaching Clients | ||
------------- | ||
|
||
On your client device, continue with initializing your client. To connect to the host machine we need to ensure we are | ||
routing the correct DNS to our hosts local IP address. We can do this using the standard FEDn `client.yaml`: | ||
|
||
.. code-block:: | ||
|
||
network_id: fedn-network | ||
discover_host: api-server | ||
discover_port: 8092 | ||
|
||
|
||
We can then run using docker by adding the hosts in the docker run command: | ||
|
||
.. code-block:: | ||
|
||
docker run \ | ||
-v $PWD/client.yaml:<client.yaml file location> \ | ||
<potentiel data pointers> | ||
—add-host=api-server:<host local ip> \ | ||
—add-host=combiner:<host local ip> \ | ||
<image name> run client -in client.yaml --name client1 | ||
|
||
|
||
Alternatively updating the `/etc/hosts` file, appending the following lines for running naitively: | ||
|
||
.. code-block:: | ||
|
||
<host local ip> api-server | ||
<host local ip> combiner | ||
|
||
|
||
Start a training session | ||
------------- | ||
|
||
After connecting with your clients, you are ready to start training sessions from the host machine. |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
introduction | ||
quickstart | ||
distributed | ||
apiclient | ||
tutorial | ||
architecture | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be public ip, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is mainly for deployment over local networks, so the host's local network IP. I've clarified that and referred to Studio for secure deployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is a distributed setup you cannot communicate on the hosts local IP from a client. I think the setting that all machines are on the same local network is fairly uncommon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see, you made that clear in the beginning of the tutorial.