Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic changes to deploy Hyp3 #1

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/deploy-hyp3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ inputs:
CLOUDFORMATION_ROLE_ARN:
description: "The CloudFormation role to use for this deployment"
required: true
default: ""
DEFAULT_CREDITS_PER_USER:
description: "The default number of credits given to a new user"
required: true
Expand Down Expand Up @@ -62,6 +63,7 @@ inputs:
ORIGIN_ACCESS_IDENTITY_ID:
description: "ID of the CloudFront Origin Access Identity used to access data in S3 for Earthdata Cloud deployments"
required: true
default: ""
SECURITY_ENVIRONMENT:
description: "Modify resources/configurations for ASF (default), EDC, or JPL security environments"
required: true
Expand Down
59 changes: 19 additions & 40 deletions .github/workflows/deploy-daac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- develop
- cs/hyp3-testing

concurrency: ${{ github.workflow }}-${{ github.ref }}

Expand All @@ -15,52 +16,28 @@ jobs:
fail-fast: false
matrix:
include:
- environment: hyp3-edc-prod
domain: ''
- environment: hyp3-testing
domain: services-hyp3.asf.alaska.edu
api_name: hyp3
template_bucket: cf-templates-118mtzosmrltk-us-west-2
template_bucket: services-hyp3-artifacts
image_tag: latest
product_lifetime_in_days: 14
default_credits_per_user: 10000
default_application_status: APPROVED
cost_profile: EDC
cost_profile: DEFAULT
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
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
default_max_vcpus: 1500
expanded_max_vcpus: 3000
required_surplus: 2000
security_environment: EDC
ami_id: /ngap/amis/image_id_ecs_al2023_x86
distribution_url: 'https://d3gm2hf49xd6jj.cloudfront.net'

- environment: hyp3-edc-uat
domain: ''
api_name: hyp3-test
template_bucket: cf-templates-118ylv0o6jp2n-us-west-2
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: >-
job_spec/AUTORIFT.yml
job_spec/INSAR_GAMMA.yml
job_spec/RTC_GAMMA.yml
job_spec/INSAR_ISCE_BURST.yml
job_spec/OPERA_DISP_TMS.yml
instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge
default_max_vcpus: 1500
expanded_max_vcpus: 3000
required_surplus: 2000
security_environment: EDC
ami_id: /ngap/amis/image_id_ecs_al2023_x86
distribution_url: 'https://d1riv60tezqha9.cloudfront.net'
default_max_vcpus: 1500 # If these are the same, you don't have to worry about MONTHLY_BUDGET.
expanded_max_vcpus: 1500
required_surplus: 0
security_environment: ASF
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
# ami_id: /ngap/amis/image_id_ecs_al2023_x86
distribution_url: ''
# distribution_url: 'https://d3gm2hf49xd6jj.cloudfront.net'

environment:
name: ${{ matrix.environment }}
Expand All @@ -73,15 +50,15 @@ jobs:
with:
aws-access-key-id: ${{ secrets.V2_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.V2_AWS_SECRET_ACCESS_KEY }}
aws-session-token: ${{ secrets.V2_AWS_SESSION_TOKEN }}
# aws-session-token: ${{ secrets.V2_AWS_SESSION_TOKEN }}
aws-region: ${{ secrets.AWS_REGION }}

- uses: actions/setup-python@v5
with:
python-version: 3.13

- uses: ./.github/actions/deploy-hyp3
if: github.ref == matrix.deploy_ref
# if: github.ref == matrix.deploy_ref
with:
TEMPLATE_BUCKET: ${{ matrix.template_bucket }}
STACK_NAME: ${{ matrix.environment }}
Expand All @@ -93,7 +70,8 @@ jobs:
VPC_ID: ${{ secrets.VPC_ID }}
SUBNET_IDS: ${{ secrets.SUBNET_IDS }}
SECRET_ARN: ${{ secrets.SECRET_ARN }}
CLOUDFORMATION_ROLE_ARN: ${{ secrets.CLOUDFORMATION_ROLE_ARN }}
## Made default "", since actions don't allow empty secrets in console:
# 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 }}
Expand All @@ -102,7 +80,8 @@ jobs:
EXPANDED_MAX_VCPUS: ${{ matrix.expanded_max_vcpus }}
MONTHLY_BUDGET: ${{ secrets.MONTHLY_BUDGET }}
REQUIRED_SURPLUS: ${{ matrix.required_surplus }}
ORIGIN_ACCESS_IDENTITY_ID: ${{ secrets.ORIGIN_ACCESS_IDENTITY_ID }}
## Made default "", since actions don't allow empty secrets in console:
# ORIGIN_ACCESS_IDENTITY_ID: ${{ secrets.ORIGIN_ACCESS_IDENTITY_ID }}
SECURITY_ENVIRONMENT: ${{ matrix.security_environment }}
AMI_ID: ${{ matrix.ami_id }}
INSTANCE_TYPES: ${{ matrix.instance_types }}
Expand Down
Loading