dayhoff-tools 1.3.21__py3-none-any.whl → 1.3.23__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 +11 -9
- {dayhoff_tools-1.3.21.dist-info → dayhoff_tools-1.3.23.dist-info}/METADATA +1 -1
- {dayhoff_tools-1.3.21.dist-info → dayhoff_tools-1.3.23.dist-info}/RECORD +5 -5
- {dayhoff_tools-1.3.21.dist-info → dayhoff_tools-1.3.23.dist-info}/WHEEL +0 -0
- {dayhoff_tools-1.3.21.dist-info → dayhoff_tools-1.3.23.dist-info}/entry_points.txt +0 -0
@@ -532,7 +532,6 @@ def list_engines(
|
|
532
532
|
table.add_column("Type")
|
533
533
|
table.add_column("User")
|
534
534
|
table.add_column("Status")
|
535
|
-
table.add_column("Stage")
|
536
535
|
table.add_column("Disk Usage")
|
537
536
|
table.add_column("Uptime/Since")
|
538
537
|
table.add_column("$/hour", justify="right")
|
@@ -555,15 +554,12 @@ def list_engines(
|
|
555
554
|
time_str = launch_time.strftime("%Y-%m-%d %H:%M")
|
556
555
|
disk_usage = "-"
|
557
556
|
|
558
|
-
stage_display = _colour_stage(stages_map.get(engine["instance_id"], "-"))
|
559
|
-
|
560
557
|
table.add_row(
|
561
558
|
engine["name"],
|
562
559
|
engine["instance_id"],
|
563
560
|
engine["engine_type"],
|
564
561
|
engine["user"],
|
565
562
|
format_status(engine["state"], engine.get("ready")),
|
566
|
-
stage_display,
|
567
563
|
disk_usage,
|
568
564
|
time_str,
|
569
565
|
f"${hourly_cost:.2f}",
|
@@ -808,8 +804,13 @@ def terminate_engine(
|
|
808
804
|
@engine_app.command("ssh")
|
809
805
|
def ssh_engine(
|
810
806
|
name_or_id: str = typer.Argument(help="Engine name or instance ID"),
|
807
|
+
admin: bool = typer.Option(False, "--admin", help="Connect as ec2-user instead of the engine owner user"),
|
811
808
|
):
|
812
|
-
"""Connect to an engine via SSH.
|
809
|
+
"""Connect to an engine via SSH.
|
810
|
+
|
811
|
+
By default the CLI connects using the engine's owner username (the same one stored in the `User` tag).
|
812
|
+
Pass `--admin` to connect with the underlying [`ec2-user`] account for break-glass or debugging.
|
813
|
+
"""
|
813
814
|
username = check_aws_sso()
|
814
815
|
|
815
816
|
# Get all engines to resolve name
|
@@ -825,8 +826,8 @@ def ssh_engine(
|
|
825
826
|
console.print(f"[red]❌ Engine is not running (state: {engine['state']})[/red]")
|
826
827
|
raise typer.Exit(1)
|
827
828
|
|
828
|
-
#
|
829
|
-
ssh_user =
|
829
|
+
# Choose SSH user
|
830
|
+
ssh_user = "ec2-user" if admin else username
|
830
831
|
|
831
832
|
# Update SSH config
|
832
833
|
console.print(f"Updating SSH config for [cyan]{engine['name']}[/cyan] (user: {ssh_user})...")
|
@@ -843,6 +844,7 @@ def config_ssh(
|
|
843
844
|
all_engines: bool = typer.Option(
|
844
845
|
False, "--all", "-a", help="Include all engines from all users"
|
845
846
|
),
|
847
|
+
admin: bool = typer.Option(False, "--admin", help="Generate entries that use ec2-user instead of per-engine owner user"),
|
846
848
|
):
|
847
849
|
"""Update SSH config with available engines."""
|
848
850
|
username = check_aws_sso()
|
@@ -901,8 +903,8 @@ def config_ssh(
|
|
901
903
|
# Add new entries if not cleaning
|
902
904
|
if not clean:
|
903
905
|
for engine in running_engines:
|
904
|
-
#
|
905
|
-
ssh_user =
|
906
|
+
# Determine ssh user based on --admin flag
|
907
|
+
ssh_user = 'ec2-user' if admin else username
|
906
908
|
new_lines.extend(
|
907
909
|
[
|
908
910
|
"",
|
@@ -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=sSgz_4mBDfUazezpbcdW5S5sIsTzDWVSrJBozF-hutw,79904
|
7
7
|
dayhoff_tools/cli/main.py,sha256=rgeEHD9lJ8SBCR34BTLb7gVInHUUdmEBNXAJnq5yEU4,4795
|
8
8
|
dayhoff_tools/cli/swarm_commands.py,sha256=5EyKj8yietvT5lfoz8Zx0iQvVaNgc3SJX1z2zQR6o6M,5614
|
9
9
|
dayhoff_tools/cli/utility_commands.py,sha256=qs8vH9TBFHsOPC3X8cU3qZigM3dDn-2Ytq4o_F2WubU,27874
|
@@ -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=8YbnQ--usrEgDQGfvpV4MrMji55A0rq2hZaOgFGh6ag,15896
|
30
|
-
dayhoff_tools-1.3.
|
31
|
-
dayhoff_tools-1.3.
|
32
|
-
dayhoff_tools-1.3.
|
33
|
-
dayhoff_tools-1.3.
|
30
|
+
dayhoff_tools-1.3.23.dist-info/METADATA,sha256=VTbAe-npnV8ApVkgUpu1z2ALJRZ6psWeAMJsT253mO8,2825
|
31
|
+
dayhoff_tools-1.3.23.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
32
|
+
dayhoff_tools-1.3.23.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
|
33
|
+
dayhoff_tools-1.3.23.dist-info/RECORD,,
|
File without changes
|
File without changes
|