vantage6 4.5.4__py3-none-any.whl → 4.6.0rc3__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.
- tests_cli/test_node_cli.py +1 -1
- tests_cli/test_server_cli.py +1 -1
- tests_cli/test_wizard.py +11 -2
- vantage6/cli/__build__ +1 -1
- vantage6/cli/_version.py +1 -1
- vantage6/cli/algostore/start.py +2 -2
- vantage6/cli/common/start.py +92 -2
- vantage6/cli/configuration_wizard.py +108 -35
- vantage6/cli/node/start.py +2 -2
- vantage6/cli/server/start.py +3 -3
- {vantage6-4.5.4.dist-info → vantage6-4.6.0rc3.dist-info}/METADATA +3 -3
- {vantage6-4.5.4.dist-info → vantage6-4.6.0rc3.dist-info}/RECORD +15 -15
- {vantage6-4.5.4.dist-info → vantage6-4.6.0rc3.dist-info}/WHEEL +0 -0
- {vantage6-4.5.4.dist-info → vantage6-4.6.0rc3.dist-info}/entry_points.txt +0 -0
- {vantage6-4.5.4.dist-info → vantage6-4.6.0rc3.dist-info}/top_level.txt +0 -0
tests_cli/test_node_cli.py
CHANGED
|
@@ -207,7 +207,7 @@ class NodeCLITest(unittest.TestCase):
|
|
|
207
207
|
self.assertNotEqual(result.exit_code, 0)
|
|
208
208
|
|
|
209
209
|
@patch("docker.DockerClient.volumes")
|
|
210
|
-
@patch("vantage6.cli.node.start.
|
|
210
|
+
@patch("vantage6.cli.node.start.pull_infra_image")
|
|
211
211
|
@patch("vantage6.cli.common.decorator.get_context")
|
|
212
212
|
@patch("docker.DockerClient.containers")
|
|
213
213
|
@patch("vantage6.cli.node.start.check_docker_running", return_value=True)
|
tests_cli/test_server_cli.py
CHANGED
|
@@ -18,7 +18,7 @@ class ServerCLITest(unittest.TestCase):
|
|
|
18
18
|
@patch("vantage6.cli.server.start.NetworkManager")
|
|
19
19
|
@patch("vantage6.cli.server.start.docker.types.Mount")
|
|
20
20
|
@patch("os.makedirs")
|
|
21
|
-
@patch("vantage6.cli.server.start.
|
|
21
|
+
@patch("vantage6.cli.server.start.pull_infra_image")
|
|
22
22
|
@patch("vantage6.cli.common.decorator.get_context")
|
|
23
23
|
@patch("vantage6.cli.server.start.docker.from_env")
|
|
24
24
|
@patch("vantage6.cli.common.start.check_docker_running", return_value=True)
|
tests_cli/test_wizard.py
CHANGED
|
@@ -9,7 +9,7 @@ from vantage6.cli.configuration_wizard import (
|
|
|
9
9
|
configuration_wizard,
|
|
10
10
|
select_configuration_questionaire,
|
|
11
11
|
)
|
|
12
|
-
from vantage6.common.globals import InstanceType
|
|
12
|
+
from vantage6.common.globals import InstanceType, NodePolicy
|
|
13
13
|
|
|
14
14
|
module_path = "vantage6.cli.configuration_wizard"
|
|
15
15
|
|
|
@@ -39,8 +39,14 @@ class WizardTest(unittest.TestCase):
|
|
|
39
39
|
False, # don't enable two-factor authentication
|
|
40
40
|
True, # add VPN server
|
|
41
41
|
True, # add algorithm policies
|
|
42
|
+
True, # add single algorithms to allowed_algorithms
|
|
42
43
|
"some-image", # algorithm image to whitelist
|
|
43
44
|
False, # don't add another algorithm image
|
|
45
|
+
True, # add algorithm stores to allowed_algorithm_stores
|
|
46
|
+
"some-store", # algorithm store to whitelist
|
|
47
|
+
False, # don't add another algorithm store
|
|
48
|
+
False, # answer question on combining policies on store level and
|
|
49
|
+
# single algorithm level
|
|
44
50
|
False, # don't abort if no server connection is made to pull
|
|
45
51
|
# collaboration settings
|
|
46
52
|
True, # Enable encryption
|
|
@@ -61,7 +67,10 @@ class WizardTest(unittest.TestCase):
|
|
|
61
67
|
]
|
|
62
68
|
for key in keys:
|
|
63
69
|
self.assertIn(key, config)
|
|
64
|
-
nested_keys = [
|
|
70
|
+
nested_keys = [
|
|
71
|
+
["policies", NodePolicy.ALLOWED_ALGORITHMS],
|
|
72
|
+
["policies", NodePolicy.ALLOWED_ALGORITHM_STORES],
|
|
73
|
+
]
|
|
65
74
|
for nesting in nested_keys:
|
|
66
75
|
current_config = config
|
|
67
76
|
for key in nesting:
|
vantage6/cli/__build__
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3
|
vantage6/cli/_version.py
CHANGED
|
@@ -7,7 +7,7 @@ with open(os.path.join(here, "__build__")) as fp:
|
|
|
7
7
|
__build__ = json.load(fp)
|
|
8
8
|
|
|
9
9
|
# Module version
|
|
10
|
-
version_info = (4,
|
|
10
|
+
version_info = (4, 6, 0, "candidate", __build__, 0)
|
|
11
11
|
|
|
12
12
|
# Module version stage suffix map
|
|
13
13
|
_specifier_ = {"alpha": "a", "beta": "b", "candidate": "rc", "final": ""}
|
vantage6/cli/algostore/start.py
CHANGED
|
@@ -2,7 +2,6 @@ import click
|
|
|
2
2
|
|
|
3
3
|
from vantage6.common import info
|
|
4
4
|
from vantage6.common.globals import APPNAME, DEFAULT_ALGO_STORE_IMAGE, InstanceType
|
|
5
|
-
from vantage6.common.docker.addons import pull_image
|
|
6
5
|
from vantage6.cli.common.start import (
|
|
7
6
|
attach_logs,
|
|
8
7
|
check_for_start,
|
|
@@ -10,6 +9,7 @@ from vantage6.cli.common.start import (
|
|
|
10
9
|
mount_config_file,
|
|
11
10
|
mount_database,
|
|
12
11
|
mount_source,
|
|
12
|
+
pull_infra_image,
|
|
13
13
|
)
|
|
14
14
|
from vantage6.cli.globals import AlgoStoreGlobals
|
|
15
15
|
from vantage6.cli.context.algorithm_store import AlgorithmStoreContext
|
|
@@ -55,7 +55,7 @@ def cli_algo_store_start(
|
|
|
55
55
|
image = get_image(image, ctx, "algorithm-store", DEFAULT_ALGO_STORE_IMAGE)
|
|
56
56
|
|
|
57
57
|
info("Pulling algorithm store image...")
|
|
58
|
-
|
|
58
|
+
pull_infra_image(docker_client, image, InstanceType.ALGORITHM_STORE)
|
|
59
59
|
|
|
60
60
|
config_file = "/mnt/config.yaml"
|
|
61
61
|
mounts = mount_config_file(ctx, config_file)
|
vantage6/cli/common/start.py
CHANGED
|
@@ -10,8 +10,16 @@ from sqlalchemy.engine.url import make_url
|
|
|
10
10
|
|
|
11
11
|
from vantage6.common import error, info, warning
|
|
12
12
|
from vantage6.common.context import AppContext
|
|
13
|
-
from vantage6.common.globals import
|
|
14
|
-
|
|
13
|
+
from vantage6.common.globals import (
|
|
14
|
+
DEFAULT_ALGO_STORE_IMAGE,
|
|
15
|
+
DEFAULT_NODE_IMAGE,
|
|
16
|
+
DEFAULT_SERVER_IMAGE,
|
|
17
|
+
DEFAULT_UI_IMAGE,
|
|
18
|
+
InstanceType,
|
|
19
|
+
APPNAME,
|
|
20
|
+
DEFAULT_DOCKER_REGISTRY,
|
|
21
|
+
)
|
|
22
|
+
from vantage6.common.docker.addons import check_docker_running, pull_image
|
|
15
23
|
from vantage6.cli.context import AlgorithmStoreContext, ServerContext
|
|
16
24
|
from vantage6.cli.common.utils import print_log_worker
|
|
17
25
|
from vantage6.cli.utils import check_config_name_allowed
|
|
@@ -88,6 +96,88 @@ def get_image(
|
|
|
88
96
|
return image
|
|
89
97
|
|
|
90
98
|
|
|
99
|
+
def pull_infra_image(
|
|
100
|
+
client: DockerClient, image: str, instance_type: InstanceType
|
|
101
|
+
) -> None:
|
|
102
|
+
"""
|
|
103
|
+
Try to pull an infrastructure image. If the image is a default infrastructure image,
|
|
104
|
+
exit if in cannot be pulled. If it is not a default image, exit if it cannot be
|
|
105
|
+
pulled and it is also not available locally. If a local image is available, a
|
|
106
|
+
warning is printed.
|
|
107
|
+
|
|
108
|
+
Parameters
|
|
109
|
+
----------
|
|
110
|
+
client : DockerClient
|
|
111
|
+
The Docker client
|
|
112
|
+
image : str
|
|
113
|
+
The image name to pull
|
|
114
|
+
instance_type : InstanceType
|
|
115
|
+
The type of instance to pull the image for
|
|
116
|
+
"""
|
|
117
|
+
try:
|
|
118
|
+
pull_image(client, image, suppress_error=True)
|
|
119
|
+
except docker.errors.APIError:
|
|
120
|
+
if not is_default_infra_image(image, instance_type):
|
|
121
|
+
if image_exists_locally(client, image):
|
|
122
|
+
warning("Failed to pull infrastructure image! Will use local image...")
|
|
123
|
+
else:
|
|
124
|
+
error("Failed to pull infrastructure image!")
|
|
125
|
+
error("Image also not found locally. Exiting...")
|
|
126
|
+
exit(1)
|
|
127
|
+
else:
|
|
128
|
+
error("Failed to pull infrastructure image! Exiting...")
|
|
129
|
+
exit(1)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def is_default_infra_image(image: str, instance_type: InstanceType) -> bool:
|
|
133
|
+
"""
|
|
134
|
+
Check if an infrastructure image is the default image.
|
|
135
|
+
|
|
136
|
+
Parameters
|
|
137
|
+
----------
|
|
138
|
+
image : str
|
|
139
|
+
The image name to check
|
|
140
|
+
instance_type : InstanceType
|
|
141
|
+
The type of instance to check the image for
|
|
142
|
+
|
|
143
|
+
Returns
|
|
144
|
+
-------
|
|
145
|
+
bool
|
|
146
|
+
True if the image is the default image, False otherwise
|
|
147
|
+
"""
|
|
148
|
+
if instance_type == InstanceType.SERVER:
|
|
149
|
+
return image == f"{DEFAULT_DOCKER_REGISTRY}/{DEFAULT_SERVER_IMAGE}"
|
|
150
|
+
elif instance_type == InstanceType.ALGORITHM_STORE:
|
|
151
|
+
return image == f"{DEFAULT_DOCKER_REGISTRY}/{DEFAULT_ALGO_STORE_IMAGE}"
|
|
152
|
+
elif instance_type == InstanceType.UI:
|
|
153
|
+
return image == f"{DEFAULT_DOCKER_REGISTRY}/{DEFAULT_UI_IMAGE}"
|
|
154
|
+
elif instance_type == InstanceType.NODE:
|
|
155
|
+
return image == f"{DEFAULT_DOCKER_REGISTRY}/{DEFAULT_NODE_IMAGE}"
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def image_exists_locally(client: DockerClient, image: str) -> bool:
|
|
159
|
+
"""
|
|
160
|
+
Check if the image exists locally.
|
|
161
|
+
|
|
162
|
+
Parameters
|
|
163
|
+
----------
|
|
164
|
+
client : DockerClient
|
|
165
|
+
The Docker client
|
|
166
|
+
image : str
|
|
167
|
+
The image name to check
|
|
168
|
+
|
|
169
|
+
Returns
|
|
170
|
+
-------
|
|
171
|
+
bool
|
|
172
|
+
True if the image exists locally, False otherwise
|
|
173
|
+
"""
|
|
174
|
+
try:
|
|
175
|
+
client.images.get(image)
|
|
176
|
+
except docker.errors.ImageNotFound:
|
|
177
|
+
return False
|
|
178
|
+
return True
|
|
179
|
+
|
|
180
|
+
|
|
91
181
|
def mount_config_file(ctx: AppContext, config_file: str) -> list[docker.types.Mount]:
|
|
92
182
|
"""
|
|
93
183
|
Mount the config file in the container.
|
|
@@ -3,7 +3,7 @@ import questionary as q
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
|
|
5
5
|
from vantage6.common import generate_apikey
|
|
6
|
-
from vantage6.common.globals import DATABASE_TYPES, InstanceType
|
|
6
|
+
from vantage6.common.globals import DATABASE_TYPES, InstanceType, NodePolicy
|
|
7
7
|
from vantage6.common.client.node_client import NodeClient
|
|
8
8
|
from vantage6.common.context import AppContext
|
|
9
9
|
from vantage6.common import error, warning, info
|
|
@@ -82,11 +82,6 @@ def node_configuration_questionaire(dirs: dict, instance_name: str) -> dict:
|
|
|
82
82
|
{"label": db_label.get("label"), "uri": db_path.get("uri"), "type": db_type}
|
|
83
83
|
)
|
|
84
84
|
|
|
85
|
-
res = q.select(
|
|
86
|
-
"Which level of logging would you like?",
|
|
87
|
-
choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL", "NOTSET"],
|
|
88
|
-
).ask()
|
|
89
|
-
|
|
90
85
|
is_add_vpn = q.confirm(
|
|
91
86
|
"Do you want to connect to a VPN server?", default=False
|
|
92
87
|
).ask()
|
|
@@ -101,33 +96,41 @@ def node_configuration_questionaire(dirs: dict, instance_name: str) -> dict:
|
|
|
101
96
|
"should always be done for production scenarios.",
|
|
102
97
|
default=True,
|
|
103
98
|
).ask()
|
|
99
|
+
policies = {}
|
|
104
100
|
if is_policies:
|
|
105
|
-
allowed_algorithms = []
|
|
106
|
-
info("Below you can add algorithms that are allowed to run on your node.")
|
|
107
|
-
info(
|
|
108
|
-
"You can use regular expressions to match multiple algorithms, or you can "
|
|
109
|
-
"use strings to provide one algorithm at a time."
|
|
110
|
-
)
|
|
111
|
-
info("Examples:")
|
|
112
|
-
# pylint: disable=W1401
|
|
113
|
-
# flake8: noqa: W605
|
|
114
|
-
info("^harbor2\.vantage6\.ai/demo/average$ Allow the demo average algorithm")
|
|
115
|
-
info(
|
|
116
|
-
"^harbor2\.vantage6\.ai/algorithms/.* Allow all algorithms from "
|
|
117
|
-
"harbor2.vantage6.ai/algorithms"
|
|
118
|
-
)
|
|
119
101
|
info(
|
|
120
|
-
"
|
|
121
|
-
"specific
|
|
102
|
+
"You can limit the algorithms that can run on your node in two ways: by "
|
|
103
|
+
"allowing specific algorithms or by allowing all algorithms in a given "
|
|
104
|
+
"algorithm store."
|
|
122
105
|
)
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
106
|
+
ask_single_algorithms = q.confirm(
|
|
107
|
+
"Do you want to enter a list of allowed algorithms?"
|
|
108
|
+
).ask()
|
|
109
|
+
if ask_single_algorithms:
|
|
110
|
+
policies[NodePolicy.ALLOWED_ALGORITHMS] = _get_allowed_algorithms()
|
|
111
|
+
ask_algorithm_stores = q.confirm(
|
|
112
|
+
"Do you want to allow algorithms from specific algorithm stores?"
|
|
113
|
+
).ask()
|
|
114
|
+
if ask_algorithm_stores:
|
|
115
|
+
policies[NodePolicy.ALLOWED_ALGORITHM_STORES] = (
|
|
116
|
+
_get_allowed_algorithm_stores()
|
|
117
|
+
)
|
|
118
|
+
if ask_single_algorithms and ask_algorithm_stores:
|
|
119
|
+
require_both_whitelists = q.confirm(
|
|
120
|
+
"Do you want to allow only algorithms that are both in the list of "
|
|
121
|
+
"allowed algorithms *AND* are part of one of the allowed algorithm "
|
|
122
|
+
"stores? If not, algorithms will be allowed if they are in either the "
|
|
123
|
+
"list of allowed algorithms or one of the allowed algorithm stores.",
|
|
124
|
+
default=True,
|
|
125
|
+
).ask()
|
|
126
|
+
policies["allow_either_whitelist_or_store"] = not require_both_whitelists
|
|
127
|
+
if policies:
|
|
128
|
+
config["policies"] = policies
|
|
129
|
+
|
|
130
|
+
res = q.select(
|
|
131
|
+
"Which level of logging would you like?",
|
|
132
|
+
choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL", "NOTSET"],
|
|
133
|
+
).ask()
|
|
131
134
|
|
|
132
135
|
config["logging"] = {
|
|
133
136
|
"level": res,
|
|
@@ -182,6 +185,77 @@ def node_configuration_questionaire(dirs: dict, instance_name: str) -> dict:
|
|
|
182
185
|
return config
|
|
183
186
|
|
|
184
187
|
|
|
188
|
+
def _get_allowed_algorithms() -> list[str]:
|
|
189
|
+
"""
|
|
190
|
+
Prompt the user for the allowed algorithms on their node
|
|
191
|
+
|
|
192
|
+
Returns
|
|
193
|
+
-------
|
|
194
|
+
list[str]
|
|
195
|
+
List of allowed algorithms or regular expressions to match them
|
|
196
|
+
"""
|
|
197
|
+
info("Below you can add algorithms that are allowed to run on your node.")
|
|
198
|
+
info(
|
|
199
|
+
"You can use regular expressions to match multiple algorithms, or you can "
|
|
200
|
+
"use strings to provide one algorithm at a time."
|
|
201
|
+
)
|
|
202
|
+
info("Examples:")
|
|
203
|
+
# pylint: disable=W1401
|
|
204
|
+
# flake8: noqa: W605
|
|
205
|
+
info("^harbor2\.vantage6\.ai/demo/average$ Allow the demo average algorithm")
|
|
206
|
+
info(
|
|
207
|
+
"^harbor2\.vantage6\.ai/algorithms/.* Allow all algorithms from "
|
|
208
|
+
"harbor2.vantage6.ai/algorithms"
|
|
209
|
+
)
|
|
210
|
+
info(
|
|
211
|
+
"^harbor2\.vantage6\.ai/demo/average@sha256:82becede...$ Allow a "
|
|
212
|
+
"specific hash of average algorithm"
|
|
213
|
+
)
|
|
214
|
+
allowed_algorithms = []
|
|
215
|
+
while True:
|
|
216
|
+
algo = q.text(message="Enter your algorithm expression:").ask()
|
|
217
|
+
allowed_algorithms.append(algo)
|
|
218
|
+
if not q.confirm(
|
|
219
|
+
"Do you want to add another algorithm expression?", default=True
|
|
220
|
+
).ask():
|
|
221
|
+
break
|
|
222
|
+
return allowed_algorithms
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
def _get_allowed_algorithm_stores() -> list[str]:
|
|
226
|
+
"""
|
|
227
|
+
Prompt the user for the allowed algorithm stores on their node
|
|
228
|
+
|
|
229
|
+
Returns
|
|
230
|
+
-------
|
|
231
|
+
list[str]
|
|
232
|
+
List of allowed algorithm stores
|
|
233
|
+
"""
|
|
234
|
+
info("Below you can add algorithm stores that are allowed to run on your node.")
|
|
235
|
+
info(
|
|
236
|
+
"You can use regular expressions to match multiple algorithm stores, or you can"
|
|
237
|
+
" use strings to provide one algorithm store at a time."
|
|
238
|
+
)
|
|
239
|
+
info("Examples:")
|
|
240
|
+
info(
|
|
241
|
+
"https://store.cotopaxi.vantage6.ai Allow all algorithms from the "
|
|
242
|
+
"community store"
|
|
243
|
+
)
|
|
244
|
+
info(
|
|
245
|
+
"^https://*\.vantage6\.ai$ Allow all algorithms from any "
|
|
246
|
+
"store hosted on vantage6.ai"
|
|
247
|
+
)
|
|
248
|
+
allowed_algorithm_stores = []
|
|
249
|
+
while True:
|
|
250
|
+
store = q.text(message="Enter the URL of the algorithm store:").ask()
|
|
251
|
+
allowed_algorithm_stores.append(store)
|
|
252
|
+
if not q.confirm(
|
|
253
|
+
"Do you want to add another algorithm store?", default=True
|
|
254
|
+
).ask():
|
|
255
|
+
break
|
|
256
|
+
return allowed_algorithm_stores
|
|
257
|
+
|
|
258
|
+
|
|
185
259
|
def _get_common_server_config(
|
|
186
260
|
instance_type: InstanceType, instance_name: str, include_api_path: bool = True
|
|
187
261
|
) -> dict:
|
|
@@ -435,13 +509,14 @@ def algo_store_configuration_questionaire(instance_name: str) -> dict:
|
|
|
435
509
|
}
|
|
436
510
|
|
|
437
511
|
# ask about openness of the algorithm store
|
|
512
|
+
config["policies"] = {"allow_localhost": False}
|
|
438
513
|
is_open = q.confirm(
|
|
439
514
|
"Do you want to open the algorithm store to the public? This will allow anyone "
|
|
440
515
|
"to view the algorithms, but they cannot modify them.",
|
|
441
516
|
default=False,
|
|
442
517
|
).ask()
|
|
443
518
|
if is_open:
|
|
444
|
-
|
|
519
|
+
open_algos_policy = "public"
|
|
445
520
|
else:
|
|
446
521
|
is_open_to_whitelist = q.confirm(
|
|
447
522
|
"Do you want to allow all users of whitelisted vantage6 servers to access "
|
|
@@ -449,10 +524,8 @@ def algo_store_configuration_questionaire(instance_name: str) -> dict:
|
|
|
449
524
|
" the appropriate permissions to each user individually.",
|
|
450
525
|
default=True,
|
|
451
526
|
).ask()
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
"algorithms_open_to_whitelisted": is_open_to_whitelist,
|
|
455
|
-
}
|
|
527
|
+
open_algos_policy = "whitelisted" if is_open_to_whitelist else "private"
|
|
528
|
+
config["policies"]["algorithm_view"] = open_algos_policy
|
|
456
529
|
|
|
457
530
|
return config
|
|
458
531
|
|
vantage6/cli/node/start.py
CHANGED
|
@@ -8,8 +8,8 @@ import docker
|
|
|
8
8
|
|
|
9
9
|
from colorama import Fore, Style
|
|
10
10
|
|
|
11
|
+
from vantage6.cli.common.start import pull_infra_image
|
|
11
12
|
from vantage6.common import warning, error, info, debug, get_database_config
|
|
12
|
-
from vantage6.common.docker.addons import pull_image
|
|
13
13
|
from vantage6.common.globals import (
|
|
14
14
|
APPNAME,
|
|
15
15
|
DEFAULT_DOCKER_REGISTRY,
|
|
@@ -135,7 +135,7 @@ def cli_node_start(
|
|
|
135
135
|
image = f"{DEFAULT_DOCKER_REGISTRY}/{DEFAULT_NODE_IMAGE}"
|
|
136
136
|
|
|
137
137
|
info(f"Pulling latest node image '{image}'")
|
|
138
|
-
|
|
138
|
+
pull_infra_image(docker_client, image, InstanceType.NODE)
|
|
139
139
|
|
|
140
140
|
data_volume = docker_client.volumes.create(ctx.docker_volume_name)
|
|
141
141
|
vpn_volume = docker_client.volumes.create(ctx.docker_vpn_volume_name)
|
vantage6/cli/server/start.py
CHANGED
|
@@ -4,7 +4,6 @@ from docker.client import DockerClient
|
|
|
4
4
|
|
|
5
5
|
from vantage6.common import info, warning, error
|
|
6
6
|
from vantage6.common.docker.network_manager import NetworkManager
|
|
7
|
-
from vantage6.common.docker.addons import pull_image
|
|
8
7
|
from vantage6.common.globals import (
|
|
9
8
|
APPNAME,
|
|
10
9
|
DEFAULT_SERVER_IMAGE,
|
|
@@ -23,6 +22,7 @@ from vantage6.cli.common.start import (
|
|
|
23
22
|
get_image,
|
|
24
23
|
mount_database,
|
|
25
24
|
mount_source,
|
|
25
|
+
pull_infra_image,
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
|
|
@@ -91,7 +91,7 @@ def cli_server_start(
|
|
|
91
91
|
ctx.log_dir.mkdir(parents=True, exist_ok=True)
|
|
92
92
|
|
|
93
93
|
info("Pulling server image...")
|
|
94
|
-
|
|
94
|
+
pull_infra_image(docker_client, image, InstanceType.SERVER)
|
|
95
95
|
|
|
96
96
|
info("Creating mounts")
|
|
97
97
|
config_file = "/mnt/config.yaml"
|
|
@@ -229,7 +229,7 @@ def _start_ui(client: DockerClient, ctx: ServerContext, ui_port: int) -> None:
|
|
|
229
229
|
# find image to use
|
|
230
230
|
image = get_image(None, ctx, "ui", DEFAULT_UI_IMAGE)
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
pull_infra_image(client, image, InstanceType.UI)
|
|
233
233
|
|
|
234
234
|
# set environment variables
|
|
235
235
|
env_vars = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vantage6
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.6.0rc3
|
|
4
4
|
Summary: vantage6 command line interface
|
|
5
5
|
Home-page: https://github.com/vantage6/vantage6
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -15,8 +15,8 @@ Requires-Dist: questionary ==1.10.0
|
|
|
15
15
|
Requires-Dist: rich ==13.5.2
|
|
16
16
|
Requires-Dist: schema ==0.7.5
|
|
17
17
|
Requires-Dist: SQLAlchemy ==1.4.46
|
|
18
|
-
Requires-Dist: vantage6-common ==4.
|
|
19
|
-
Requires-Dist: vantage6-client ==4.
|
|
18
|
+
Requires-Dist: vantage6-common ==4.6.0rc3
|
|
19
|
+
Requires-Dist: vantage6-client ==4.6.0rc3
|
|
20
20
|
Provides-Extra: dev
|
|
21
21
|
Requires-Dist: coverage ==6.4.4 ; extra == 'dev'
|
|
22
22
|
Requires-Dist: black ; extra == 'dev'
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
tests_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
tests_cli/test_example.py,sha256=0fw_v-lgZEacshWSDwLNyLMA1_xc48bKUGM3ll-n1L0,146
|
|
3
|
-
tests_cli/test_node_cli.py,sha256=
|
|
4
|
-
tests_cli/test_server_cli.py,sha256=
|
|
5
|
-
tests_cli/test_wizard.py,sha256=
|
|
6
|
-
vantage6/cli/__build__,sha256=
|
|
3
|
+
tests_cli/test_node_cli.py,sha256=JH3Jv2wPJuz6VBdQXXGg5ebvpUulfJUwY_7qZyg3GeQ,15943
|
|
4
|
+
tests_cli/test_server_cli.py,sha256=61et2WpcVAr4SAsQTLJEeBy1RnewujMvFgFW6N_i7kg,5863
|
|
5
|
+
tests_cli/test_wizard.py,sha256=eoa0WQ9yw7IjtaeAKzbK8-sOCBGow7gLrhhmUx024p8,4881
|
|
6
|
+
vantage6/cli/__build__,sha256=TgdAhWK-24tgzgXB3s_jrRa3IjCWfeAfZAt-Rym0n84,1
|
|
7
7
|
vantage6/cli/__init__.py,sha256=-Ec-Z7ELDveGdSALXda3qdUGpkuKyJQfhN3eIm7koHE,127
|
|
8
|
-
vantage6/cli/_version.py,sha256=
|
|
8
|
+
vantage6/cli/_version.py,sha256=RdASUJR3IXwYyPFIzwX0ATVXbgNVg_VD8walCppY8gg,700
|
|
9
9
|
vantage6/cli/cli.py,sha256=b5Gvhn4PL4UWShAJB5lHOf37Q_VRUw3UMNgDECZuHHM,5945
|
|
10
10
|
vantage6/cli/configuration_manager.py,sha256=cN4tQpQjLG5GaGrsjEP-5ed_LqvPApIkNkM1J6ai3n0,3588
|
|
11
|
-
vantage6/cli/configuration_wizard.py,sha256=
|
|
11
|
+
vantage6/cli/configuration_wizard.py,sha256=B7Y8HxWenWF62uZAPXptzrlInn_f_Fk8773VcMNyZFI,20591
|
|
12
12
|
vantage6/cli/globals.py,sha256=-d-y-ASioIMhvzVxNATyFOs5cKXGkiWf_75gqiT2B-M,1642
|
|
13
13
|
vantage6/cli/utils.py,sha256=8_PZeihjopYXQU10gMwIKr87yDAq-_z2LKi0BcdhNEc,2365
|
|
14
14
|
vantage6/cli/algorithm/create.py,sha256=2Ks0JnWNldsn9Eg2h_lqn-yIMaJ-OYs-B3cv58tCiIs,1628
|
|
@@ -17,10 +17,10 @@ vantage6/cli/algostore/attach.py,sha256=Gr5Zb320cMdAOOpNbhx459M1YlI9qaCjt8YlSm-w
|
|
|
17
17
|
vantage6/cli/algostore/files.py,sha256=r89VRixK_K-c44qseq58Aa2Dqf1wEf8yompQRN5AVu4,580
|
|
18
18
|
vantage6/cli/algostore/list.py,sha256=owBrU52ANp8oE68Rk1Hhd6yNYqWX-7uREtmCok_wndg,417
|
|
19
19
|
vantage6/cli/algostore/new.py,sha256=9CMYBjHyXPIhOx7wtkFf99-6EHSTG70MRdg8m8VtMUg,2009
|
|
20
|
-
vantage6/cli/algostore/start.py,sha256=
|
|
20
|
+
vantage6/cli/algostore/start.py,sha256=8w-MPlrvOFM9UDpgGYhNB8VA4RlV9rpdpnIkTJFxfl8,3186
|
|
21
21
|
vantage6/cli/algostore/stop.py,sha256=a0kGU1i2DUthpPaM2yVkFkz3SUCQwA4aVMyEp3Z1LgI,1835
|
|
22
22
|
vantage6/cli/common/decorator.py,sha256=7Iwlcc_ekgXJco4tNjEV79ul43Q28OrieiGkvDBeGeE,3625
|
|
23
|
-
vantage6/cli/common/start.py,sha256=
|
|
23
|
+
vantage6/cli/common/start.py,sha256=tjz61lQ9yYf-ZAow_Zm3J17oJVDLSLBdxhfR8Wb9eoo,9255
|
|
24
24
|
vantage6/cli/common/utils.py,sha256=2zp8KfFCNQLfDAhI8pCv35d6hc6xVaBhPyLfwWvJsm8,3992
|
|
25
25
|
vantage6/cli/context/__init__.py,sha256=e8rfY2tCyu6_SLQ-rbVzEHkDtmbnGCZRHFN_HH-2bnA,2683
|
|
26
26
|
vantage6/cli/context/algorithm_store.py,sha256=NsmrgDCTJ10KqQ209Q1sq-hBhuU_4LRqfbj3SZ-ivnU,3938
|
|
@@ -39,7 +39,7 @@ vantage6/cli/node/list.py,sha256=_WZ8EBIEUlzFhVp3cR2MK5FUuQicMEZHhD8npMwKSpM,166
|
|
|
39
39
|
vantage6/cli/node/new.py,sha256=C-ZHQOiOtslOy6mF-G-MuR5E_65GKJW7L4FxxrKojUg,1923
|
|
40
40
|
vantage6/cli/node/remove.py,sha256=9pBWKF1YtvT6j7fDOKAEkGeT57JpJQgHa3uLorA5e4s,3553
|
|
41
41
|
vantage6/cli/node/set_api_key.py,sha256=IX07QwpTGefRC92lqm34HX9xThRVcXl5DcWSLt1Ro6w,1747
|
|
42
|
-
vantage6/cli/node/start.py,sha256=
|
|
42
|
+
vantage6/cli/node/start.py,sha256=SuH-XJh2VYTwidIn_0c2DAhllkq5B885f4qWHEOECEg,11920
|
|
43
43
|
vantage6/cli/node/stop.py,sha256=nassaUq5qVuyRdoNrP_PAbq-l-X1tKUU_UwlYx08e54,3946
|
|
44
44
|
vantage6/cli/node/version.py,sha256=eYJ4ayQsEsHPL00V88UY1LhmlnQCzF-Te4lrw4SFbHQ,1836
|
|
45
45
|
vantage6/cli/node/common/__init__.py,sha256=pketeJOFViQIPpa9nCNe-q_6Mb55BJ2R2k_2jMQOeX4,2862
|
|
@@ -54,7 +54,7 @@ vantage6/cli/server/list.py,sha256=qxBaUFmkP2tNNo9cuZB5OsVg3KD_c9KJDSTC4cxuUOM,4
|
|
|
54
54
|
vantage6/cli/server/new.py,sha256=SGOQXQDNg9ihnPpmJCDTQ-Yn2GkDhEu84dtsQ3v5Pq4,1978
|
|
55
55
|
vantage6/cli/server/remove.py,sha256=2Zjs8Aq3XYNpeaGr5eSJmPCnxbYlyyEQPKSdPaJnAF4,1214
|
|
56
56
|
vantage6/cli/server/shell.py,sha256=9b_koFmBQRQYIK57usm75hZAaIF4msicLTu55dYHlzM,1583
|
|
57
|
-
vantage6/cli/server/start.py,sha256=
|
|
57
|
+
vantage6/cli/server/start.py,sha256=pPlTKPx1ZOGkJhiPYVv_O2sGE3-jdF9-7vwjoGX4XTE,7742
|
|
58
58
|
vantage6/cli/server/stop.py,sha256=A3io-Gopm4vjOfOZYYFze8LQKFtvZBaHx99C_ULnPRk,4018
|
|
59
59
|
vantage6/cli/server/version.py,sha256=AUYp0CJBnYF8tD3HXqE7kM0RycXipjOYEDkraswUlaA,1306
|
|
60
60
|
vantage6/cli/server/common/__init__.py,sha256=htv0mFYa4GhIHdzA2xqUUgKhHcMh09UQERlIjIgrwOM,2062
|
|
@@ -64,8 +64,8 @@ vantage6/cli/template/server_import_config.j2,sha256=PRB0ym_FYjx9vhkmY9C0xzlv_85
|
|
|
64
64
|
vantage6/cli/test/feature_tester.py,sha256=vTmJrqjA6J_GFWvZDmin4Nx1AO2Mhy21YacTr2vZi2U,2497
|
|
65
65
|
vantage6/cli/test/integration_test.py,sha256=DT3qjl1lq7nVBflT5ed1Yu2aNT1cwHCqh8_hafi4e2k,3802
|
|
66
66
|
vantage6/cli/test/common/diagnostic_runner.py,sha256=x_4ikihgoSTKI914pqlgVziBSg5LpV6MheO6O_GBCeA,6657
|
|
67
|
-
vantage6-4.
|
|
68
|
-
vantage6-4.
|
|
69
|
-
vantage6-4.
|
|
70
|
-
vantage6-4.
|
|
71
|
-
vantage6-4.
|
|
67
|
+
vantage6-4.6.0rc3.dist-info/METADATA,sha256=Ajm9lyRJTSUuwzSpbcU269bf3b9V8qWdHeGebYBOlk0,10227
|
|
68
|
+
vantage6-4.6.0rc3.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
69
|
+
vantage6-4.6.0rc3.dist-info/entry_points.txt,sha256=YFBvwjxoeAGxYyPC-YevEgOBBYRGaXkS6jiOGGCLNy0,157
|
|
70
|
+
vantage6-4.6.0rc3.dist-info/top_level.txt,sha256=CYDIBS8jEfFq5YCs_Fuit54K9-3wdosZppTrsymIoUk,19
|
|
71
|
+
vantage6-4.6.0rc3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|