kalavai-client 0.6.18__tar.gz → 0.6.19__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.
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/PKG-INFO +1 -1
- kalavai_client-0.6.19/kalavai_client/__init__.py +2 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/docker-compose-gui.yaml +1 -1
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/cli.py +12 -20
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/core.py +18 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/utils.py +1 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/pyproject.toml +1 -1
- kalavai_client-0.6.18/kalavai_client/__init__.py +0 -2
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/LICENSE +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/README.md +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/__main__.py +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/__init__.py +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/apps.yaml +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/apps_values.yaml +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/docker-compose-template.yaml +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/nginx.conf +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/pool_config_template.yaml +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/pool_config_values.yaml +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/user_workspace.yaml +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/user_workspace_values.yaml +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/auth.py +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/bridge_api.py +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/bridge_models.py +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/cluster.py +0 -0
- {kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/env.py +0 -0
@@ -58,7 +58,8 @@ from kalavai_client.core import (
|
|
58
58
|
stop_pool,
|
59
59
|
uncordon_nodes,
|
60
60
|
TokenType,
|
61
|
-
unregister_pool
|
61
|
+
unregister_pool,
|
62
|
+
update_pool
|
62
63
|
)
|
63
64
|
from kalavai_client.utils import (
|
64
65
|
check_gpu_drivers,
|
@@ -208,7 +209,8 @@ def input_gpus(non_interactive=False):
|
|
208
209
|
def gui__start(
|
209
210
|
*others,
|
210
211
|
log_level="critical",
|
211
|
-
backend_only=False
|
212
|
+
backend_only=False,
|
213
|
+
version="latest"
|
212
214
|
):
|
213
215
|
"""Run GUI (docker) and kalavai core backend (api)"""
|
214
216
|
ports_needed = 1 if backend_only else 3
|
@@ -242,7 +244,8 @@ def gui__start(
|
|
242
244
|
"gui_backend_port": ports[2],
|
243
245
|
"bridge_port": ports[0],
|
244
246
|
"path": user_path("", create_path=True),
|
245
|
-
"protected_access": user_key
|
247
|
+
"protected_access": user_key,
|
248
|
+
"gui_version": version
|
246
249
|
}
|
247
250
|
compose_yaml = load_template(
|
248
251
|
template_path=DOCKER_COMPOSE_GUI,
|
@@ -679,23 +682,12 @@ def pool__update(*others):
|
|
679
682
|
"""
|
680
683
|
Update kalavai pool
|
681
684
|
"""
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
console.log(f"[red]
|
686
|
-
|
687
|
-
|
688
|
-
if not CLUSTER.is_seed_node():
|
689
|
-
console.log("You can only update a pool from the seed node.")
|
690
|
-
return
|
691
|
-
|
692
|
-
# update dependencies
|
693
|
-
try:
|
694
|
-
CLUSTER.update_dependencies(debug=True)
|
695
|
-
console.log("Pool updating. Expect some downtime on core services")
|
696
|
-
except Exception as e:
|
697
|
-
console.log(f"[red]Error when updating pool: {str(e)}")
|
698
|
-
return
|
685
|
+
result = update_pool(debug=True)
|
686
|
+
|
687
|
+
if "error" in result:
|
688
|
+
console.log(f"[red]{result['error']}")
|
689
|
+
else:
|
690
|
+
console.log(f"[green]{result}")
|
699
691
|
|
700
692
|
|
701
693
|
@arguably.command
|
@@ -39,6 +39,7 @@ from kalavai_client.utils import (
|
|
39
39
|
CLUSTER_IP_KEY,
|
40
40
|
CLUSTER_NAME_KEY,
|
41
41
|
AUTH_KEY,
|
42
|
+
USER_ID_KEY,
|
42
43
|
WATCHER_SERVICE_KEY,
|
43
44
|
CLUSTER_TOKEN_KEY,
|
44
45
|
READONLY_AUTH_KEY,
|
@@ -809,6 +810,7 @@ def create_pool(
|
|
809
810
|
values = {
|
810
811
|
CLUSTER_NAME_KEY: cluster_name,
|
811
812
|
CLUSTER_IP_KEY: ip_address,
|
813
|
+
USER_ID_KEY: user_id if user_id is not None else "",
|
812
814
|
AUTH_KEY: auth_key,
|
813
815
|
READONLY_AUTH_KEY: readonly_auth_key,
|
814
816
|
WRITE_AUTH_KEY: write_auth_key,
|
@@ -884,6 +886,22 @@ def create_pool(
|
|
884
886
|
|
885
887
|
return {"success"}
|
886
888
|
|
889
|
+
def update_pool(debug=True):
|
890
|
+
try:
|
891
|
+
CLUSTER.validate_cluster()
|
892
|
+
except Exception as e:
|
893
|
+
return {"error": f"Problems with your pool: {str(e)}"}
|
894
|
+
|
895
|
+
if not CLUSTER.is_seed_node():
|
896
|
+
return {"error": "You can only update a pool from the seed node."}
|
897
|
+
|
898
|
+
# update dependencies
|
899
|
+
try:
|
900
|
+
CLUSTER.update_dependencies(debug=debug)
|
901
|
+
return {"success": "Pool updating. Expect some downtime on core services"}
|
902
|
+
except Exception as e:
|
903
|
+
return {"error": f"[red]Error when updating pool: {str(e)}"}
|
904
|
+
|
887
905
|
|
888
906
|
def get_pool_token(mode: TokenType):
|
889
907
|
|
@@ -36,6 +36,7 @@ NODE_NAME_KEY = "node_name"
|
|
36
36
|
PUBLIC_LOCATION_KEY = "public_location"
|
37
37
|
CLUSTER_NAME_KEY = "cluster_name"
|
38
38
|
AUTH_KEY = "watcher_admin_key"
|
39
|
+
USER_ID_KEY = "kalavai_user_id"
|
39
40
|
WRITE_AUTH_KEY = "watcher_write_key"
|
40
41
|
ALLOW_UNREGISTERED_USER_KEY = "watcher_allow_unregistered_user"
|
41
42
|
NODE_ROLE_LABEL = "kalavai.node_role"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/docker-compose-template.yaml
RENAMED
File without changes
|
File without changes
|
{kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/pool_config_template.yaml
RENAMED
File without changes
|
{kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/pool_config_values.yaml
RENAMED
File without changes
|
File without changes
|
{kalavai_client-0.6.18 → kalavai_client-0.6.19}/kalavai_client/assets/user_workspace_values.yaml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|