-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/SK-932 | Add fedn controller start (#651)
- Loading branch information
1 parent
c47a636
commit 49e53d2
Showing
11 changed files
with
85 additions
and
16 deletions.
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
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,18 @@ | ||
import click | ||
|
||
from .main import main | ||
|
||
|
||
@main.group("controller") | ||
@click.pass_context | ||
def controller_cmd(ctx): | ||
""":param ctx:""" | ||
pass | ||
|
||
|
||
@controller_cmd.command("start") | ||
@click.pass_context | ||
def controller_cmd(ctx): | ||
from fedn.network.api.server import start_server_api | ||
|
||
start_server_api() |
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
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,24 @@ | ||
network_id: fedn-network | ||
controller: | ||
host: localhost | ||
port: 8092 | ||
debug: True | ||
|
||
statestore: | ||
type: MongoDB | ||
mongo_config: | ||
username: fedn_admin | ||
password: password | ||
host: localhost | ||
port: 6534 | ||
|
||
storage: | ||
storage_type: S3 | ||
storage_config: | ||
storage_hostname: localhost | ||
storage_port: 9000 | ||
storage_access_key: fedn_admin | ||
storage_secret_key: password | ||
storage_bucket: fedn-models | ||
context_bucket: fedn-context | ||
storage_secure_mode: False |
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
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,17 @@ | ||
import importlib.metadata | ||
|
||
import fedn | ||
|
||
|
||
def get_version(pacakge): | ||
# Dynamically get the version of the package | ||
try: | ||
version = importlib.metadata.version("fedn") | ||
except importlib.metadata.PackageNotFoundError: | ||
version = "unknown" | ||
return version | ||
|
||
|
||
def get_package_path(): | ||
# Get the path of the package | ||
return fedn.__path__[0] |