From 818e6a9eda125b0a8acc2745d53853884660d542 Mon Sep 17 00:00:00 2001 From: Ziga Cernigoj Date: Thu, 26 Oct 2023 10:47:46 +0200 Subject: [PATCH 1/3] remove old production zappa settings --- rest/zappa_settings.json.template | 41 ------------------------------- 1 file changed, 41 deletions(-) diff --git a/rest/zappa_settings.json.template b/rest/zappa_settings.json.template index c2684134..bc71fcfd 100644 --- a/rest/zappa_settings.json.template +++ b/rest/zappa_settings.json.template @@ -82,47 +82,6 @@ } }, "production": { - "app_function": "app.app", - "aws_region": "eu-central-1", - "lambda_description": "Production deploy of Sentinel Hub openEO backend", - "environment_variables": { - "DEPLOYMENT_TYPE": "production", - "AWS_ACCESS_KEY_ID": "@@AWS_ACCESS_KEY_ID@@", - "AWS_SECRET_ACCESS_KEY": "@@AWS_SECRET_ACCESS_KEY@@", - "SH_CLIENT_ID": "@@PRODUCTION_SH_CLIENT_ID@@", - "SH_CLIENT_SECRET": "@@PRODUCTION_SH_CLIENT_SECRET@@", - "BACKEND_VERSION": "@@BACKEND_VERSION@@", - "RESULTS_S3_BUCKET_NAME_MAIN": "@@RESULTS_S3_BUCKET_NAME_MAIN@@", - "RESULTS_S3_BUCKET_NAME_CREODIAS": "@@RESULTS_S3_BUCKET_NAME_CREODIAS@@", - "RESULTS_S3_BUCKET_NAME_USWEST": "@@RESULTS_S3_BUCKET_NAME_USWEST@@", - "RESULTS_S3_BUCKET_ACCESS_KEY_ID_MAIN": "@@RESULTS_S3_BUCKET_ACCESS_KEY_ID_MAIN@@", - "RESULTS_S3_BUCKET_ACCESS_KEY_ID_CREODIAS": "@@RESULTS_S3_BUCKET_ACCESS_KEY_ID_CREODIAS@@", - "RESULTS_S3_BUCKET_ACCESS_KEY_ID_USWEST": "@@RESULTS_S3_BUCKET_ACCESS_KEY_ID_USWEST@@", - "RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_MAIN": "@@RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_MAIN@@", - "RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_CREODIAS": "@@RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_CREODIAS@@", - "RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_USWEST": "@@RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_USWEST@@", - "USAGE_REPORTING_BASE_URL": "@@USAGE_REPORTING_BASE_URL_PRODUCTION@@", - "USAGE_REPORTING_AUTH_URL": "@@USAGE_REPORTING_AUTH_URL_PRODUCTION@@", - "USAGE_REPORTING_AUTH_CLIENT_ID": "@@USAGE_REPORTING_AUTH_CLIENT_ID_PRODUCTION@@", - "USAGE_REPORTING_AUTH_CLIENT_SECRET": "@@USAGE_REPORTING_AUTH_CLIENT_SECRET_PRODUCTION@@", - "LOGGING_LEVEL": "@@LOGGING_LEVEL@@" - }, - "memory_size": 512, - "timeout_seconds": 30, - "profile_name": "default", - "project_name": "openeo", - "runtime": "python3.9", - "manage_roles": false, - "role_arn": "arn:aws:iam::707953651112:role/openEO-prod-role", - "s3_bucket": "openeoproddeploy", - "tags": { - "cost:ou": "frontend", - "cost:contact": "dthiex", - "env": "prod", - "project": "openEO" - } - }, - "production-docker": { "app_function": "app.app", "aws_region": "eu-central-1", "lambda_description": "Production deploy of Sentinel Hub openEO backend", From 1ad59557c5d15bc4907af613f861436e9d599f01 Mon Sep 17 00:00:00 2001 From: Ziga Cernigoj Date: Thu, 26 Oct 2023 11:04:27 +0200 Subject: [PATCH 2/3] use correct zappa settings for deploying production --- .github/workflows/deploy_production.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_production.yaml b/.github/workflows/deploy_production.yaml index f9426d93..b80f543b 100644 --- a/.github/workflows/deploy_production.yaml +++ b/.github/workflows/deploy_production.yaml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest env: - DEPLOYMENT_NAME: "production-docker" + DEPLOYMENT_NAME: "production" PROD_ECR_REGISTRY: ${{ secrets.PROD_ECR_REGISTRY }} PROD_ECR_REGISTRY_IMAGE: ${{ secrets.PROD_ECR_REGISTRY_IMAGE }} From 2fc11124cef45d02891a709ea5553bb0ad093012 Mon Sep 17 00:00:00 2001 From: Ziga Cernigoj Date: Thu, 26 Oct 2023 14:02:13 +0200 Subject: [PATCH 3/3] remove old testing zappa settings --- .github/workflows/deploy_testing.yaml | 2 +- rest/zappa_settings.json.template | 41 --------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) diff --git a/.github/workflows/deploy_testing.yaml b/.github/workflows/deploy_testing.yaml index f8cc0bfb..f6298e18 100644 --- a/.github/workflows/deploy_testing.yaml +++ b/.github/workflows/deploy_testing.yaml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest env: - DEPLOYMENT_NAME: "testing-docker" + DEPLOYMENT_NAME: "testing" TESTING_ECR_REGISTRY: ${{ secrets.TESTING_ECR_REGISTRY }} TESTING_ECR_REGISTRY_IMAGE: ${{ secrets.TESTING_ECR_REGISTRY_IMAGE }} diff --git a/rest/zappa_settings.json.template b/rest/zappa_settings.json.template index bc71fcfd..89f67c94 100644 --- a/rest/zappa_settings.json.template +++ b/rest/zappa_settings.json.template @@ -1,46 +1,5 @@ { "testing": { - "app_function": "app.app", - "aws_region": "eu-central-1", - "lambda_description": "Testing deploy of Sentinel Hub openEO backend", - "environment_variables": { - "DEPLOYMENT_TYPE": "testing", - "AWS_ACCESS_KEY_ID": "@@AWS_ACCESS_KEY_ID@@", - "AWS_SECRET_ACCESS_KEY": "@@AWS_SECRET_ACCESS_KEY@@", - "SH_CLIENT_ID": "@@TESTING_SH_CLIENT_ID@@", - "SH_CLIENT_SECRET": "@@TESTING_SH_CLIENT_SECRET@@", - "BACKEND_VERSION": "@@BACKEND_VERSION@@", - "RESULTS_S3_BUCKET_NAME_MAIN": "@@RESULTS_S3_BUCKET_NAME_MAIN@@", - "RESULTS_S3_BUCKET_NAME_CREODIAS": "@@RESULTS_S3_BUCKET_NAME_CREODIAS@@", - "RESULTS_S3_BUCKET_NAME_USWEST": "@@RESULTS_S3_BUCKET_NAME_USWEST@@", - "RESULTS_S3_BUCKET_ACCESS_KEY_ID_MAIN": "@@RESULTS_S3_BUCKET_ACCESS_KEY_ID_MAIN@@", - "RESULTS_S3_BUCKET_ACCESS_KEY_ID_CREODIAS": "@@RESULTS_S3_BUCKET_ACCESS_KEY_ID_CREODIAS@@", - "RESULTS_S3_BUCKET_ACCESS_KEY_ID_USWEST": "@@RESULTS_S3_BUCKET_ACCESS_KEY_ID_USWEST@@", - "RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_MAIN": "@@RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_MAIN@@", - "RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_CREODIAS": "@@RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_CREODIAS@@", - "RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_USWEST": "@@RESULTS_S3_BUCKET_SECRET_ACCESS_KEY_USWEST@@", - "USAGE_REPORTING_BASE_URL": "@@USAGE_REPORTING_BASE_URL_TESTING@@", - "USAGE_REPORTING_AUTH_URL": "@@USAGE_REPORTING_AUTH_URL_TESTING@@", - "USAGE_REPORTING_AUTH_CLIENT_ID": "@@USAGE_REPORTING_AUTH_CLIENT_ID_TESTING@@", - "USAGE_REPORTING_AUTH_CLIENT_SECRET": "@@USAGE_REPORTING_AUTH_CLIENT_SECRET_TESTING@@", - "LOGGING_LEVEL": "@@LOGGING_LEVEL@@" - }, - "memory_size": 512, - "timeout_seconds": 30, - "profile_name": "default", - "project_name": "openeo", - "runtime": "python3.9", - "manage_roles": false, - "role_arn": "arn:aws:iam::127163565383:role/openEO-dev-role", - "s3_bucket": "openeodevdeploy", - "tags": { - "cost:ou": "frontend", - "cost:contact": "dthiex", - "env": "dev", - "project": "openEO" - } - }, - "testing-docker": { "app_function": "app.app", "aws_region": "eu-central-1", "lambda_description": "Testing deploy of Sentinel Hub openEO backend",