Skip to content
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

Harmonize Envoy CLI and Configuration Files with Director Component for Consistency #1284

Merged
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
c125a29
Clean envoy CLI & config
refai06 Jan 6, 2025
176d6e6
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 7, 2025
1f2f598
Cleanup federatedruntime testcase-config
refai06 Jan 7, 2025
5fefd5a
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 9, 2025
5f7bbe8
Update files
refai06 Jan 10, 2025
762c234
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 10, 2025
5a3b4e8
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 12, 2025
f00ce2a
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 14, 2025
3d0b44a
Merge branch 'develop' into Envoy-CLI-and-Config-cleanup
refai06 Jan 16, 2025
781e3b9
Envoy execption-handling
refai06 Jan 16, 2025
61cc9c1
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 17, 2025
9f60b9e
Update error messages
refai06 Jan 17, 2025
9c6f0dc
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 17, 2025
268b3e7
Documentation update for recent change
refai06 Jan 17, 2025
343182f
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 20, 2025
7a735da
Fix code format
refai06 Jan 20, 2025
b6822ec
Document Update
refai06 Jan 21, 2025
203d417
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 22, 2025
5d4f208
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 24, 2025
bdf1da2
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 24, 2025
c05820d
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 26, 2025
e14c93f
Merge branch 'securefederatedai:develop' into Envoy-CLI-and-Config-cl…
refai06 Jan 28, 2025
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
Next Next commit
Clean envoy CLI & config
Signed-off-by: refai06 <[email protected]>
  • Loading branch information
refai06 committed Jan 6, 2025

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit c125a29764b8f8fb1c3c9d6344b150cd474a6c0c
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
settings:
director_host: localhost
director_port: 50050

Portland:
private_attributes: private_attributes.portland_attrs
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ set -e
ENVOY_NAME=$1
ENVOY_CONF=$2

fx envoy start -n "$ENVOY_NAME" --disable-tls --envoy-config-path "$ENVOY_CONF" -dh localhost -dp 50050
fx envoy start -n "$ENVOY_NAME" --disable-tls --envoy-config-path "$ENVOY_CONF"
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
settings:
director_host: localhost
director_port: 50050

Seattle:
private_attributes: private_attributes.seattle_attrs
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ set -e
ENVOY_NAME=$1
ENVOY_CONF=$2

fx envoy start -n "$ENVOY_NAME" --disable-tls --envoy-config-path "$ENVOY_CONF" -dh localhost -dp 50050
fx envoy start -n "$ENVOY_NAME" --disable-tls --envoy-config-path "$ENVOY_CONF"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
settings:
director_host: localhost
director_port: 50050

Bangalore:
callable_func:
settings:
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ set -e
ENVOY_NAME=$1
ENVOY_CONF=$2

fx envoy start -n "$ENVOY_NAME" --disable-tls --envoy-config-path "$ENVOY_CONF" -dh localhost -dp 50050
fx envoy start -n "$ENVOY_NAME" --disable-tls --envoy-config-path "$ENVOY_CONF"
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
settings:
director_host: localhost
director_port: 50050

Chandler:
callable_func:
settings:
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@ set -e
ENVOY_NAME=$1
ENVOY_CONF=$2

fx envoy start -n "$ENVOY_NAME" --disable-tls --envoy-config-path "$ENVOY_CONF" -dh localhost -dp 50050
fx envoy start -n "$ENVOY_NAME" --disable-tls --envoy-config-path "$ENVOY_CONF"
4 changes: 2 additions & 2 deletions openfl/experimental/workflow/component/envoy/envoy.py
Original file line number Diff line number Diff line change
@@ -48,8 +48,8 @@ def __init__(
self,
*,
envoy_name: str,
director_host: str,
director_port: int,
director_host: str = "[::]",
director_port: int = 50051,
envoy_config: Optional[Path] = None,
root_certificate: Optional[Union[Path, str]] = None,
private_key: Optional[Union[Path, str]] = None,
28 changes: 6 additions & 22 deletions openfl/experimental/workflow/interface/cli/envoy.py
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
from dynaconf import Validator

from openfl.experimental.workflow.component.envoy import Envoy
from openfl.utilities import click_types, merge_configs
from openfl.utilities import merge_configs
from openfl.utilities.path_check import is_directory_traversal

logger = logging.getLogger(__name__)
@@ -31,28 +31,14 @@ def envoy(context):

@envoy.command(name="start")
@option("-n", "--envoy_name", required=True, help="Current shard name")
@option(
"-dh",
"--director-host",
required=True,
help="The FQDN of the federation director",
type=click_types.FQDN,
)
@option(
"-dp",
"--director-port",
required=True,
help="The federation director port",
type=click.IntRange(1, 65535),
)
@option(
"--tls/--disable-tls",
default=True,
is_flag=True,
help="Use TLS or not (By default TLS is enabled)",
)
@option(
"-ec",
"-c",
"--envoy-config-path",
default="envoy_config.yaml",
help="The envoy config path",
@@ -84,8 +70,6 @@ def envoy(context):
)
def start_(
envoy_name,
director_host,
director_port,
tls,
envoy_config_path,
root_certificate,
@@ -96,8 +80,6 @@ def start_(

Args:
envoy_name (str): Name of the Envoy.
director_host (str): The FQDN of the federation director.
director_port (int): The federation director port.
tls (bool): Use TLS or not.
envoy_config_path (str): The envoy config path.
root_certificate (str): Path to a root CA cert.
@@ -118,6 +100,8 @@ def start_(
"certificate": certificate,
},
validators=[
Validator("settings.director_host", default="localhost"),
Validator("settings.director_port", default=50051, gte=1024, lte=65535),
Validator("params.install_requirements", default=True),
],
)
@@ -138,8 +122,8 @@ def start_(

envoy = Envoy(
envoy_name=envoy_name,
director_host=director_host,
director_port=director_port,
director_host=config.settings.director_host,
director_port=config.settings.director_port,
envoy_config=Path(envoy_config_path).absolute(),
root_certificate=config.root_certificate,
private_key=config.private_key,