dayhoff-tools 1.5.0__py3-none-any.whl → 1.5.1__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.
- dayhoff_tools/cli/engine_commands.py +26 -0
- {dayhoff_tools-1.5.0.dist-info → dayhoff_tools-1.5.1.dist-info}/METADATA +1 -1
- {dayhoff_tools-1.5.0.dist-info → dayhoff_tools-1.5.1.dist-info}/RECORD +5 -5
- {dayhoff_tools-1.5.0.dist-info → dayhoff_tools-1.5.1.dist-info}/WHEEL +0 -0
- {dayhoff_tools-1.5.0.dist-info → dayhoff_tools-1.5.1.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Engine and Studio management commands for DHT CLI."""
|
|
2
2
|
|
|
3
3
|
import json
|
|
4
|
+
import shutil
|
|
4
5
|
import subprocess
|
|
5
6
|
import sys
|
|
6
7
|
import time
|
|
@@ -365,6 +366,19 @@ def get_ssh_public_key() -> str:
|
|
|
365
366
|
)
|
|
366
367
|
|
|
367
368
|
|
|
369
|
+
def check_session_manager_plugin():
|
|
370
|
+
"""Check if AWS Session Manager Plugin is available and warn if not."""
|
|
371
|
+
if shutil.which("session-manager-plugin") is None:
|
|
372
|
+
console.print(
|
|
373
|
+
"[bold red]⚠️ AWS Session Manager Plugin not found![/bold red]\n"
|
|
374
|
+
"SSH connections to engines require the Session Manager Plugin.\n"
|
|
375
|
+
"Please install it following the setup guide:\n"
|
|
376
|
+
"[link]https://github.com/dayhofflabs/nutshell/blob/main/REFERENCE/setup_guides/new-laptop.md[/link]"
|
|
377
|
+
)
|
|
378
|
+
return False
|
|
379
|
+
return True
|
|
380
|
+
|
|
381
|
+
|
|
368
382
|
def update_ssh_config_entry(engine_name: str, instance_id: str, ssh_user: str):
|
|
369
383
|
"""Add or update a single SSH config entry for the given SSH user."""
|
|
370
384
|
config_path = Path.home() / ".ssh" / "config"
|
|
@@ -850,6 +864,10 @@ def ssh_engine(
|
|
|
850
864
|
Pass `--admin` to connect with the underlying [`ec2-user`] account for break-glass or debugging.
|
|
851
865
|
"""
|
|
852
866
|
username = check_aws_sso()
|
|
867
|
+
|
|
868
|
+
# Check for Session Manager Plugin
|
|
869
|
+
if not check_session_manager_plugin():
|
|
870
|
+
raise typer.Exit(1)
|
|
853
871
|
|
|
854
872
|
# Get all engines to resolve name
|
|
855
873
|
response = make_api_request("GET", "/engines")
|
|
@@ -887,6 +905,10 @@ def config_ssh(
|
|
|
887
905
|
"""Update SSH config with available engines."""
|
|
888
906
|
username = check_aws_sso()
|
|
889
907
|
|
|
908
|
+
# Only check for Session Manager Plugin if we're not just cleaning
|
|
909
|
+
if not clean and not check_session_manager_plugin():
|
|
910
|
+
raise typer.Exit(1)
|
|
911
|
+
|
|
890
912
|
if clean:
|
|
891
913
|
console.print("Removing all managed SSH entries...")
|
|
892
914
|
else:
|
|
@@ -1568,6 +1590,10 @@ def attach_studio(
|
|
|
1568
1590
|
"""Attach your studio to an engine."""
|
|
1569
1591
|
username = check_aws_sso()
|
|
1570
1592
|
|
|
1593
|
+
# Check for Session Manager Plugin since we'll update SSH config
|
|
1594
|
+
if not check_session_manager_plugin():
|
|
1595
|
+
raise typer.Exit(1)
|
|
1596
|
+
|
|
1571
1597
|
# Use specified user if provided, otherwise use current user
|
|
1572
1598
|
target_user = user if user else username
|
|
1573
1599
|
|
|
@@ -3,7 +3,7 @@ dayhoff_tools/chemistry/standardizer.py,sha256=uMn7VwHnx02nc404eO6fRuS4rsl4dvSPf
|
|
|
3
3
|
dayhoff_tools/chemistry/utils.py,sha256=jt-7JgF-GeeVC421acX-bobKbLU_X94KNOW24p_P-_M,2257
|
|
4
4
|
dayhoff_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
dayhoff_tools/cli/cloud_commands.py,sha256=33qcWLmq-FwEXMdL3F0OHm-5Stlh2r65CldyEZgQ1no,40904
|
|
6
|
-
dayhoff_tools/cli/engine_commands.py,sha256=
|
|
6
|
+
dayhoff_tools/cli/engine_commands.py,sha256=FvQTWb43x2Ns5rOW--ryfWkzzqvSzcpExDKyERY53Zk,87320
|
|
7
7
|
dayhoff_tools/cli/main.py,sha256=tRN7WCBHg6uyNp6rA54pKTCoVmBntta2i0Yas3bUpZ4,4853
|
|
8
8
|
dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
|
|
9
9
|
dayhoff_tools/cli/utility_commands.py,sha256=FRZTPrjsG_qmIIqoNxd1Q1vVkS_5w8aY33IrVYVNCLg,18131
|
|
@@ -27,7 +27,7 @@ dayhoff_tools/intake/uniprot.py,sha256=BZYJQF63OtPcBBnQ7_P9gulxzJtqyorgyuDiPeOJq
|
|
|
27
27
|
dayhoff_tools/logs.py,sha256=DKdeP0k0kliRcilwvX0mUB2eipO5BdWUeHwh-VnsICs,838
|
|
28
28
|
dayhoff_tools/sqlite.py,sha256=jV55ikF8VpTfeQqqlHSbY8OgfyfHj8zgHNpZjBLos_E,18672
|
|
29
29
|
dayhoff_tools/warehouse.py,sha256=6HxM8JO8NlYXxXApjptkNfnGrRLMScVeQI_xdFu4His,23062
|
|
30
|
-
dayhoff_tools-1.5.
|
|
31
|
-
dayhoff_tools-1.5.
|
|
32
|
-
dayhoff_tools-1.5.
|
|
33
|
-
dayhoff_tools-1.5.
|
|
30
|
+
dayhoff_tools-1.5.1.dist-info/METADATA,sha256=5NW6Kdr32qJQ6kFkhf0zDSi7ZmuYRMPil638Yg9sWjU,2824
|
|
31
|
+
dayhoff_tools-1.5.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
32
|
+
dayhoff_tools-1.5.1.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
|
|
33
|
+
dayhoff_tools-1.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|