Skip to content

Commit

Permalink
Update stage environment (#57) (#58)
Browse files Browse the repository at this point in the history
* [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 <[email protected]>
  • Loading branch information
3 people authored Oct 15, 2024
1 parent 27d3e85 commit 1936d38
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aws-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
type: string
role-duration-seconds:
type: number
default: 1200
default: 3600
environment:
required: true
type: string
Expand Down
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
- repo: https://github.com/awslabs/cfn-python-lint
rev: v1.9.0
rev: v1.16.0
hooks:
- id: cfn-python-lint
args:
Expand All @@ -32,11 +32,11 @@ repos:
^.pre-commit-config.yaml
)
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.29.1
rev: 0.29.3
hooks:
- id: check-github-workflows
- id: check-github-actions
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ OpenChallenges application.
* Add the Certificate ARN to the cdk.json
* Update references to the OC docker images in [app.py](app.py)
(i.e. `ghcr.io/sage-bionetworks/openchallenges-xxx:<tag>`)
* (Optional) Update the ServiceProps objects in [app.py](app.py) with parameters specific to
* (Optional) Update the `ServiceProps` objects in [app.py](app.py) with parameters specific to
each container.

## Login with the AWS CLI
Expand Down
33 changes: 18 additions & 15 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# get the environment
environment = utils.get_environment()
stack_name_prefix = f"openchallenges-{environment}"
image_version = "0.0.11"

# get VARS from cdk.json
env_vars = app.node.try_get_context(environment)
Expand All @@ -38,7 +39,7 @@
"openchallenges-mariadb",
3306,
512,
"ghcr.io/sage-bionetworks/openchallenges-mariadb:edge",
f"ghcr.io/sage-bionetworks/openchallenges-mariadb:{image_version}",
{
"MARIADB_USER": "maria",
"MARIADB_PASSWORD": secrets["MARIADB_PASSWORD"],
Expand All @@ -58,7 +59,7 @@
"openchallenges-elasticsearch",
9200,
2048,
"ghcr.io/sage-bionetworks/openchallenges-elasticsearch:edge",
f"ghcr.io/sage-bionetworks/openchallenges-elasticsearch:{image_version}",
{
"bootstrap.memory_lock": "true",
"discovery.type": "single-node", # https://stackoverflow.com/a/68253868
Expand All @@ -78,7 +79,7 @@
"openchallenges-thumbor",
8889,
512,
"ghcr.io/sage-bionetworks/openchallenges-thumbor:edge",
f"ghcr.io/sage-bionetworks/openchallenges-thumbor:{image_version}",
{
"LOG_LEVEL": "info",
"PORT": "8889",
Expand Down Expand Up @@ -115,7 +116,7 @@
"openchallenges-config-server",
8090,
1024,
"ghcr.io/sage-bionetworks/openchallenges-config-server:edge",
f"ghcr.io/sage-bionetworks/openchallenges-config-server:{image_version}",
{
"GIT_DEFAULT_LABEL": "test-2",
"GIT_HOST_KEY_ALGORITHM": "ssh-ed25519",
Expand All @@ -138,7 +139,7 @@
"openchallenges-service-registry",
8081,
1024,
"ghcr.io/sage-bionetworks/openchallenges-service-registry:edge",
f"ghcr.io/sage-bionetworks/openchallenges-service-registry:{image_version}",
{
"SERVER_PORT": "8081",
"DEFAULT_ZONE": "http://localhost:8081/eureka",
Expand All @@ -159,7 +160,7 @@
"openchallenges-zipkin",
9411,
512,
"ghcr.io/sage-bionetworks/openchallenges-zipkin:edge",
f"ghcr.io/sage-bionetworks/openchallenges-zipkin:{image_version}",
{},
)

Expand All @@ -175,11 +176,13 @@
"openchallenges-image-service",
8086,
1024,
"ghcr.io/sage-bionetworks/openchallenges-image-service:edge",
f"ghcr.io/sage-bionetworks/openchallenges-image-service:{image_version}",
{
"SERVER_PORT": "8086",
"SPRING_CLOUD_CONFIG_URI": "http://openchallenges-config-server:8090",
"SERVICE_REGISTRY_URL": "http://openchallenges-service-registry:8081/eureka",
"OPENCHALLENGES_IMAGE_SERVICE_THUMBOR_HOST": f"https://{fully_qualified_domain_name}/img/",
"OPENCHALLENGES_IMAGE_SERVICE_THUMBOR_SECURITY_KEY": secrets["SECURITY_KEY"],
"OPENCHALLENGES_IMAGE_SERVICE_IS_DEPLOYED_ON_AWS": "true",
},
)
Expand All @@ -199,7 +202,7 @@
"openchallenges-challenge-service",
8085,
1024,
"ghcr.io/sage-bionetworks/openchallenges-challenge-service:edge",
f"ghcr.io/sage-bionetworks/openchallenges-challenge-service:{image_version}",
{
"SERVER_PORT": "8085",
"SPRING_CLOUD_CONFIG_URI": "http://openchallenges-config-server:8090",
Expand Down Expand Up @@ -237,7 +240,7 @@
"openchallenges-organization-service",
8084,
1024,
"ghcr.io/sage-bionetworks/openchallenges-organization-service:edge",
f"ghcr.io/sage-bionetworks/openchallenges-organization-service:{image_version}",
{
"SERVER_PORT": "8084",
"SPRING_CLOUD_CONFIG_URI": "http://openchallenges-config-server:8090",
Expand Down Expand Up @@ -268,7 +271,7 @@
"openchallenges-api-gateway",
8082,
1024,
"ghcr.io/sage-bionetworks/openchallenges-api-gateway:edge",
f"ghcr.io/sage-bionetworks/openchallenges-api-gateway:{image_version}",
{
"SERVER_PORT": "8082",
"SPRING_CLOUD_CONFIG_URI": "http://openchallenges-config-server:8090",
Expand All @@ -291,14 +294,14 @@
"openchallenges-app",
4200,
1024,
"ghcr.io/sage-bionetworks/openchallenges-app:edge",
f"ghcr.io/sage-bionetworks/openchallenges-app:{image_version}",
{
"API_DOCS_URL": f"https://{fully_qualified_domain_name}/api-docs",
"APP_VERSION": "1.0.0-alpha",
"CSR_API_URL": f"https://{fully_qualified_domain_name}/api/v1",
"DATA_UPDATED_ON": "2023-09-26",
"DATA_UPDATED_ON": "2024-10-11",
"ENVIRONMENT": "production",
"GOOGLE_TAG_MANAGER_ID": "",
"GOOGLE_TAG_MANAGER_ID": "GTM-NBR5XD8C",
"SSR_API_URL": "http://openchallenges-api-gateway:8082/api/v1",
},
)
Expand All @@ -323,7 +326,7 @@
"openchallenges-api-docs",
8010,
256,
"ghcr.io/sage-bionetworks/openchallenges-api-docs:edge",
f"ghcr.io/sage-bionetworks/openchallenges-api-docs:{image_version}",
{"PORT": "8010"},
)
api_docs_stack = ServiceStack(
Expand All @@ -338,7 +341,7 @@
"openchallenges-apex",
8000,
200,
"ghcr.io/sage-bionetworks/openchallenges-apex:edge",
f"ghcr.io/sage-bionetworks/openchallenges-apex:{image_version}",
{
"API_DOCS_HOST": "openchallenges-api-docs",
"API_DOCS_PORT": "8010",
Expand Down

0 comments on commit 1936d38

Please sign in to comment.