vantage6 5.0.0a33__py3-none-any.whl → 5.0.0a34__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of vantage6 might be problematic. Click here for more details.
- vantage6/cli/algostore/new.py +24 -46
- vantage6/cli/algostore/start.py +33 -67
- vantage6/cli/algostore/stop.py +75 -40
- vantage6/cli/common/new.py +60 -0
- vantage6/cli/common/start.py +17 -223
- vantage6/cli/common/stop.py +1 -1
- vantage6/cli/common/utils.py +212 -16
- vantage6/cli/configuration_manager.py +65 -0
- vantage6/cli/configuration_wizard.py +95 -76
- vantage6/cli/context/algorithm_store.py +7 -6
- vantage6/cli/context/base_server.py +22 -30
- vantage6/cli/context/node.py +4 -0
- vantage6/cli/context/server.py +16 -7
- vantage6/cli/globals.py +12 -11
- vantage6/cli/node/common/__init__.py +1 -1
- vantage6/cli/node/create_private_key.py +9 -6
- vantage6/cli/node/set_api_key.py +7 -4
- vantage6/cli/node/start.py +1 -1
- vantage6/cli/node/stop.py +7 -7
- vantage6/cli/server/import_.py +1 -2
- vantage6/cli/server/list.py +0 -3
- vantage6/cli/server/new.py +13 -51
- vantage6/cli/server/shell.py +1 -1
- vantage6/cli/server/start.py +17 -17
- vantage6/cli/server/stop.py +64 -15
- vantage6/cli/template/algo_store_config.j2 +195 -22
- vantage6/cli/template/server_config.j2 +255 -33
- {vantage6-5.0.0a33.dist-info → vantage6-5.0.0a34.dist-info}/METADATA +4 -4
- {vantage6-5.0.0a33.dist-info → vantage6-5.0.0a34.dist-info}/RECORD +31 -31
- vantage6/cli/template/server_import_config.j2 +0 -31
- {vantage6-5.0.0a33.dist-info → vantage6-5.0.0a34.dist-info}/WHEEL +0 -0
- {vantage6-5.0.0a33.dist-info → vantage6-5.0.0a34.dist-info}/entry_points.txt +0 -0
vantage6/cli/server/import_.py
CHANGED
|
@@ -17,7 +17,6 @@ from vantage6.common.globals import (
|
|
|
17
17
|
from vantage6.cli.common.decorator import click_insert_context
|
|
18
18
|
from vantage6.cli.common.utils import print_log_worker
|
|
19
19
|
from vantage6.cli.context.server import ServerContext
|
|
20
|
-
from vantage6.cli.globals import ServerGlobals
|
|
21
20
|
from vantage6.cli.utils import check_config_name_allowed
|
|
22
21
|
|
|
23
22
|
|
|
@@ -111,7 +110,7 @@ def cli_server_import(
|
|
|
111
110
|
mounts.append(docker.types.Mount("/mnt/database/", dirname, type="bind"))
|
|
112
111
|
|
|
113
112
|
environment_vars = {
|
|
114
|
-
ServerGlobals.DB_URI_ENV_VAR.value: f"sqlite:////mnt/database/{basename}"
|
|
113
|
+
# ServerGlobals.DB_URI_ENV_VAR.value: f"sqlite:////mnt/database/{basename}"
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
else:
|
vantage6/cli/server/list.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import click
|
|
2
2
|
|
|
3
|
-
from vantage6.common.docker.addons import check_docker_running
|
|
4
3
|
from vantage6.common.globals import InstanceType
|
|
5
4
|
|
|
6
5
|
from vantage6.cli.common.utils import get_server_configuration_list
|
|
@@ -11,6 +10,4 @@ def cli_server_configuration_list() -> None:
|
|
|
11
10
|
"""
|
|
12
11
|
Print the available server configurations.
|
|
13
12
|
"""
|
|
14
|
-
check_docker_running()
|
|
15
|
-
|
|
16
13
|
get_server_configuration_list(InstanceType.SERVER)
|
vantage6/cli/server/new.py
CHANGED
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import click
|
|
2
|
-
from colorama import Fore, Style
|
|
3
2
|
|
|
4
|
-
from vantage6.common import ensure_config_dir_writable, error, info
|
|
5
3
|
from vantage6.common.globals import InstanceType
|
|
6
4
|
|
|
7
|
-
from vantage6.cli.
|
|
8
|
-
from vantage6.cli.configuration_wizard import configuration_wizard
|
|
9
|
-
from vantage6.cli.context.server import ServerContext
|
|
5
|
+
from vantage6.cli.common.new import new
|
|
10
6
|
from vantage6.cli.globals import DEFAULT_SERVER_SYSTEM_FOLDERS
|
|
11
|
-
from vantage6.cli.utils import check_config_name_allowed, prompt_config_name
|
|
12
7
|
|
|
13
8
|
|
|
14
9
|
@click.command()
|
|
15
10
|
@click.option(
|
|
16
11
|
"-n", "--name", default=None, help="name of the configuration you want to use."
|
|
17
12
|
)
|
|
18
|
-
@click.option("--system", "system_folders", flag_value=True)
|
|
19
13
|
@click.option(
|
|
20
|
-
"--
|
|
14
|
+
"--system",
|
|
15
|
+
"system_folders",
|
|
16
|
+
flag_value=True,
|
|
17
|
+
help="Use system folders instead of user folders. This is the default",
|
|
18
|
+
)
|
|
19
|
+
@click.option(
|
|
20
|
+
"--user",
|
|
21
|
+
"system_folders",
|
|
22
|
+
flag_value=False,
|
|
23
|
+
default=DEFAULT_SERVER_SYSTEM_FOLDERS,
|
|
24
|
+
help="Use user folders instead of system folders",
|
|
21
25
|
)
|
|
22
26
|
@click.option("--context", default=None, help="Kubernetes context to use")
|
|
23
27
|
@click.option(
|
|
@@ -34,46 +38,4 @@ def cli_server_new(
|
|
|
34
38
|
"""
|
|
35
39
|
Create a new server configuration.
|
|
36
40
|
"""
|
|
37
|
-
|
|
38
|
-
context, namespace = cli_config.compare_changes_config(
|
|
39
|
-
context=context,
|
|
40
|
-
namespace=namespace,
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
name = prompt_config_name(name)
|
|
44
|
-
|
|
45
|
-
# check if name is valid
|
|
46
|
-
check_config_name_allowed(name)
|
|
47
|
-
|
|
48
|
-
# check that this config does not exist
|
|
49
|
-
try:
|
|
50
|
-
if ServerContext.config_exists(name, system_folders):
|
|
51
|
-
error(f"Configuration {Fore.RED}{name}{Style.RESET_ALL} already " "exists!")
|
|
52
|
-
exit(1)
|
|
53
|
-
except Exception as e:
|
|
54
|
-
error(e)
|
|
55
|
-
exit(1)
|
|
56
|
-
|
|
57
|
-
# Check that we can write in this folder
|
|
58
|
-
if not ensure_config_dir_writable(system_folders):
|
|
59
|
-
error("Your user does not have write access to all folders. Exiting")
|
|
60
|
-
info(
|
|
61
|
-
f"Create a new server using '{Fore.GREEN}v6 server new "
|
|
62
|
-
f"--user{Style.RESET_ALL}' instead!"
|
|
63
|
-
)
|
|
64
|
-
exit(1)
|
|
65
|
-
|
|
66
|
-
# create config in ctx location
|
|
67
|
-
try:
|
|
68
|
-
cfg_file = configuration_wizard(InstanceType.SERVER, name, system_folders)
|
|
69
|
-
except KeyboardInterrupt:
|
|
70
|
-
error("Configuration creation aborted.")
|
|
71
|
-
exit(1)
|
|
72
|
-
info(f"New configuration created: {Fore.GREEN}{cfg_file}{Style.RESET_ALL}")
|
|
73
|
-
|
|
74
|
-
# info(f"root user created.")
|
|
75
|
-
flag = "" if system_folders else "--user"
|
|
76
|
-
info(
|
|
77
|
-
f"You can start the server by running {Fore.GREEN}v6 server start "
|
|
78
|
-
f"{flag}{Style.RESET_ALL}"
|
|
79
|
-
)
|
|
41
|
+
new(name, system_folders, namespace, context, InstanceType.SERVER)
|
vantage6/cli/server/shell.py
CHANGED
|
@@ -29,7 +29,7 @@ def cli_server_shell(ctx: ServerContext) -> None:
|
|
|
29
29
|
docker_client = docker.from_env()
|
|
30
30
|
|
|
31
31
|
running_servers = docker_client.containers.list(
|
|
32
|
-
filters={"label": f"{APPNAME}-type={InstanceType.SERVER}"}
|
|
32
|
+
filters={"label": f"{APPNAME}-type={InstanceType.SERVER.value}"}
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
if ctx.docker_container_name not in [s.name for s in running_servers]:
|
vantage6/cli/server/start.py
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import click
|
|
2
2
|
|
|
3
3
|
from vantage6.common import info
|
|
4
|
-
from vantage6.common.globals import InstanceType
|
|
4
|
+
from vantage6.common.globals import InstanceType, Ports
|
|
5
5
|
|
|
6
6
|
from vantage6.cli.common.decorator import click_insert_context
|
|
7
7
|
from vantage6.cli.common.start import (
|
|
8
8
|
helm_install,
|
|
9
9
|
start_port_forward,
|
|
10
10
|
)
|
|
11
|
-
from vantage6.cli.common.utils import
|
|
12
|
-
|
|
11
|
+
from vantage6.cli.common.utils import (
|
|
12
|
+
attach_logs,
|
|
13
|
+
create_directory_if_not_exists,
|
|
14
|
+
select_context_and_namespace,
|
|
15
|
+
)
|
|
13
16
|
from vantage6.cli.context.server import ServerContext
|
|
17
|
+
from vantage6.cli.globals import ChartName
|
|
14
18
|
|
|
15
19
|
|
|
16
20
|
@click.command()
|
|
@@ -42,20 +46,16 @@ def cli_server_start(
|
|
|
42
46
|
Start the server.
|
|
43
47
|
"""
|
|
44
48
|
info("Starting server...")
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
context, namespace = cli_config.compare_changes_config(
|
|
49
|
+
context, namespace = select_context_and_namespace(
|
|
48
50
|
context=context,
|
|
49
51
|
namespace=namespace,
|
|
50
52
|
)
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
ctx.log_dir.mkdir(parents=True, exist_ok=True)
|
|
54
|
+
create_directory_if_not_exists(ctx.log_dir)
|
|
54
55
|
|
|
55
|
-
release_name = f"{ctx.name}-{ctx.instance_type}"
|
|
56
56
|
helm_install(
|
|
57
|
-
release_name=
|
|
58
|
-
chart_name=
|
|
57
|
+
release_name=ctx.helm_release_name,
|
|
58
|
+
chart_name=ChartName.SERVER,
|
|
59
59
|
values_file=ctx.config_file,
|
|
60
60
|
context=context,
|
|
61
61
|
namespace=namespace,
|
|
@@ -64,9 +64,9 @@ def cli_server_start(
|
|
|
64
64
|
# port forward for server
|
|
65
65
|
info("Port forwarding for server")
|
|
66
66
|
start_port_forward(
|
|
67
|
-
service_name=f"{
|
|
68
|
-
service_port=ctx.config["server"].get("port",
|
|
69
|
-
port=port or ctx.config["server"].get("port",
|
|
67
|
+
service_name=f"{ctx.helm_release_name}-vantage6-server-service",
|
|
68
|
+
service_port=ctx.config["server"].get("port", Ports.DEV_SERVER.value),
|
|
69
|
+
port=port or ctx.config["server"].get("port", Ports.DEV_SERVER.value),
|
|
70
70
|
ip=ip,
|
|
71
71
|
context=context,
|
|
72
72
|
namespace=namespace,
|
|
@@ -75,9 +75,9 @@ def cli_server_start(
|
|
|
75
75
|
# port forward for UI
|
|
76
76
|
info("Port forwarding for UI")
|
|
77
77
|
start_port_forward(
|
|
78
|
-
service_name=f"{
|
|
79
|
-
service_port=ctx.config["ui"].get("port",
|
|
80
|
-
port=ui_port or ctx.config["ui"].get("port",
|
|
78
|
+
service_name=f"{ctx.helm_release_name}-vantage6-frontend-service",
|
|
79
|
+
service_port=ctx.config["ui"].get("port", Ports.DEV_UI.value),
|
|
80
|
+
port=ui_port or ctx.config["ui"].get("port", Ports.DEV_UI.value),
|
|
81
81
|
ip=ip,
|
|
82
82
|
context=context,
|
|
83
83
|
namespace=namespace,
|
vantage6/cli/server/stop.py
CHANGED
|
@@ -1,50 +1,99 @@
|
|
|
1
1
|
import click
|
|
2
|
+
from colorama import Fore, Style
|
|
2
3
|
|
|
3
|
-
from vantage6.common import info
|
|
4
|
+
from vantage6.common import error, info
|
|
4
5
|
from vantage6.common.globals import InstanceType
|
|
5
6
|
|
|
6
|
-
from vantage6.cli.common.decorator import click_insert_context
|
|
7
7
|
from vantage6.cli.common.stop import helm_uninstall, stop_port_forward
|
|
8
|
-
from vantage6.cli.
|
|
9
|
-
|
|
8
|
+
from vantage6.cli.common.utils import (
|
|
9
|
+
find_running_service_names,
|
|
10
|
+
select_context_and_namespace,
|
|
11
|
+
select_running_service,
|
|
12
|
+
)
|
|
13
|
+
from vantage6.cli.context import get_context
|
|
14
|
+
from vantage6.cli.globals import DEFAULT_SERVER_SYSTEM_FOLDERS
|
|
10
15
|
|
|
11
16
|
|
|
12
17
|
@click.command()
|
|
13
|
-
|
|
18
|
+
@click.option("-n", "--name", default=None, help="Configuration name")
|
|
14
19
|
@click.option("--context", default=None, help="Kubernetes context to use")
|
|
15
20
|
@click.option("--namespace", default=None, help="Kubernetes namespace to use")
|
|
16
|
-
@
|
|
21
|
+
@click.option(
|
|
22
|
+
"--system",
|
|
23
|
+
"system_folders",
|
|
24
|
+
flag_value=True,
|
|
25
|
+
default=DEFAULT_SERVER_SYSTEM_FOLDERS,
|
|
26
|
+
help="Search for configuration in system folders instead of user folders. "
|
|
27
|
+
"This is the default.",
|
|
28
|
+
)
|
|
29
|
+
@click.option(
|
|
30
|
+
"--user",
|
|
31
|
+
"system_folders",
|
|
32
|
+
flag_value=False,
|
|
33
|
+
help="Search for configuration in the user folders instead of system folders.",
|
|
34
|
+
)
|
|
35
|
+
@click.option("--all", "all_servers", flag_value=True, help="Stop all running servers")
|
|
17
36
|
def cli_server_stop(
|
|
18
|
-
|
|
37
|
+
name: str,
|
|
19
38
|
context: str,
|
|
20
39
|
namespace: str,
|
|
40
|
+
system_folders: bool,
|
|
41
|
+
all_servers: bool,
|
|
21
42
|
):
|
|
22
43
|
"""
|
|
23
44
|
Stop an running server.
|
|
24
45
|
"""
|
|
25
|
-
|
|
46
|
+
context, namespace = select_context_and_namespace(
|
|
47
|
+
context=context,
|
|
48
|
+
namespace=namespace,
|
|
49
|
+
)
|
|
26
50
|
|
|
27
|
-
|
|
51
|
+
running_servers = find_running_service_names(
|
|
52
|
+
instance_type=InstanceType.SERVER,
|
|
53
|
+
only_system_folders=system_folders,
|
|
54
|
+
only_user_folders=not system_folders,
|
|
28
55
|
context=context,
|
|
29
56
|
namespace=namespace,
|
|
30
57
|
)
|
|
31
58
|
|
|
59
|
+
if not running_servers:
|
|
60
|
+
error("No running servers found.")
|
|
61
|
+
return
|
|
62
|
+
|
|
63
|
+
if all_servers:
|
|
64
|
+
for server in running_servers:
|
|
65
|
+
_stop_server(server["name"], namespace, context)
|
|
66
|
+
else:
|
|
67
|
+
if not name:
|
|
68
|
+
server_name = select_running_service(running_servers, InstanceType.SERVER)
|
|
69
|
+
else:
|
|
70
|
+
ctx = get_context(InstanceType.SERVER, name, system_folders)
|
|
71
|
+
server_name = ctx.helm_release_name
|
|
72
|
+
|
|
73
|
+
if server_name in running_servers:
|
|
74
|
+
_stop_server(server_name, namespace, context)
|
|
75
|
+
info(f"Stopped the {Fore.GREEN}{server_name}{Style.RESET_ALL} server.")
|
|
76
|
+
else:
|
|
77
|
+
error(f"{Fore.RED}{name}{Style.RESET_ALL} is not running?!")
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def _stop_server(server_name: str, namespace: str, context: str) -> None:
|
|
81
|
+
info(f"Stopping server {server_name}...")
|
|
82
|
+
|
|
32
83
|
# uninstall the helm release
|
|
33
|
-
info("Stopping server...")
|
|
34
|
-
release_name = f"{ctx.name}-{ctx.instance_type}"
|
|
35
84
|
helm_uninstall(
|
|
36
|
-
release_name=
|
|
85
|
+
release_name=server_name,
|
|
37
86
|
context=context,
|
|
38
87
|
namespace=namespace,
|
|
39
88
|
)
|
|
40
89
|
|
|
41
90
|
# stop the port forwarding for server and UI
|
|
42
91
|
stop_port_forward(
|
|
43
|
-
service_name=f"{
|
|
92
|
+
service_name=f"{server_name}-vantage6-server-service",
|
|
44
93
|
)
|
|
45
94
|
|
|
46
95
|
stop_port_forward(
|
|
47
|
-
service_name=f"{
|
|
96
|
+
service_name=f"{server_name}-vantage6-frontend-service",
|
|
48
97
|
)
|
|
49
98
|
|
|
50
|
-
info("Server stopped successfully.")
|
|
99
|
+
info(f"Server {server_name} stopped successfully.")
|
|
@@ -1,22 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{{
|
|
1
|
+
# Override the chart name
|
|
2
|
+
nameOverride: {{ nameOverride | default('vantage6-store') }}
|
|
3
|
+
# Optional, by default the Release.Namespace is used
|
|
4
|
+
# namespace: vantage6-store
|
|
5
|
+
store:
|
|
6
|
+
|
|
7
|
+
# The description of the store
|
|
8
|
+
description: {{ store.description | default('Vantage algorithm store version 5') }}
|
|
9
|
+
|
|
10
|
+
api_path: {{ store.api_path | default('/store') }}
|
|
11
|
+
|
|
12
|
+
# Keycloak configuration
|
|
13
|
+
keycloakUrl: {{ store.keycloakUrl }}
|
|
14
|
+
keycloakRealm: {{ store.keycloakRealm | default('vantage6') }}
|
|
15
|
+
keycloakAdminUsername: {{ store.keycloakAdminUsername | default('admin') }}
|
|
16
|
+
keycloakAdminPassword: {{ store.keycloakAdminPassword | default('admin') }}
|
|
17
|
+
keycloakAdminClient: {{ store.keycloakAdminClient | default('backend-admin-client') }}
|
|
18
|
+
keycloakAdminClientSecret: {{ store.keycloakAdminClientSecret | default('myadminclientsecret') }}
|
|
19
|
+
|
|
20
|
+
vantage6ServerUri: {{ store.vantage6ServerUri | default('http://localhost:7601/server') }}
|
|
21
|
+
|
|
22
|
+
image: {{ store.image | default('harbor2.vantage6.ai/infrastructure/store:latest') }}
|
|
23
|
+
|
|
24
|
+
replications: {{ store.replications | default(1) }}
|
|
25
|
+
|
|
26
|
+
policies:
|
|
27
|
+
# Set who is allowed to view the algorithms in the store. Possible values are:
|
|
28
|
+
# - "public": everyone can view the algorithms
|
|
29
|
+
# - "authenticated": users with a token valid for this store can view the algorithms
|
|
30
|
+
# - "private": only users with explicit permission in the algorithm store can view the
|
|
31
|
+
# algorithms
|
|
32
|
+
{% if store.policies is defined %}
|
|
33
|
+
algorithmView: {{ store.policies.algorithmView | default('public') }}
|
|
34
|
+
{% else %}
|
|
35
|
+
algorithmView: public
|
|
36
|
+
{% endif %}
|
|
37
|
+
|
|
38
|
+
# Set the minimum number of reviewers that need to approve an algorithm before it
|
|
39
|
+
# is available in the store. In case this number is lower than min_reviewing_organizations,
|
|
40
|
+
# the min_reviewing_organizations still has to be met to proceed with the review process.
|
|
41
|
+
{% if store.policies is defined %}
|
|
42
|
+
minReviewers: {{ store.policies.minReviewers | default(2) }}
|
|
43
|
+
{% else %}
|
|
44
|
+
minReviewers: 2
|
|
45
|
+
{% endif %}
|
|
46
|
+
|
|
47
|
+
# Define whether or not developers are able to assign reviewers to their own algorithms.
|
|
48
|
+
{% if store.policies is defined %}
|
|
49
|
+
assignReviewOwnAlgorithm: {{ store.policies.assignReviewOwnAlgorithm | default(false) }}
|
|
50
|
+
{% else %}
|
|
51
|
+
assignReviewOwnAlgorithm: false
|
|
52
|
+
{% endif %}
|
|
53
|
+
|
|
54
|
+
# Define the minimum amount of organizations that must be involved in the review process.
|
|
55
|
+
{% if store.policies is defined %}
|
|
56
|
+
minReviewingOrganizations: {{ store.policies.minReviewingOrganizations | default(2) }}
|
|
57
|
+
{% else %}
|
|
58
|
+
minReviewingOrganizations: 2
|
|
59
|
+
{% endif %}
|
|
60
|
+
|
|
61
|
+
# Specify the users that are allowed to review algorithms. This is a list of usernames
|
|
62
|
+
# that identify unique users. This policy works in combination with the permission
|
|
63
|
+
# system. If this policy is not set, all users with the right permissions are allowed
|
|
64
|
+
# to review algorithms.
|
|
65
|
+
{% if store.policies is defined and store.policies.allowedReviewers is defined %}
|
|
66
|
+
allowedReviewers:
|
|
67
|
+
{% for reviewer in store.policies.allowedReviewers %}
|
|
68
|
+
- {{ reviewer }}
|
|
69
|
+
{% endfor %}
|
|
70
|
+
{% else %}
|
|
71
|
+
# allowedReviewers:
|
|
72
|
+
# - some_username
|
|
73
|
+
{% endif %}
|
|
74
|
+
|
|
75
|
+
# Specify the users that are allowed to assign reviews. This is a list of usernames
|
|
76
|
+
# that identify unique users. This policy works in combination with the permission
|
|
77
|
+
# system. If this policy is not set, all users with the right permissions are allowed
|
|
78
|
+
# to assign reviews.
|
|
79
|
+
{% if store.policies is defined and store.policies.allowedReviewAssigners is defined %}
|
|
80
|
+
allowedReviewAssigners:
|
|
81
|
+
{% for assigner in store.policies.allowedReviewAssigners %}
|
|
82
|
+
- {{ assigner }}
|
|
83
|
+
{% endfor %}
|
|
84
|
+
{% else %}
|
|
85
|
+
# allowedReviewAssigners:
|
|
86
|
+
# - some_username
|
|
87
|
+
{% endif %}
|
|
88
|
+
|
|
89
|
+
{% if store.dev is defined %}
|
|
90
|
+
dev:
|
|
91
|
+
host_uri: {{ store.dev.host_uri | default('host.docker.internal') }}
|
|
92
|
+
disable_review: {{ store.dev.disable_review | default(false) }}
|
|
93
|
+
review_own_algorithm: {{ store.dev.review_own_algorithm | default(false) }}
|
|
94
|
+
{% endif %}
|
|
95
|
+
|
|
96
|
+
{% if store.internal is defined %}
|
|
97
|
+
internal:
|
|
98
|
+
port: {{ store.internal.port | default(7602) }}
|
|
99
|
+
{% endif %}
|
|
100
|
+
{% if store.internal is not defined %}
|
|
101
|
+
internal:
|
|
102
|
+
port: 7602
|
|
103
|
+
{% endif %}
|
|
104
|
+
|
|
105
|
+
logging:
|
|
106
|
+
# Controls the logging output level. Could be one of the following
|
|
107
|
+
# levels: CRITICAL, ERROR, WARNING, INFO, DEBUG, NOTSET
|
|
108
|
+
level: {{ store.logging.level | default('INFO') }}
|
|
109
|
+
|
|
110
|
+
# Location to the log file
|
|
111
|
+
file: {{ store.logging.file | default('store.log') }}
|
|
112
|
+
|
|
113
|
+
# Size in kb of a single log file
|
|
114
|
+
max_size: {{ store.logging.max_size | default(1024) }}
|
|
115
|
+
use_console: {{ store.logging.use_console | default(true) }}
|
|
116
|
+
|
|
117
|
+
# Date format for the log file
|
|
118
|
+
datefmt: "{{ store.logging.datefmt | default('%Y-%m-%d %H:%M:%S') }}"
|
|
119
|
+
|
|
120
|
+
# Format for the log file
|
|
121
|
+
format: "{{ store.logging.format | default('%(asctime)s - %(name)-14s - %(levelname)-8s - %(message)s') }}"
|
|
122
|
+
|
|
123
|
+
# Maximum number of log files to keep. Log files are rotated when the size of the
|
|
124
|
+
# current log file exceeds `max_size`.
|
|
125
|
+
backup_count: {{ store.logging.backup_count | default(5) }}
|
|
126
|
+
|
|
127
|
+
# Loggers to include in the log file
|
|
128
|
+
loggers:
|
|
129
|
+
{% if store.logging.loggers is defined %}
|
|
130
|
+
{% for logger in store.logging.loggers %}
|
|
131
|
+
- level: {{ logger.level }}
|
|
132
|
+
name: {{ logger.name }}
|
|
133
|
+
{% endfor %}
|
|
134
|
+
{% endif %}
|
|
135
|
+
{% if store.logging.loggers is not defined %}
|
|
136
|
+
- level: warning
|
|
137
|
+
name: urllib3
|
|
138
|
+
- level: warning
|
|
139
|
+
name: socketIO-client
|
|
140
|
+
- level: warning
|
|
141
|
+
name: socketio.server
|
|
142
|
+
- level: warning
|
|
143
|
+
name: engineio.server
|
|
144
|
+
- level: warning
|
|
145
|
+
name: sqlalchemy.engine
|
|
146
|
+
{% endif %}
|
|
147
|
+
|
|
148
|
+
# set up with which origins the store should allow CORS requests. The default
|
|
149
|
+
# is to allow all origins. If you want to restrict this, you can specify a list
|
|
150
|
+
# of origins here. Below are examples to allow requests from the Cotopaxi UI, and
|
|
151
|
+
# port 7600 on localhost. Usually, only the UI and the server need to access the
|
|
152
|
+
# store.
|
|
153
|
+
{% if store.cors_allowed_origins is defined %}
|
|
154
|
+
cors_allowed_origins:
|
|
155
|
+
{% for origin in store.cors_allowed_origins %}
|
|
156
|
+
- {{ origin }}
|
|
157
|
+
{% endfor %}
|
|
158
|
+
{% else %}
|
|
159
|
+
# cors_allowed_origins:
|
|
160
|
+
# - https://portal.cotopaxi.vantage6.ai
|
|
161
|
+
# - http://localhost:7600
|
|
162
|
+
{% endif %}
|
|
163
|
+
|
|
164
|
+
database:
|
|
165
|
+
# whether or not to use an external database
|
|
166
|
+
external: {{ database.external | default(false) }}
|
|
167
|
+
{% if database.external is defined and database.external %}
|
|
168
|
+
# the URI of the external database
|
|
169
|
+
uri: {{ database.uri | default('postgresql://vantage6:vantage6@localhost:5432/vantage6') }}
|
|
170
|
+
{% else %}
|
|
171
|
+
# The image of the database
|
|
172
|
+
image:
|
|
173
|
+
{% if database.image is defined %}
|
|
174
|
+
repository: {{ database.image.repository | default('postgres') }}
|
|
175
|
+
tag: {{ database.image.tag | default('13') }}
|
|
176
|
+
{% else %}
|
|
177
|
+
repository: postgres
|
|
178
|
+
tag: 13
|
|
179
|
+
{% endif %}
|
|
180
|
+
|
|
181
|
+
# The username of the database
|
|
182
|
+
username: {{ database.username | default('vantage6') }}
|
|
183
|
+
|
|
184
|
+
# The password of the database
|
|
185
|
+
password: {{ database.password | default('vantage6') }}
|
|
186
|
+
|
|
187
|
+
# The name of the database
|
|
188
|
+
name: {{ database.name | default('vantage6') }}
|
|
189
|
+
|
|
190
|
+
#hostpath of the database mount
|
|
191
|
+
volumePath: {{ database.volumePath }}
|
|
192
|
+
|
|
193
|
+
# The name of the k8s node where the database is running
|
|
194
|
+
k8sNodeName: {{ database.k8sNodeName }}
|
|
195
|
+
{% endif %}
|