Skip to content

Commit

Permalink
add default_application_status deployment param
Browse files Browse the repository at this point in the history
  • Loading branch information
jtherrmann committed May 7, 2024
1 parent a438d6c commit 0a7707c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/actions/deploy-hyp3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ inputs:
DEFAULT_CREDITS_PER_USER:
description: "The default number of credits given to a new user"
required: true
DEFAULT_APPLICATION_STATUS:
description: "The default status for new user applications."
required: true
COST_PROFILE:
description: "Job spec cost profile"
required: true
Expand Down Expand Up @@ -123,6 +126,7 @@ runs:
$ORIGIN_ACCESS_IDENTITY_ID \
$DISTRIBUTION_URL \
DefaultCreditsPerUser='${{ inputs.DEFAULT_CREDITS_PER_USER }}' \
DefaultApplicationStatus='${{ inputs.DEFAULT_APPLICATION_STATUS }}' \
DefaultMaxvCpus='${{ inputs.DEFAULT_MAX_VCPUS }}' \
ExpandedMaxvCpus='${{ inputs.EXPANDED_MAX_VCPUS }}' \
MonthlyBudget='${{ inputs.MONTHLY_BUDGET }}' \
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-daac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 14
default_credits_per_user: 10000
default_application_status: APPROVED
cost_profile: EDC
deploy_ref: refs/heads/main
job_files: job_spec/AUTORIFT.yml job_spec/INSAR_GAMMA.yml job_spec/RTC_GAMMA.yml job_spec/INSAR_ISCE_BURST.yml
Expand All @@ -40,6 +41,7 @@ jobs:
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 10000
default_application_status: APPROVED
cost_profile: EDC
deploy_ref: refs/heads/develop
job_files: >-
Expand Down Expand Up @@ -88,6 +90,7 @@ jobs:
SECRET_ARN: ${{ secrets.SECRET_ARN }}
CLOUDFORMATION_ROLE_ARN: ${{ secrets.CLOUDFORMATION_ROLE_ARN }}
DEFAULT_CREDITS_PER_USER: ${{ matrix.default_credits_per_user }}
DEFAULT_APPLICATION_STATUS: ${{ matrix.default_application_status }}
COST_PROFILE: ${{ matrix.cost_profile }}
JOB_FILES: ${{ matrix.job_files }}
DEFAULT_MAX_VCPUS: ${{ matrix.default_max_vcpus }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/deploy-enterprise-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
deploy_ref: refs/heads/develop
job_files: >-
Expand All @@ -43,6 +44,7 @@ jobs:
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/ARIA_RAIDER.yml
Expand All @@ -61,6 +63,7 @@ jobs:
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/AUTORIFT_ITS_LIVE.yml
Expand Down Expand Up @@ -106,6 +109,7 @@ jobs:
SECRET_ARN: ${{ secrets.SECRET_ARN }}
CLOUDFORMATION_ROLE_ARN: ${{ secrets.CLOUDFORMATION_ROLE_ARN }}
DEFAULT_CREDITS_PER_USER: ${{ matrix.default_credits_per_user }}
DEFAULT_APPLICATION_STATUS: ${{ matrix.default_application_status }}
COST_PROFILE: ${{ matrix.cost_profile }}
JOB_FILES: ${{ matrix.job_files }}
DEFAULT_MAX_VCPUS: ${{ matrix.default_max_vcpus }}
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/deploy-enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/AUTORIFT_ITS_LIVE.yml
Expand All @@ -38,6 +39,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 180
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/ARIA_RAIDER.yml
Expand All @@ -56,6 +58,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 30
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/INSAR_ISCE.yml
instance_types: c6id.xlarge,c6id.2xlarge,c6id.4xlarge,c6id.8xlarge
Expand All @@ -72,6 +75,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/INSAR_ISCE.yml
instance_types: c6id.xlarge,c6id.2xlarge,c6id.4xlarge,c6id.8xlarge
Expand All @@ -88,6 +92,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 365000
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/INSAR_GAMMA.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand All @@ -104,6 +109,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/RTC_GAMMA.yml job_spec/WATER_MAP.yml job_spec/WATER_MAP_EQ.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand All @@ -120,6 +126,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 90
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/RTC_GAMMA.yml job_spec/WATER_MAP.yml job_spec/WATER_MAP_EQ.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand All @@ -136,6 +143,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 30
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/INSAR_GAMMA.yml job_spec/INSAR_ISCE_BURST.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand All @@ -152,6 +160,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/INSAR_GAMMA.yml job_spec/RTC_GAMMA.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand All @@ -168,6 +177,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/INSAR_GAMMA.yml job_spec/RTC_GAMMA.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand All @@ -184,6 +194,7 @@ jobs:
image_tag: latest
product_lifetime_in_days: 30
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/INSAR_GAMMA.yml job_spec/RTC_GAMMA.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand All @@ -202,6 +213,7 @@ jobs:
# S3 bucket, but maybe we want to allow for a backlog of products-to-be-transferred?
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: job_spec/WATER_MAP.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
Expand Down Expand Up @@ -244,6 +256,7 @@ jobs:
SECRET_ARN: ${{ secrets.SECRET_ARN }}
CLOUDFORMATION_ROLE_ARN: ${{ secrets.CLOUDFORMATION_ROLE_ARN }}
DEFAULT_CREDITS_PER_USER: ${{ matrix.default_credits_per_user }}
DEFAULT_APPLICATION_STATUS: ${{ matrix.default_application_status }}
COST_PROFILE: ${{ matrix.cost_profile }}
JOB_FILES: ${{ matrix.job_files }}
DEFAULT_MAX_VCPUS: ${{ matrix.default_max_vcpus }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-whitelisting-sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 10
# TODO set back to NOT_STARTED
default_application_status: APPROVED
cost_profile: EDC
deploy_ref: refs/heads/whitelisting-sandbox
job_files: >-
Expand Down Expand Up @@ -67,6 +69,7 @@ jobs:
SECRET_ARN: ${{ secrets.SECRET_ARN }}
CLOUDFORMATION_ROLE_ARN: ${{ secrets.CLOUDFORMATION_ROLE_ARN }}
DEFAULT_CREDITS_PER_USER: ${{ matrix.default_credits_per_user }}
DEFAULT_APPLICATION_STATUS: ${{ matrix.default_application_status }}
COST_PROFILE: ${{ matrix.cost_profile }}
JOB_FILES: ${{ matrix.job_files }}
DEFAULT_MAX_VCPUS: ${{ matrix.default_max_vcpus }}
Expand Down
4 changes: 4 additions & 0 deletions apps/api/api-cf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Parameters:
DefaultCreditsPerUser:
Type: Number

DefaultApplicationStatus:
Type: String

SystemAvailable:
Type: String

Expand Down Expand Up @@ -179,6 +182,7 @@ Resources:
AUTH_PUBLIC_KEY: !Ref AuthPublicKey
AUTH_ALGORITHM: !Ref AuthAlgorithm
DEFAULT_CREDITS_PER_USER: !Ref DefaultCreditsPerUser
DEFAULT_APPLICATION_STATUS: !Ref DefaultApplicationStatus
SYSTEM_AVAILABLE: !Ref SystemAvailable
Code: src/
Handler: hyp3_api.lambda_handler.handler
Expand Down

0 comments on commit 0a7707c

Please sign in to comment.