-
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.
- Loading branch information
Showing
6 changed files
with
58 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import click | ||
|
||
from .main import main | ||
from fedn.network.api.server import start_server_api | ||
|
||
|
||
@main.group("controller") | ||
@click.pass_context | ||
def controller_cmd(ctx): | ||
""":param 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,10 @@ | ||
from fedn.common.config import get_modelstorage_config, get_network_config, get_statestore_config | ||
from fedn.network.controller.control import Control | ||
from fedn.network.storage.statestore.mongostatestore import MongoStateStore | ||
statestore=None | ||
statestore_config=None | ||
modelstorage_config=None | ||
network_id=None | ||
control=None | ||
def set_statestore_config(): | ||
global statestore | ||
global modelstorage_config | ||
global network_id | ||
global control | ||
global statestore_config | ||
statestore_config = get_statestore_config() | ||
modelstorage_config = get_modelstorage_config() | ||
network_id = get_network_config() | ||
statestore = MongoStateStore(network_id, statestore_config["mongo_config"]) | ||
statestore.set_storage_backend(modelstorage_config) | ||
control = Control(statestore=statestore) | ||
|
||
set_statestore_config() | ||
statestore_config = get_statestore_config() | ||
modelstorage_config = get_modelstorage_config() | ||
network_id = get_network_config() | ||
statestore = MongoStateStore(network_id, statestore_config["mongo_config"]) | ||
statestore.set_storage_backend(modelstorage_config) | ||
control = Control(statestore=statestore) |
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