Skip to content

Commit 1936d38

Browse files
tschaffterpre-commit-ci[bot]zaro0508
authored
Update stage environment (#57) (#58)
* [pre-commit.ci] pre-commit autoupdate (#48) updates: - [github.com/PyCQA/flake8: 7.1.0 → 7.1.1](PyCQA/flake8@7.1.0...7.1.1) - [github.com/awslabs/cfn-python-lint: v1.9.0 → v1.15.0](aws-cloudformation/cfn-lint@v1.9.0...v1.15.0) - [github.com/psf/black: 24.4.2 → 24.8.0](psf/black@24.4.2...24.8.0) - [github.com/sirosen/check-jsonschema: 0.29.1 → 0.29.2](python-jsonschema/check-jsonschema@0.29.1...0.29.2) * [IT-3918] Fix the image URLs returned by the image service (#51) * update the config of the image service * use `{fully_qualified_domain_name}` * use an f-string * [pre-commit.ci] pre-commit autoupdate (#52) updates: - [github.com/awslabs/cfn-python-lint: v1.15.0 → v1.15.2](aws-cloudformation/cfn-lint@v1.15.0...v1.15.2) - [github.com/sirosen/check-jsonschema: 0.29.2 → 0.29.3](python-jsonschema/check-jsonschema@0.29.2...0.29.3) * [pre-commit.ci] pre-commit autoupdate (#53) updates: - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0) - [github.com/awslabs/cfn-python-lint: v1.15.2 → v1.16.0](aws-cloudformation/cfn-lint@v1.15.2...v1.16.0) - [github.com/psf/black: 24.8.0 → 24.10.0](psf/black@24.8.0...24.10.0) * Parametrize stack version and update app config (#54) * parametrize stack version * update data update date * set Google tag manager ID * rename `stack_version` to `image_version` * Increase GH workflow timeout (#55) A change[1] was made to update all containers at the same time which takes longer to deploy so we need to increase the deployment timeout. [1] #54 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Khai Do <3697686+zaro0508@users.noreply.github.com>
1 parent 27d3e85 commit 1936d38

File tree

4 files changed

+25
-22
lines changed

4 files changed

+25
-22
lines changed

.github/workflows/aws-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020
type: string
2121
role-duration-seconds:
2222
type: number
23-
default: 1200
23+
default: 3600
2424
environment:
2525
required: true
2626
type: string

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.6.0
6+
rev: v5.0.0
77
hooks:
88
- id: end-of-file-fixer
99
- id: mixed-line-ending
1010
- id: trailing-whitespace
1111
- repo: https://github.com/PyCQA/flake8
12-
rev: 7.1.0
12+
rev: 7.1.1
1313
hooks:
1414
- id: flake8
1515
- repo: https://github.com/adrienverge/yamllint
1616
rev: v1.35.1
1717
hooks:
1818
- id: yamllint
1919
- repo: https://github.com/awslabs/cfn-python-lint
20-
rev: v1.9.0
20+
rev: v1.16.0
2121
hooks:
2222
- id: cfn-python-lint
2323
args:
@@ -32,11 +32,11 @@ repos:
3232
^.pre-commit-config.yaml
3333
)
3434
- repo: https://github.com/psf/black
35-
rev: 24.4.2
35+
rev: 24.10.0
3636
hooks:
3737
- id: black
3838
- repo: https://github.com/sirosen/check-jsonschema
39-
rev: 0.29.1
39+
rev: 0.29.3
4040
hooks:
4141
- id: check-github-workflows
4242
- id: check-github-actions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ OpenChallenges application.
233233
* Add the Certificate ARN to the cdk.json
234234
* Update references to the OC docker images in [app.py](app.py)
235235
(i.e. `ghcr.io/sage-bionetworks/openchallenges-xxx:<tag>`)
236-
* (Optional) Update the ServiceProps objects in [app.py](app.py) with parameters specific to
236+
* (Optional) Update the `ServiceProps` objects in [app.py](app.py) with parameters specific to
237237
each container.
238238

239239
## Login with the AWS CLI

app.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# get the environment
1515
environment = utils.get_environment()
1616
stack_name_prefix = f"openchallenges-{environment}"
17+
image_version = "0.0.11"
1718

1819
# get VARS from cdk.json
1920
env_vars = app.node.try_get_context(environment)
@@ -38,7 +39,7 @@
3839
"openchallenges-mariadb",
3940
3306,
4041
512,
41-
"ghcr.io/sage-bionetworks/openchallenges-mariadb:edge",
42+
f"ghcr.io/sage-bionetworks/openchallenges-mariadb:{image_version}",
4243
{
4344
"MARIADB_USER": "maria",
4445
"MARIADB_PASSWORD": secrets["MARIADB_PASSWORD"],
@@ -58,7 +59,7 @@
5859
"openchallenges-elasticsearch",
5960
9200,
6061
2048,
61-
"ghcr.io/sage-bionetworks/openchallenges-elasticsearch:edge",
62+
f"ghcr.io/sage-bionetworks/openchallenges-elasticsearch:{image_version}",
6263
{
6364
"bootstrap.memory_lock": "true",
6465
"discovery.type": "single-node", # https://stackoverflow.com/a/68253868
@@ -78,7 +79,7 @@
7879
"openchallenges-thumbor",
7980
8889,
8081
512,
81-
"ghcr.io/sage-bionetworks/openchallenges-thumbor:edge",
82+
f"ghcr.io/sage-bionetworks/openchallenges-thumbor:{image_version}",
8283
{
8384
"LOG_LEVEL": "info",
8485
"PORT": "8889",
@@ -115,7 +116,7 @@
115116
"openchallenges-config-server",
116117
8090,
117118
1024,
118-
"ghcr.io/sage-bionetworks/openchallenges-config-server:edge",
119+
f"ghcr.io/sage-bionetworks/openchallenges-config-server:{image_version}",
119120
{
120121
"GIT_DEFAULT_LABEL": "test-2",
121122
"GIT_HOST_KEY_ALGORITHM": "ssh-ed25519",
@@ -138,7 +139,7 @@
138139
"openchallenges-service-registry",
139140
8081,
140141
1024,
141-
"ghcr.io/sage-bionetworks/openchallenges-service-registry:edge",
142+
f"ghcr.io/sage-bionetworks/openchallenges-service-registry:{image_version}",
142143
{
143144
"SERVER_PORT": "8081",
144145
"DEFAULT_ZONE": "http://localhost:8081/eureka",
@@ -159,7 +160,7 @@
159160
"openchallenges-zipkin",
160161
9411,
161162
512,
162-
"ghcr.io/sage-bionetworks/openchallenges-zipkin:edge",
163+
f"ghcr.io/sage-bionetworks/openchallenges-zipkin:{image_version}",
163164
{},
164165
)
165166

@@ -175,11 +176,13 @@
175176
"openchallenges-image-service",
176177
8086,
177178
1024,
178-
"ghcr.io/sage-bionetworks/openchallenges-image-service:edge",
179+
f"ghcr.io/sage-bionetworks/openchallenges-image-service:{image_version}",
179180
{
180181
"SERVER_PORT": "8086",
181182
"SPRING_CLOUD_CONFIG_URI": "http://openchallenges-config-server:8090",
182183
"SERVICE_REGISTRY_URL": "http://openchallenges-service-registry:8081/eureka",
184+
"OPENCHALLENGES_IMAGE_SERVICE_THUMBOR_HOST": f"https://{fully_qualified_domain_name}/img/",
185+
"OPENCHALLENGES_IMAGE_SERVICE_THUMBOR_SECURITY_KEY": secrets["SECURITY_KEY"],
183186
"OPENCHALLENGES_IMAGE_SERVICE_IS_DEPLOYED_ON_AWS": "true",
184187
},
185188
)
@@ -199,7 +202,7 @@
199202
"openchallenges-challenge-service",
200203
8085,
201204
1024,
202-
"ghcr.io/sage-bionetworks/openchallenges-challenge-service:edge",
205+
f"ghcr.io/sage-bionetworks/openchallenges-challenge-service:{image_version}",
203206
{
204207
"SERVER_PORT": "8085",
205208
"SPRING_CLOUD_CONFIG_URI": "http://openchallenges-config-server:8090",
@@ -237,7 +240,7 @@
237240
"openchallenges-organization-service",
238241
8084,
239242
1024,
240-
"ghcr.io/sage-bionetworks/openchallenges-organization-service:edge",
243+
f"ghcr.io/sage-bionetworks/openchallenges-organization-service:{image_version}",
241244
{
242245
"SERVER_PORT": "8084",
243246
"SPRING_CLOUD_CONFIG_URI": "http://openchallenges-config-server:8090",
@@ -268,7 +271,7 @@
268271
"openchallenges-api-gateway",
269272
8082,
270273
1024,
271-
"ghcr.io/sage-bionetworks/openchallenges-api-gateway:edge",
274+
f"ghcr.io/sage-bionetworks/openchallenges-api-gateway:{image_version}",
272275
{
273276
"SERVER_PORT": "8082",
274277
"SPRING_CLOUD_CONFIG_URI": "http://openchallenges-config-server:8090",
@@ -291,14 +294,14 @@
291294
"openchallenges-app",
292295
4200,
293296
1024,
294-
"ghcr.io/sage-bionetworks/openchallenges-app:edge",
297+
f"ghcr.io/sage-bionetworks/openchallenges-app:{image_version}",
295298
{
296299
"API_DOCS_URL": f"https://{fully_qualified_domain_name}/api-docs",
297300
"APP_VERSION": "1.0.0-alpha",
298301
"CSR_API_URL": f"https://{fully_qualified_domain_name}/api/v1",
299-
"DATA_UPDATED_ON": "2023-09-26",
302+
"DATA_UPDATED_ON": "2024-10-11",
300303
"ENVIRONMENT": "production",
301-
"GOOGLE_TAG_MANAGER_ID": "",
304+
"GOOGLE_TAG_MANAGER_ID": "GTM-NBR5XD8C",
302305
"SSR_API_URL": "http://openchallenges-api-gateway:8082/api/v1",
303306
},
304307
)
@@ -323,7 +326,7 @@
323326
"openchallenges-api-docs",
324327
8010,
325328
256,
326-
"ghcr.io/sage-bionetworks/openchallenges-api-docs:edge",
329+
f"ghcr.io/sage-bionetworks/openchallenges-api-docs:{image_version}",
327330
{"PORT": "8010"},
328331
)
329332
api_docs_stack = ServiceStack(
@@ -338,7 +341,7 @@
338341
"openchallenges-apex",
339342
8000,
340343
200,
341-
"ghcr.io/sage-bionetworks/openchallenges-apex:edge",
344+
f"ghcr.io/sage-bionetworks/openchallenges-apex:{image_version}",
342345
{
343346
"API_DOCS_HOST": "openchallenges-api-docs",
344347
"API_DOCS_PORT": "8010",

0 commit comments

Comments
 (0)