Skip to content

Commit 8a4b210

Browse files
committed
Add dynamic storage parameter
1 parent 12bdf13 commit 8a4b210

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

example-workflows/_conf/default.ini

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,12 @@
2020

2121
# absolute path ('~' expansion allowed) to the parent folder for omx-ecr-helper
2222
# this is an AWS CDK application that is used to retrieve or build container images
23-
# omx_ecr_helper = ~/amazon-omics-tutorials/utils/cdk/omx-ecr-helper
23+
# omx_ecr_helper = ~/amazon-omics-tutorials/utils/cdk/omx-ecr-helper
24+
25+
# run storage type for the run
26+
# possible values are STATIC or DYNAMIC
27+
# run_storage_type=STATIC
28+
29+
# static run storage capacity in GiB.
30+
# value won't be used for dynamic run storage
31+
# run_storage_capacity=1200

example-workflows/_scripts/builder/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
'output_uri': None,
2828
'workflow_role_name': None,
2929
'ecr_registry': None,
30-
'omx_ecr_helper': '~/amazon-omics-tutorials/utils/cdk/omx-ecr-helper'
30+
'omx_ecr_helper': '~/amazon-omics-tutorials/utils/cdk/omx-ecr-helper',
31+
'run_storage_type': 'STATIC',
32+
'run_storage_capacity': '1200'
3133
}
3234

3335
class Builder:
@@ -341,6 +343,9 @@ def build_run(self, workflow_name) -> None:
341343
staging_uri = cfg['staging_uri']
342344
output_uri = cfg['output_uri']
343345
account_id = cfg['account_id']
346+
run_storage_type = cfg['run_storage_type']
347+
run_storage_capacity_string = cfg['run_storage_capacity']
348+
run_storage_capacity = int(run_storage_capacity_string)
344349

345350
with open(f'workflows/{workflow_name}/test.parameters.json', 'r') as f:
346351
test_parameters = f.read()
@@ -366,7 +371,9 @@ def build_run(self, workflow_name) -> None:
366371
name=f"test: {workflow_name}",
367372
roleArn=workflow_role_arn,
368373
outputUri=output_uri,
369-
parameters=test_parameters
374+
parameters=test_parameters,
375+
storageCapacity=run_storage_capacity,
376+
storageType=run_storage_type
370377
)
371378

372379
# write out final test parameters for tracking
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
python-on-whales==0.60.0
2-
PyYAML==6.0
3-
boto3>=1.26.84
2+
PyYAML==6.0.2
3+
boto3>=1.35.91

0 commit comments

Comments
 (0)