-
Notifications
You must be signed in to change notification settings - Fork 13
228 lines (211 loc) · 9.49 KB
/
Copy pathdeploy-custom-test.yml
File metadata and controls
228 lines (211 loc) · 9.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
name: Deploy custom test stacks to AWS
on:
push:
branches:
- develop
permissions:
contents: read
id-token: write
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
deploy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- environment: hyp3-ak-fire-safe-test
domain: hyp3-ak-fire-safe-test.asf.alaska.edu
template_bucket: cf-templates-kc34l8cyitfn-us-west-2
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/AK_FIRE_SAFE.yml
job_spec/FIRE_TRACK.yml
job_spec/INSAR_ISCE_BURST.yml
instance_types: r8id.xlarge,r8id.2xlarge,r8id.4xlarge,r8id.8xlarge,r8id.12xlarge,r8id.16xlarge
default_max_vcpus: 640
expanded_max_vcpus: 640
required_surplus: 0
security_environment: ASF
same_account_publishing: true
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
- environment: hyp3-beta-test
domain: hyp3-beta-test.asf.alaska.edu
template_bucket: cf-templates-1qsz358g31bdr-us-west-2
image_tag: latest
product_lifetime_in_days: 30
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/ARTRAFF_RTC.yml
job_spec/NISAR_GUNW.yml
instance_types: r8id.xlarge,r8id.2xlarge,r8id.4xlarge,r8id.8xlarge,r8id.12xlarge,r8id.16xlarge
default_max_vcpus: 640
expanded_max_vcpus: 640
required_surplus: 0
security_environment: ASF
same_account_publishing: false
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
- environment: hyp3-lavas-test
domain: hyp3-lavas-test.asf.alaska.edu
template_bucket: cf-templates-10a5pjrsv3cgo-us-west-2
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/INSAR_ISCE_BURST.yml
job_spec/SRG_GSLC.yml
job_spec/SRG_TIME_SERIES.yml
job_spec/SRG_TS.yml
instance_types: r8id.xlarge,r8id.2xlarge,r8id.4xlarge,r8id.8xlarge,r8id.12xlarge,r8id.16xlarge
default_max_vcpus: 640
expanded_max_vcpus: 640
required_surplus: 0
security_environment: ASF
same_account_publishing: true
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
- environment: hyp3-pism-cloud-test
domain: pism-cloud-test.asf.alaska.edu
template_bucket: cf-templates-1qca1gr649g17-us-west-2
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/PISM_GLACIER_RUN.yml
job_spec/PISM_ISMIP7_GREENLAND_RUN.yml
job_spec/PISM_EXECUTE.yml
instance_types: r8id.8xlarge,r8id.12xlarge,r8id.16xlarge,r8id.24xlarge,r8id.32xlarge,r8id.48xlarge,r8id.96xlarge
default_max_vcpus: 13000 # Max: 13,000
expanded_max_vcpus: 13000 # Max: 13,000
required_surplus: 0
security_environment: ASF
same_account_publishing: true
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
# Here because it doesn't need its own branch (dev is fine) and a whole new workflow file seems too much
- environment: hyp3-pism-cloud-sandbox
domain: pism-cloud-sandbox.asf.alaska.edu
template_bucket: cf-templates-1qca1gr649g17-us-west-2
image_tag: sandbox
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/PISM_GLACIER_RUN.yml
job_spec/PISM_ISMIP7_GREENLAND_RUN.yml
job_spec/PISM_EXECUTE.yml
instance_types: r8id.8xlarge,r8id.12xlarge,r8id.16xlarge,r8id.24xlarge,r8id.32xlarge,r8id.48xlarge,r8id.96xlarge
default_max_vcpus: 13000 # Max: 13,000
expanded_max_vcpus: 13000 # Max: 13,000
required_surplus: 0
security_environment: ASF
same_account_publishing: true
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
- environment: hyp3-pse-test
domain: hyp3-pse-test.asf.alaska.edu
template_bucket: cf-templates-oehzp6swcf0p-us-west-2
image_tag: latest
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/ARTRAFF_RTC.yml
instance_types: r8id.xlarge,r8id.2xlarge,r8id.4xlarge,r8id.8xlarge,r8id.12xlarge,r8id.16xlarge
default_max_vcpus: 640
expanded_max_vcpus: 640
required_surplus: 0
security_environment: ASF
same_account_publishing: true
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
- environment: hyp3-slimsar-test
domain: hyp3-slimsar-test.asf.alaska.edu
template_bucket: cf-templates-1ce4dbsaugtx1-us-west-2
image_tag: test
product_lifetime_in_days: 14
default_credits_per_user: 0
default_application_status: APPROVED
cost_profile: DEFAULT
job_files: >-
job_spec/INSAR_ISCE_BURST.yml
job_spec/SLIMSAR_TDBP.yml
instance_types: r8id.xlarge,r8id.2xlarge,r8id.4xlarge,r8id.8xlarge,r8id.12xlarge,r8id.16xlarge
default_max_vcpus: 640
expanded_max_vcpus: 640
required_surplus: 0
security_environment: ASF
same_account_publishing: true
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
- environment: hyp3-volcsarvatory-test
domain: hyp3-volcsarvatory-test.asf.alaska.edu
template_bucket: cf-templates-1uzy61g1h6omf-us-west-2
image_tag: test
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/NISAR_GUNW.yml
job_spec/VOLCSARVATORY_MULTI_BURST.yml
job_spec/VOLCSARVATORY_MINTPY.yml
instance_types: r8id.xlarge,r8id.2xlarge,r8id.4xlarge,r8id.8xlarge,r8id.12xlarge,r8id.16xlarge
default_max_vcpus: 640
expanded_max_vcpus: 640
required_surplus: 0
security_environment: ASF
same_account_publishing: true
ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
environment:
name: ${{ matrix.environment }}
url: https://${{ matrix.domain }}
steps:
- uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
- uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
- uses: actions/setup-python@v7
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 DomainName '${{ matrix.domain }}' \
--arg CertificateArn '${{ secrets.CERTIFICATE_ARN }}' \
> parameters.json
- uses: ./.github/actions/deploy-hyp3
with:
TEMPLATE_BUCKET: ${{ matrix.template_bucket }}
STACK_NAME: ${{ matrix.environment }}
API_NAME: ${{ matrix.environment }}
CLOUDFORMATION_ROLE_ARN: ${{ secrets.CLOUDFORMATION_ROLE_ARN }}
COST_PROFILE: ${{ matrix.cost_profile }}
JOB_FILES: ${{ matrix.job_files }}
SECURITY_ENVIRONMENT: ${{ matrix.security_environment }}
SAME_ACCOUNT_PUBLISHING: ${{ matrix.same_account_publishing }}
PARAMETER_FILE: parameters.json