vantage6 4.3.4rc3__tar.gz → 4.4.0__tar.gz
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-4.3.4rc3 → vantage6-4.4.0}/PKG-INFO +1 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/setup.py +1 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/tests_cli/test_node_cli.py +1 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/tests_cli/test_server_cli.py +3 -2
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/tests_cli/test_wizard.py +10 -1
- vantage6-4.4.0/vantage6/cli/__build__ +1 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/_version.py +1 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/algorithm/create.py +5 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/algorithm/update.py +18 -5
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/algostore/start.py +2 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/common/start.py +6 -22
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/configuration_manager.py +1 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/configuration_wizard.py +22 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/start.py +6 -12
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/import_.py +2 -8
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/start.py +2 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6.egg-info/PKG-INFO +1 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6.egg-info/requires.txt +3 -3
- vantage6-4.3.4rc3/vantage6/cli/__build__ +0 -1
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/setup.cfg +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/tests_cli/__init__.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/tests_cli/test_example.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/__init__.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/algostore/attach.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/algostore/files.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/algostore/list.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/algostore/new.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/algostore/stop.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/cli.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/common/decorator.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/common/utils.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/context/__init__.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/context/algorithm_store.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/context/base_server.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/context/node.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/context/server.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/dev/create.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/dev/remove.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/dev/start.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/dev/stop.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/globals.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/attach.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/clean.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/common/__init__.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/create_private_key.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/files.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/list.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/new.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/remove.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/set_api_key.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/stop.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/node/version.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/rabbitmq/__init__.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/rabbitmq/definitions.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/rabbitmq/queue_manager.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/rabbitmq/rabbitmq.config +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/attach.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/common/__init__.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/files.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/list.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/new.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/remove.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/shell.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/stop.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/server/version.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/template/node_config.j2 +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/template/server_config.j2 +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/template/server_import_config.j2 +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/test/common/diagnostic_runner.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/test/feature_tester.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/test/integration_test.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6/cli/utils.py +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6.egg-info/SOURCES.txt +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6.egg-info/dependency_links.txt +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6.egg-info/entry_points.txt +0 -0
- {vantage6-4.3.4rc3 → vantage6-4.4.0}/vantage6.egg-info/top_level.txt +0 -0
|
@@ -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_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)
|
|
@@ -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.
|
|
21
|
+
@patch("vantage6.cli.server.start.pull_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)
|
|
@@ -91,9 +91,10 @@ class ServerCLITest(unittest.TestCase):
|
|
|
91
91
|
@patch("docker.DockerClient.containers")
|
|
92
92
|
@patch("vantage6.cli.server.import_.print_log_worker")
|
|
93
93
|
@patch("vantage6.cli.server.import_.click.Path")
|
|
94
|
+
@patch("vantage6.cli.server.import_.pull_image")
|
|
94
95
|
@patch("vantage6.cli.server.import_.check_docker_running", return_value=True)
|
|
95
96
|
@patch("vantage6.cli.common.decorator.get_context")
|
|
96
|
-
def test_import(self, context, docker_check, click_path, log, containers):
|
|
97
|
+
def test_import(self, context, docker_check, pull, click_path, log, containers):
|
|
97
98
|
"""Import entities without errors."""
|
|
98
99
|
click_path.return_value = MagicMock()
|
|
99
100
|
|
|
@@ -71,7 +71,15 @@ class WizardTest(unittest.TestCase):
|
|
|
71
71
|
def test_server_wizard(self):
|
|
72
72
|
with patch(f"{module_path}.q") as q:
|
|
73
73
|
q.prompt.side_effect = self.prompts
|
|
74
|
-
q.confirm.return_value.ask.side_effect = [
|
|
74
|
+
q.confirm.return_value.ask.side_effect = [
|
|
75
|
+
True,
|
|
76
|
+
True,
|
|
77
|
+
True,
|
|
78
|
+
True,
|
|
79
|
+
True,
|
|
80
|
+
True,
|
|
81
|
+
False,
|
|
82
|
+
]
|
|
75
83
|
|
|
76
84
|
config = server_configuration_questionaire("vantage6")
|
|
77
85
|
|
|
@@ -87,6 +95,7 @@ class WizardTest(unittest.TestCase):
|
|
|
87
95
|
"vpn_server",
|
|
88
96
|
"rabbitmq",
|
|
89
97
|
"two_factor_auth",
|
|
98
|
+
"algorithm_stores",
|
|
90
99
|
]
|
|
91
100
|
|
|
92
101
|
for key in keys:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0
|
|
@@ -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, 4, 0, "final", __build__, 0)
|
|
11
11
|
|
|
12
12
|
# Module version stage suffix map
|
|
13
13
|
_specifier_ = {"alpha": "a", "beta": "b", "candidate": "rc", "final": ""}
|
|
@@ -42,6 +42,10 @@ def cli_algorithm_create(name: str, directory: str) -> dict:
|
|
|
42
42
|
"Directory to put the algorithm in:", default=default_dir
|
|
43
43
|
).ask()
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
# Create the template. The `unsafe` flag is used to allow running a Python script
|
|
46
|
+
# after creating the template that cleans up some things.
|
|
47
|
+
run_copy(
|
|
48
|
+
ALGORITHM_TEMPLATE_REPO, directory, data={"algorithm_name": name}, unsafe=True
|
|
49
|
+
)
|
|
46
50
|
info("Template created!")
|
|
47
51
|
info(f"You can find your new algorithm in: {directory}")
|
|
@@ -4,8 +4,9 @@ from pathlib import Path
|
|
|
4
4
|
import click
|
|
5
5
|
import questionary as q
|
|
6
6
|
from copier import run_update
|
|
7
|
+
import copier.errors
|
|
7
8
|
|
|
8
|
-
from vantage6.
|
|
9
|
+
from vantage6.common import info, warning
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
@click.command()
|
|
@@ -17,7 +18,14 @@ from vantage6.cli.utils import info
|
|
|
17
18
|
type=str,
|
|
18
19
|
help="Directory to put the algorithm into",
|
|
19
20
|
)
|
|
20
|
-
|
|
21
|
+
@click.option(
|
|
22
|
+
"--change-answers",
|
|
23
|
+
is_flag=True,
|
|
24
|
+
flag_value=True,
|
|
25
|
+
help="Change answers to questions that were already answered",
|
|
26
|
+
default=False,
|
|
27
|
+
)
|
|
28
|
+
def cli_algorithm_update(directory: str, change_answers: bool) -> dict:
|
|
21
29
|
"""Update an algorithm template
|
|
22
30
|
|
|
23
31
|
When a new version of the algorithm template is released, you can update
|
|
@@ -28,6 +36,11 @@ def cli_algorithm_update(directory: str) -> dict:
|
|
|
28
36
|
default_dir = str(Path(os.getcwd()))
|
|
29
37
|
directory = q.text("Algorithm directory:", default=default_dir).ask()
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
info("Updating template...")
|
|
40
|
+
try:
|
|
41
|
+
run_update(
|
|
42
|
+
directory, overwrite=True, skip_answered=not change_answers, unsafe=True
|
|
43
|
+
)
|
|
44
|
+
info("Template updated!")
|
|
45
|
+
except copier.errors.UserMessageError as exc:
|
|
46
|
+
warning(f"Update failed: {exc}")
|
|
@@ -2,6 +2,7 @@ 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
|
|
5
6
|
from vantage6.cli.common.start import (
|
|
6
7
|
attach_logs,
|
|
7
8
|
check_for_start,
|
|
@@ -9,7 +10,6 @@ from vantage6.cli.common.start import (
|
|
|
9
10
|
mount_config_file,
|
|
10
11
|
mount_database,
|
|
11
12
|
mount_source,
|
|
12
|
-
pull_image,
|
|
13
13
|
)
|
|
14
14
|
from vantage6.cli.globals import AlgoStoreGlobals
|
|
15
15
|
from vantage6.cli.context.algorithm_store import AlgorithmStoreContext
|
|
@@ -54,6 +54,7 @@ def cli_algo_store_start(
|
|
|
54
54
|
|
|
55
55
|
image = get_image(image, ctx, "algorithm-store", DEFAULT_ALGO_STORE_IMAGE)
|
|
56
56
|
|
|
57
|
+
info("Pulling algorithm store image...")
|
|
57
58
|
pull_image(docker_client, image)
|
|
58
59
|
|
|
59
60
|
config_file = "/mnt/config.yaml"
|
|
@@ -11,7 +11,7 @@ from sqlalchemy.engine.url import make_url
|
|
|
11
11
|
from vantage6.common import error, info, warning
|
|
12
12
|
from vantage6.common.context import AppContext
|
|
13
13
|
from vantage6.common.globals import InstanceType, APPNAME, DEFAULT_DOCKER_REGISTRY
|
|
14
|
-
from vantage6.common.docker.addons import check_docker_running
|
|
14
|
+
from vantage6.common.docker.addons import check_docker_running
|
|
15
15
|
from vantage6.cli.context import AlgorithmStoreContext, ServerContext
|
|
16
16
|
from vantage6.cli.common.utils import print_log_worker
|
|
17
17
|
from vantage6.cli.utils import check_config_name_allowed
|
|
@@ -28,6 +28,11 @@ def check_for_start(ctx: AppContext, type_: InstanceType) -> DockerClient:
|
|
|
28
28
|
The context object
|
|
29
29
|
type_ : InstanceType
|
|
30
30
|
The type of instance to check for
|
|
31
|
+
|
|
32
|
+
Returns
|
|
33
|
+
-------
|
|
34
|
+
DockerClient
|
|
35
|
+
A Docker client instance
|
|
31
36
|
"""
|
|
32
37
|
# will print an error if not
|
|
33
38
|
check_docker_running()
|
|
@@ -83,27 +88,6 @@ def get_image(
|
|
|
83
88
|
return image
|
|
84
89
|
|
|
85
90
|
|
|
86
|
-
def pull_image(docker_client: DockerClient, image: str) -> None:
|
|
87
|
-
"""
|
|
88
|
-
Pull the image if it is not already available.
|
|
89
|
-
|
|
90
|
-
Parameters
|
|
91
|
-
----------
|
|
92
|
-
docker : DockerClient
|
|
93
|
-
The docker client
|
|
94
|
-
image : str
|
|
95
|
-
The image name
|
|
96
|
-
"""
|
|
97
|
-
info(f"Pulling latest image '{image}'.")
|
|
98
|
-
try:
|
|
99
|
-
pull_if_newer(docker_client.from_env(), image)
|
|
100
|
-
except Exception as e:
|
|
101
|
-
warning(" ... Getting latest server image failed:")
|
|
102
|
-
warning(f" {e}")
|
|
103
|
-
else:
|
|
104
|
-
info(" ... success!")
|
|
105
|
-
|
|
106
|
-
|
|
107
91
|
def mount_config_file(ctx: AppContext, config_file: str) -> list[docker.types.Mount]:
|
|
108
92
|
"""
|
|
109
93
|
Mount the config file in the container.
|
|
@@ -371,6 +371,28 @@ def server_configuration_questionaire(instance_name: str) -> dict:
|
|
|
371
371
|
"start_with_server": run_rabbit_locally,
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
+
# add algorithm stores to this server
|
|
375
|
+
is_add_community_store = q.confirm(
|
|
376
|
+
"Do you want to make the algorithms from the community algorithm store "
|
|
377
|
+
"available to your users?"
|
|
378
|
+
).ask()
|
|
379
|
+
algorithm_stores = []
|
|
380
|
+
if is_add_community_store:
|
|
381
|
+
algorithm_stores.append(
|
|
382
|
+
{"name": "Community store", "url": "https://store.cotopaxi.vantage6.ai"}
|
|
383
|
+
)
|
|
384
|
+
add_more_stores = q.confirm(
|
|
385
|
+
"Do you want to add more algorithm stores?", default=False
|
|
386
|
+
).ask()
|
|
387
|
+
while add_more_stores:
|
|
388
|
+
store_name = q.text(message="Enter the name of the store:").ask()
|
|
389
|
+
store_url = q.text(message="Enter the URL of the store:").ask()
|
|
390
|
+
algorithm_stores.append({"name": store_name, "url": store_url})
|
|
391
|
+
add_more_stores = q.confirm(
|
|
392
|
+
"Do you want to add more algorithm stores?", default=False
|
|
393
|
+
).ask()
|
|
394
|
+
config["algorithm_stores"] = algorithm_stores
|
|
395
|
+
|
|
374
396
|
return config
|
|
375
397
|
|
|
376
398
|
|
|
@@ -9,6 +9,7 @@ import docker
|
|
|
9
9
|
from colorama import Fore, Style
|
|
10
10
|
|
|
11
11
|
from vantage6.common import warning, error, info, debug, get_database_config
|
|
12
|
+
from vantage6.common.docker.addons import pull_image
|
|
12
13
|
from vantage6.common.globals import (
|
|
13
14
|
APPNAME,
|
|
14
15
|
DEFAULT_DOCKER_REGISTRY,
|
|
@@ -17,7 +18,6 @@ from vantage6.common.globals import (
|
|
|
17
18
|
InstanceType,
|
|
18
19
|
)
|
|
19
20
|
from vantage6.common.docker.addons import (
|
|
20
|
-
pull_if_newer,
|
|
21
21
|
remove_container_if_exists,
|
|
22
22
|
check_docker_running,
|
|
23
23
|
)
|
|
@@ -135,17 +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
|
-
|
|
139
|
-
# docker_client.images.pull(image)
|
|
140
|
-
pull_if_newer(docker.from_env(), image)
|
|
141
|
-
|
|
142
|
-
except Exception as e:
|
|
143
|
-
warning(" ... Getting latest node image failed:")
|
|
144
|
-
warning(f" {e}")
|
|
145
|
-
else:
|
|
146
|
-
info(" ... success!")
|
|
147
|
-
|
|
148
|
-
info("Creating Docker data volume")
|
|
138
|
+
pull_image(docker_client, image)
|
|
149
139
|
|
|
150
140
|
data_volume = docker_client.volumes.create(ctx.docker_volume_name)
|
|
151
141
|
vpn_volume = docker_client.volumes.create(ctx.docker_vpn_volume_name)
|
|
@@ -294,6 +284,9 @@ def cli_node_start(
|
|
|
294
284
|
exit(1)
|
|
295
285
|
env.update(extra_env)
|
|
296
286
|
|
|
287
|
+
# Add extra hosts to the environment
|
|
288
|
+
extra_hosts = ctx.config.get("node_extra_hosts", {})
|
|
289
|
+
|
|
297
290
|
remove_container_if_exists(
|
|
298
291
|
docker_client=docker_client, name=ctx.docker_container_name
|
|
299
292
|
)
|
|
@@ -313,6 +306,7 @@ def cli_node_start(
|
|
|
313
306
|
name=ctx.docker_container_name,
|
|
314
307
|
auto_remove=not keep,
|
|
315
308
|
tty=True,
|
|
309
|
+
extra_hosts=extra_hosts,
|
|
316
310
|
)
|
|
317
311
|
|
|
318
312
|
info("Node container was successfully started!")
|
|
@@ -7,7 +7,7 @@ from sqlalchemy.engine.url import make_url
|
|
|
7
7
|
from vantage6.cli.globals import ServerGlobals
|
|
8
8
|
|
|
9
9
|
from vantage6.common import info, warning
|
|
10
|
-
from vantage6.common.docker.addons import check_docker_running
|
|
10
|
+
from vantage6.common.docker.addons import check_docker_running, pull_image
|
|
11
11
|
from vantage6.common.globals import (
|
|
12
12
|
APPNAME,
|
|
13
13
|
DEFAULT_DOCKER_REGISTRY,
|
|
@@ -77,13 +77,7 @@ def cli_server_import(
|
|
|
77
77
|
"image", f"{DEFAULT_DOCKER_REGISTRY}/{DEFAULT_SERVER_IMAGE}"
|
|
78
78
|
)
|
|
79
79
|
info(f"Pulling latest server image '{image}'.")
|
|
80
|
-
|
|
81
|
-
docker_client.images.pull(image)
|
|
82
|
-
except Exception as e:
|
|
83
|
-
warning(" ... Getting latest node image failed:")
|
|
84
|
-
warning(f" {e}")
|
|
85
|
-
else:
|
|
86
|
-
info(" ... success!")
|
|
80
|
+
pull_image(docker_client, image)
|
|
87
81
|
|
|
88
82
|
info("Creating mounts")
|
|
89
83
|
mounts = [
|
|
@@ -4,6 +4,7 @@ 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
|
|
7
8
|
from vantage6.common.globals import (
|
|
8
9
|
APPNAME,
|
|
9
10
|
DEFAULT_SERVER_IMAGE,
|
|
@@ -22,7 +23,6 @@ from vantage6.cli.common.start import (
|
|
|
22
23
|
get_image,
|
|
23
24
|
mount_database,
|
|
24
25
|
mount_source,
|
|
25
|
-
pull_image,
|
|
26
26
|
)
|
|
27
27
|
|
|
28
28
|
|
|
@@ -90,6 +90,7 @@ def cli_server_start(
|
|
|
90
90
|
# check that log directory exists - or create it
|
|
91
91
|
ctx.log_dir.mkdir(parents=True, exist_ok=True)
|
|
92
92
|
|
|
93
|
+
info("Pulling server image...")
|
|
93
94
|
pull_image(docker_client, image)
|
|
94
95
|
|
|
95
96
|
info("Creating mounts")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
click==8.1.3
|
|
2
2
|
colorama==0.4.6
|
|
3
|
-
copier==
|
|
3
|
+
copier==9.2.0
|
|
4
4
|
docker==6.1.2
|
|
5
5
|
ipython==8.10.0
|
|
6
6
|
jinja2==3.1.3
|
|
@@ -8,8 +8,8 @@ questionary==1.10.0
|
|
|
8
8
|
rich==13.5.2
|
|
9
9
|
schema==0.7.5
|
|
10
10
|
SQLAlchemy==1.4.46
|
|
11
|
-
vantage6-common==4.
|
|
12
|
-
vantage6-client==4.
|
|
11
|
+
vantage6-common==4.4.0
|
|
12
|
+
vantage6-client==4.4.0
|
|
13
13
|
|
|
14
14
|
[dev]
|
|
15
15
|
coverage==6.4.4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|