-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2502 from ASFHyP3/opera-disp-sandbox
add opera-disp-sandbox
- Loading branch information
Showing
3 changed files
with
164 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Deploy OPERA-DISP Sandbox Stack to AWS | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- environment: hyp3-opera-disp-sandbox | ||
domain: hyp3-opera-disp-sandbox.asf.alaska.edu | ||
template_bucket: cf-templates-1hz9ldhhl4ahu-us-west-2 | ||
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: >- | ||
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: 640 | ||
expanded_max_vcpus: 640 | ||
required_surplus: 0 | ||
security_environment: ASF | ||
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id | ||
distribution_url: '' | ||
|
||
environment: | ||
name: ${{ matrix.environment }} | ||
url: https://${{ matrix.domain }} | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
|
||
- 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.9 | ||
|
||
- uses: ./.github/actions/deploy-hyp3 | ||
with: | ||
TEMPLATE_BUCKET: ${{ matrix.template_bucket }} | ||
STACK_NAME: ${{ matrix.environment }} | ||
DOMAIN_NAME: ${{ matrix.domain }} | ||
API_NAME: ${{ matrix.environment }} | ||
CERTIFICATE_ARN: ${{ secrets.CERTIFICATE_ARN }} | ||
IMAGE_TAG: ${{ matrix.image_tag }} | ||
PRODUCT_LIFETIME: ${{ matrix.product_lifetime_in_days }} | ||
VPC_ID: ${{ secrets.VPC_ID }} | ||
SUBNET_IDS: ${{ secrets.SUBNET_IDS }} | ||
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 }} | ||
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 }} | ||
SECURITY_ENVIRONMENT: ${{ matrix.security_environment }} | ||
AMI_ID: ${{ matrix.ami_id }} | ||
INSTANCE_TYPES: ${{ matrix.instance_types }} | ||
DISTRIBUTION_URL: ${{ matrix.distribution_url }} | ||
AUTH_PUBLIC_KEY: ${{ secrets.AUTH_PUBLIC_KEY }} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
OPERA_DISP_TMS: | ||
required_parameters: | ||
- tile_type | ||
- bounds | ||
- orbit_direction | ||
- start_date | ||
- end_date | ||
parameters: | ||
tile_type: | ||
api_schema: | ||
description: Type of tile map to create | ||
type: string | ||
enum: | ||
- displacement | ||
- secant_velocity | ||
example: displacement | ||
bounds: | ||
api_schema: | ||
description: Integer bounds in EPSG:4326, formatted like (minlon minlat maxlon maxlat) | ||
type: array | ||
minItems: 4 | ||
maxItems: 4 | ||
example: | ||
- -121 | ||
- 38 | ||
- -120 | ||
- 39 | ||
items: | ||
type: integer | ||
example: -121 | ||
orbit_direction: | ||
api_schema: | ||
description: Orbit direction of data | ||
type: string | ||
enum: | ||
- ascending | ||
- descending | ||
example: descending | ||
start_date: | ||
api_schema: | ||
description: Start of secondary date range for which to generate a tile map (%Y%m%d) | ||
type: string | ||
pattern: "^\\d{8}$" | ||
minLength: 8 | ||
maxLength: 8 | ||
example: 20200101 | ||
end_date: | ||
api_schema: | ||
description: End of secondary date range for which to generate a tile map (%Y%m%d) | ||
type: string | ||
pattern: "^\\d{8}$" | ||
minLength: 8 | ||
maxLength: 8 | ||
example: 20200814 | ||
cost_profiles: | ||
DEFAULT: | ||
cost: 1.0 | ||
validators: | ||
- check_bounds_formatting | ||
steps: | ||
- name: '' | ||
image: ghcr.io/asfhyp3/opera-disp-tms | ||
command: | ||
- Ref::tile_type | ||
- Ref::bounds | ||
- Ref::orbit_direction | ||
- Ref::start_date | ||
- Ref::end_date | ||
- --bucket | ||
- '!Ref Bucket' | ||
- --bucket-prefix | ||
- Ref::bucket_prefix | ||
timeout: 10800 | ||
compute_environment: Default | ||
vcpu: 1 | ||
memory: 31500 | ||
secrets: | ||
- EARTHDATA_USERNAME | ||
- EARTHDATA_PASSWORD |