dayhoff-tools 1.4.16__py3-none-any.whl → 1.4.18__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.

Potentially problematic release.


This version of dayhoff-tools might be problematic. Click here for more details.

@@ -429,6 +429,11 @@ def launch_engine(
429
429
  "-s",
430
430
  help="Boot disk size in GB (default: 50GB, min: 20GB, max: 1000GB)",
431
431
  ),
432
+ availability_zone: Optional[str] = typer.Option(
433
+ None,
434
+ "--az",
435
+ help="Prefer a specific Availability Zone (e.g., us-east-1b). If omitted the service will try all public subnets.",
436
+ ),
432
437
  ):
433
438
  """Launch a new engine instance."""
434
439
  username = check_aws_sso()
@@ -471,6 +476,8 @@ def launch_engine(
471
476
  }
472
477
  if boot_disk_size is not None:
473
478
  request_data["boot_disk_size"] = boot_disk_size
479
+ if availability_zone:
480
+ request_data["availability_zone"] = availability_zone
474
481
 
475
482
  response = make_api_request("POST", "/engines", json_data=request_data)
476
483
 
@@ -1262,20 +1269,25 @@ def create_ami(
1262
1269
  ec2 = boto3.client("ec2", region_name="us-east-1")
1263
1270
 
1264
1271
  try:
1265
- # First, we need to clean up the sentinel file via SSM
1266
- console.print("Cleaning up bootstrap sentinel file...")
1272
+ # First, we need to clean up the instance before snapshotting
1273
+ console.print("Cleaning up instance for AMI creation...")
1267
1274
  ssm = boto3.client("ssm", region_name="us-east-1")
1268
1275
 
1276
+ # Stop SSM, wipe registration, remove sentinel, and clear logs/history
1277
+ cleanup_commands = [
1278
+ "sudo systemctl stop amazon-ssm-agent",
1279
+ "sudo rm -rf /var/lib/amazon/ssm/* /etc/amazon/ssm/*",
1280
+ "sudo rm -f /opt/dayhoff/first_boot_complete.sentinel",
1281
+ "history -c",
1282
+ "sudo rm -rf /tmp/* /var/log/messages /var/log/cloud-init.log",
1283
+ ]
1284
+
1269
1285
  cleanup_response = ssm.send_command(
1270
1286
  InstanceIds=[engine["instance_id"]],
1271
1287
  DocumentName="AWS-RunShellScript",
1272
1288
  Parameters={
1273
- "commands": [
1274
- "sudo rm -f /opt/dayhoff/first_boot_complete.sentinel",
1275
- "history -c",
1276
- "sudo rm -rf /tmp/* /var/log/*",
1277
- ],
1278
- "executionTimeout": ["60"],
1289
+ "commands": cleanup_commands,
1290
+ "executionTimeout": ["120"],
1279
1291
  },
1280
1292
  )
1281
1293
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dayhoff-tools
3
- Version: 1.4.16
3
+ Version: 1.4.18
4
4
  Summary: Common tools for all the repos at Dayhoff Labs
5
5
  Author: Daniel Martin-Alarcon
6
6
  Author-email: dma@dayhofflabs.com
@@ -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=rdNQGSrXmRqwk6_olIPxt2E4anSyDB-yrgNcQc317as,85436
6
+ dayhoff_tools/cli/engine_commands.py,sha256=e7Dkm6QQ0C2nzbldBksvjeOrxAqYB3wC4a8RwjZzsXA,85998
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.4.16.dist-info/METADATA,sha256=2AquY7xrPM_wPzlG98zXepFLURHkpWfJzjJWWQXHjlI,2825
31
- dayhoff_tools-1.4.16.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
- dayhoff_tools-1.4.16.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
33
- dayhoff_tools-1.4.16.dist-info/RECORD,,
30
+ dayhoff_tools-1.4.18.dist-info/METADATA,sha256=uWo9GtGIyOYbWlMuiLGSw2nE94aKmC0RA_TaArPT1b4,2825
31
+ dayhoff_tools-1.4.18.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
+ dayhoff_tools-1.4.18.dist-info/entry_points.txt,sha256=iAf4jteNqW3cJm6CO6czLxjW3vxYKsyGLZ8WGmxamSc,49
33
+ dayhoff_tools-1.4.18.dist-info/RECORD,,