Merge pull request #2881 from ASFHyP3/develop #21
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy DAAC prod to AWS | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - environment: hyp3-edc-prod | |
| api_name: hyp3 | |
| template_bucket: cf-templates-118mtzosmrltk-us-west-2 | |
| image_tag: latest | |
| product_lifetime_in_days: 14 | |
| default_credits_per_user: 10000 | |
| default_application_status: APPROVED | |
| cost_profile: EDC | |
| job_files: >- | |
| job_spec/AUTORIFT.yml | |
| job_spec/INSAR_GAMMA.yml | |
| job_spec/RTC_GAMMA.yml | |
| job_spec/INSAR_ISCE_BURST.yml | |
| job_spec/INSAR_ISCE_MULTI_BURST.yml | |
| job_spec/ARIA_S1_GUNW.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: 3000 | |
| expanded_max_vcpus: 5600 | |
| required_surplus: 3500 | |
| security_environment: EDC | |
| ami_id: /ngap/amis/image_id_ecs_al2023_x86 | |
| distribution_url: 'https://d3gm2hf49xd6jj.cloudfront.net' | |
| - environment: hyp3-opera-prod | |
| api_name: hyp3-opera-prod | |
| template_bucket: cf-templates-118mtzosmrltk-us-west-2 | |
| image_tag: latest | |
| product_lifetime_in_days: 14 | |
| default_credits_per_user: 0 | |
| default_application_status: APPROVED | |
| cost_profile: EDC | |
| job_files: >- | |
| job_spec/OPERA_RTC_S1_SLC.yml | |
| instance_types: c6i.2xlarge,c6id.2xlarge,c7i.2xlarge,c6i.4xlarge,c6id.4xlarge,c7i.4xlarge | |
| default_max_vcpus: 10000 | |
| expanded_max_vcpus: 10000 | |
| required_surplus: 0 | |
| security_environment: EDC | |
| ami_id: /ngap/amis/image_id_ecs_al2023_x86 | |
| distribution_url: '' | |
| environment: | |
| name: ${{ matrix.environment }} | |
| steps: | |
| - uses: actions/[email protected] | |
| with: | |
| fetch-depth: 0 | |
| - uses: aws-actions/configure-aws-credentials@v4 | |
| 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-region: ${{ secrets.AWS_REGION }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| - run: | | |
| jq -n '{"Parameters": $ARGS.named}' \ | |
| --arg VpcId '${{ secrets.VPC_ID }}' \ | |
| --arg SubnetIds '${{ secrets.SUBNET_IDS }}' \ | |
| --arg SecretArn '${{ secrets.SECRET_ARN }}' \ | |
| --arg ImageTag '${{ matrix.IMAGE_TAG }}' \ | |
| --arg ProductLifetimeInDays '${{ matrix.product_lifetime_in_days }} ' \ | |
| --arg AuthPublicKey '${{ secrets.AUTH_PUBLIC_KEY }}' \ | |
| --arg DefaultCreditsPerUser '${{ matrix.default_credits_per_user }}' \ | |
| --arg DefaultApplicationStatus '${{ matrix.default_application_status }}' \ | |
| --arg AmiId '${{ matrix.ami_id }}' \ | |
| --arg DefaultMaxvCpus '${{ matrix.default_max_vcpus }}' \ | |
| --arg ExpandedMaxvCpus '${{ matrix.expanded_max_vcpus }}' \ | |
| --arg MonthlyBudget '${{ secrets.MONTHLY_BUDGET }}' \ | |
| --arg RequiredSurplus '${{ matrix.required_surplus }}' \ | |
| --arg InstanceTypes '${{ matrix.instance_types }}' \ | |
| --arg BucketReadPrincipals '${{ secrets.BUCKET_READ_PRINCIPALS }}' \ | |
| --arg DistributionUrl '${{ matrix.distribution_url }}' \ | |
| > parameters.json | |
| - uses: ./.github/actions/deploy-hyp3 | |
| with: | |
| TEMPLATE_BUCKET: ${{ matrix.template_bucket }} | |
| STACK_NAME: ${{ matrix.environment }} | |
| API_NAME: ${{ matrix.api_name }} | |
| CLOUDFORMATION_ROLE_ARN: ${{ secrets.CLOUDFORMATION_ROLE_ARN }} | |
| COST_PROFILE: ${{ matrix.cost_profile }} | |
| JOB_FILES: ${{ matrix.job_files }} | |
| SECURITY_ENVIRONMENT: ${{ matrix.security_environment }} | |
| PARAMETER_FILE: parameters.json |