Skip to content

Commit

Permalink
make compute env field with name
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewPlayer3 committed Aug 23, 2024
1 parent 8396463 commit e4611e9
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 119 deletions.
7 changes: 3 additions & 4 deletions apps/compute-cf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Resources:

# TODO: Render a compute environment for each job spec.
{% for job_type, job_spec in job_types.items() %}
{{ job_type }}ComputeEnvironment:
{{ job_spec['compute_environment']['name'] }}:
Type: AWS::Batch::ComputeEnvironment
Properties:
ServiceRole: !GetAtt BatchServiceRole.Arn
Expand All @@ -80,10 +80,10 @@ Resources:
MinvCpus: 0 # TODO: vCPU count per instance?
MaxvCpus: !Ref MaxvCpus
InstanceTypes:
{% for instance_type in job_spec['instance_types'] %}
{% for instance_type in job_spec['compute_environment']['instance_types'] %}
- {{ instance_type }}
{% endfor %}
ImageId: {{ job_spec['ami_id'] }}
ImageId: {{ job_spec['compute_environment']['ami_id'] }}
Subnets: !Ref SubnetIds
InstanceRole: !Ref InstanceProfile
SecurityGroupIds:
Expand All @@ -95,7 +95,6 @@ Resources:
Name: !Ref AWS::StackName

{% endfor %}

SchedulingPolicy:
Type: AWS::Batch::SchedulingPolicy

Expand Down
22 changes: 12 additions & 10 deletions job_spec/ARIA_AUTORIFT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,15 @@ AUTORIFT:
secrets:
- EARTHDATA_USERNAME
- EARTHDATA_PASSWORD
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'AriaAutoriftComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/ARIA_RAIDER.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ ARIA_RAIDER:
- RAIDER_HRES_EMAIL
- RAIDER_HRES_API_KEY
- RAIDER_HRES_URL
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'AriaRaiderComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/AUTORIFT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ AUTORIFT:
secrets:
- EARTHDATA_USERNAME
- EARTHDATA_PASSWORD
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'AutoriftComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/AUTORIFT_ITS_LIVE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ AUTORIFT:
- EARTHDATA_PASSWORD
- PUBLISH_ACCESS_KEY_ID
- PUBLISH_SECRET_ACCESS_KEY
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'AutoriftItsLiveComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/INSAR_GAMMA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ INSAR_GAMMA:
secrets:
- EARTHDATA_USERNAME
- EARTHDATA_PASSWORD
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'InsarGammaComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/INSAR_ISCE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,15 @@ INSAR_ISCE:
- RAIDER_HRES_EMAIL
- RAIDER_HRES_API_KEY
- RAIDER_HRES_URL
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'InsarIsceComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/INSAR_ISCE_BURST.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@ INSAR_ISCE_BURST:
secrets:
- EARTHDATA_USERNAME
- EARTHDATA_PASSWORD
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'InsarIsceBurstComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/RTC_GAMMA.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,15 @@ RTC_GAMMA:
secrets:
- EARTHDATA_USERNAME
- EARTHDATA_PASSWORD
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'RtcGammaComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/S1_CORRECTION_ITS_LIVE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@ S1_CORRECTION_TEST:
secrets:
- EARTHDATA_USERNAME
- EARTHDATA_PASSWORD
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'S1CorrectionItsLiveComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
12 changes: 7 additions & 5 deletions job_spec/SRG_GSLC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ SRG_GSLC:
secrets:
- EARTHDATA_USERNAME
- EARTHDATA_PASSWORD
instance_types:
- g4dn.xlarge
- g4dn.2xlarge
- g6.xlarge
ami_id: instance_with_gpu_support.aws.com
compute_environment:
name: 'SrgGslcComputeEnvironment'
instance_types:
- g4dn.xlarge
- g4dn.2xlarge
- g6.xlarge
ami_id: instance_with_gpu_support.aws.com
22 changes: 12 additions & 10 deletions job_spec/WATER_MAP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,15 @@ WATER_MAP:
timeout: 86400
vcpu: 1
memory: 126000
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'WaterMapComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
22 changes: 12 additions & 10 deletions job_spec/WATER_MAP_EQ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,13 +113,15 @@ WATER_MAP_EQ:
timeout: 36000
vcpu: 1
memory: 126000
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com
compute_environment:
name: 'WaterMapEqComputeEnvironment'
instance_types:
- r6id.xlarge
- r6id.2xlarge
- r6id.4xlarge
- r6id.8xlarge
- r6idn.xlarge
- r6idn.2xlarge
- r6idn.4xlarge
- r6idn.8xlarge
ami_id: abc1234abc1234.aws.com

0 comments on commit e4611e9

Please sign in to comment.