Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Fetch upstream changes #52

Merged
merged 30 commits into from
Nov 14, 2023
Merged

Fetch upstream changes #52

merged 30 commits into from
Nov 14, 2023

Conversation

slesaad
Copy link
Collaborator

@slesaad slesaad commented Nov 13, 2023

What is changed

  • All IAC changes are configurable and current GHGC deployments should be maintained unchanged with updates to the configuration provided.
  • Raster API has an upgraded pgstac-titiler and titiler version upgrade that cause breaking endpoint changes as well as a new non-breaking addition of a custom colormap.
  • This brings over a year's worth of upstream commits but a lot of the changes were added here and upstream so the change set isn't too terrible.

Env variables

Changed

  • VEDA_(STAC|RASTER)_PATH_PREFIX -> VEDA_(STAC|RASTER)_ROOT_PATH (same value new property name for stac fast api root path override instead of updating all routes individually with a path prefix)
  • VEDA_HOST - > VEDA_CUSTOM_HOST (when provided, complete host url will be used in lambda parameter mapping to overwite host header)
  • VEDA_DB_RDS_TYPE - > VEDA_DB_RDS_INSTANCE_SIZE and VEDA_DB_RDS_INSTANCE_CLASS
  • VEDA_DB_RDS_STORAGE_ENCRYPTED - > VEDA_DB_RDS_ENCRYPTION

Added optional configuration

  • VEDA_DB_RDS_INSTANCE_CLASS
  • VEDA_DB_RDS_ENGINE_FULL_VERSION
  • VEDA_DB_RDS_ENGIN_MAJOR_VERSION
  • VEDA_DOMAIN_CREATE_CUSTOM_SUBDOMAINS

Construct Changes

Domain

Now we only generate custom subdomains when enabled in configuration (no change for GHGC instances)

Routes

  • The project can now generate a cloudfront distribution when configured
  • stac-api, raster-api, and ingest-api behaviors are currently hard coded with root paths /api/stac, /api/raster, and /api/ingest. We will make this configurable in the future
  • Current support requires an existing s3 static website (browser) and route 53 zone id and name

Database Dockerfile

VEDA just uses FROM public.ecr.aws/sam/build-python3.9:latest but I left FROM --platform=linux/amd64 ... as is in GHGs Dockerfile (but I did keep the rest of the upstream diff)

slesaad and others added 27 commits June 14, 2023 10:51
… if needed (#8)

* Point README to veda-docs (NASA-IMPACT#171)

* Upgrade titiler and titiler-pgstac

* Fix br/gzip header test

* Remove factory (it's included in new titiler-pgstac version)
NASA-IMPACT#148 (comment)

* Remove pin on cramjam

* Load test data in container (actions not updated)

* fix actions tests

* adjust container strategy

* actions connections fix

* remove -it flag (it broke actions)

* re-enable lint, propagate test changes to other actions

* docker-compose -> docker compose

* Fix template import

* include private subnet config

* fix subnet type

* format changes

* pub accessible default true

* remove publicly accessible variable

* Add sql connection and execution abstraction

* Add sql logic to fix projection extension types

* add script to delete null stac_extensions

* Lint and move sql command scripts to support_scripts dir

* Use pythonic naming conventions

* pgstac readme change

* docker compose pgstac version

* pre-deploy action fix

* RDS Proxy initial implementation

* proxy secret + urlllib fix

* use pgstac 0.7.9

* Update set environment

* Add support for permissions boundary

* use titiler custom JSONResponse to handle NaN values

---------

Co-authored-by: Julia Signell <[email protected]>
Co-authored-by: ividito <[email protected]>
Co-authored-by: smohiudd <[email protected]>
Co-authored-by: Saadiq Mohiuddin <[email protected]>
Co-authored-by: Nathan Zimmerman <[email protected]>
Co-authored-by: Caden Helbling <[email protected]>
Co-authored-by: vincentsarago <[email protected]>
Co-authored-by: Alexandra Kirk <[email protected]>
* Fix order of db search path

* Remove environment from predeploy
* Fix missing rds config update

* Update rds type config example value
Use NAT Gateway instead of NAT Instance
* Overwrite host header for both raster and stac apis

* Add docstrings
* Fix mangum db connection pool

* lint

* Point README to veda-docs (NASA-IMPACT#171)

* Upgrade titiler and titiler-pgstac

* Fix br/gzip header test

* Remove factory (it's included in new titiler-pgstac version)
NASA-IMPACT#148 (comment)

* Remove pin on cramjam

* Load test data in container (actions not updated)

* fix actions tests

* adjust container strategy

* actions connections fix

* remove -it flag (it broke actions)

* re-enable lint, propagate test changes to other actions

* docker-compose -> docker compose

* Fix template import

* include private subnet config

* fix subnet type

* format changes

* pub accessible default true

* remove publicly accessible variable

* Add sql connection and execution abstraction

* Add sql logic to fix projection extension types

* add script to delete null stac_extensions

* Lint and move sql command scripts to support_scripts dir

* Use pythonic naming conventions

* pgstac readme change

* pin to urllib3<2

* pin urllib3 in test

* format

* revert

* pin httpx

* revert

* docker compose pgstac version

* pre-deploy action fix

* RDS Proxy initial implementation

* proxy secret + urlllib fix

* use pgstac 0.7.4

* use titiler custom JSONResponse to handle NaN values

* change db search path

* hacky fix

* try exporting os env vars

* export os env vars

* lint

* comment

* move to APISettings check

* black changes

* hide route

* Pin pydantic for now

* put raster assume role config in lambda construct

* pass lambda env variable bool as string

* NAT SG rules

* order of operation

* remove implicity SGs

* black formatted

* fix invalid string in rule description

* updates to deployment docs in readme

* update pgstac version in docker compose

* use max/end datetime in periodic collection datetime summary

* correct table name typo

* use NAT Gateway instead of EC2 Instance as NAT

* aws_ec2 mistake

* use aws_ec2.SubnetType.PRIVATE_WITH_EGRESS

* add back in NAT count

* add rds subnet group manual removal step to instructions for destroying a stack

* Enable tilematrixsets

* feat(database): RDS Configurations (NASA-IMPACT#218)

* feat(database): RDS Configurations

* chore: string configurations

* feat(database): Configurable RDS Configurations

* consolidate configuration docs in readme

* update table header

---------

Co-authored-by: anayeaye <[email protected]>

* raster path prefix

* stac path prefix

* format

* config changes

* format

* Revert "format"

This reverts commit 3a26c1c.

* Revert "config changes"

This reverts commit 1425de6.

* feat: add configuration and github actions for python-semantic-release

* feat: lint conventional pr

* ci: cdk deploy should not require approval in github actions workflow

* docs: add contributing.md

* chore(ci): fix typo

* chore: explain versioning init choice

* chore: expalin automated version in setup.py

* chore: typo

Co-authored-by: Jamison French <[email protected]>

* docs: typos and improvements in contributing docs

* docs: typos in contributing

* ci: handle semantic version releases with tags only

* chore: add exclude commit patterns from release changelog

* cloudfront in veda backend

* format

* fix: if provided, apply permissions boundary to all roles created within a stack

* mypy, pydocstyle fixes

pydocstyle fixes

format

isort changes

optional config

format

config changes

format

config changes

construct change

* include apigateway parameter mapping

* remove unused import

* update readme

* remove unused config

* docs: s/veda-data-pipelines/veda-data-airflow/

I can't update the diagram b/c it's draw.io.

* include parameter mapping in raster api

* ci: branch specific pre-deploy check on pull request action

* ci: pre-deploy test against dev stack by default

* fix github var name in action

* typo

* include conditional param mapping

* change param mapping kwargs

* fix cloudfront subdomain

* incude missing argument

* formatting

* feat(raster)!: update titiler-pgstac from 0.2.3 to 0.8.0

* add dependencies

* add tests deps

* fix tests

* 🤦

* update handler

* pin pydantic to 1.* for cdk deployment

* fix deps

* fix(raster) use root path for prefixing and add to gateway base url in handler

* fix(stac) use root path for prefixing urls

* root path in fastapi app

* updates to for using a proxy

* lint

* only add additional servers to fast api if root path in config

* root path setting is optional

* cleanup

* cleanup

* do not configure alias for shared subdomain

* pr review cleanup

* fastapi additional servers not needed with apigw base path=app.root_path

* add custom colormap for EPA dataset

* Update raster_api/runtime/src/cmap_data/README.md

* rename cmap

* fix(apis)!: overwrite host in api integration if custom host provided

* fix(apis)!: overwrite host in api integration if custom host provided (p2)

* fix(routes)!: ingest api root path is /api/publish

* change ingestor api cf behavior

* format

* fix(domain)! only create custom api subdomains when configured

* improve config descriptions

* typo

* improve domain config docs

* account for custom staged url of veda-stac-ingestor

* do not run lint conventional pr

* merge duplicate corrected

* lint

* merge mismatched rds config naming

* merge inconsistencies

* merge inconsistencies

---------

Co-authored-by: Saadiq Mohiuddin <[email protected]>
Co-authored-by: ividito <[email protected]>
Co-authored-by: Julia Signell <[email protected]>
Co-authored-by: smohiudd <[email protected]>
Co-authored-by: Nathan Zimmerman <[email protected]>
Co-authored-by: vincentsarago <[email protected]>
Co-authored-by: ranchodeluxe <[email protected]>
Co-authored-by: sudobangbang <[email protected]>
Co-authored-by: Jamison French <[email protected]>
Co-authored-by: Pete Gadomski <[email protected]>
@slesaad slesaad marked this pull request as ready for review November 14, 2023 19:59
@slesaad slesaad requested a review from anayeaye November 14, 2023 19:59
@slesaad slesaad merged commit 1133e0e into main Nov 14, 2023
6 checks passed
slesaad added a commit that referenced this pull request Nov 15, 2023
* Fix STAC catalog urls, add support for alternative projections in titiler (#44)

* Header host override for stac and raster apis (#47)

* Fetch upstream changes (#52)

* Sync updates from upstream, add permissions boundary to created roles if needed (#8)

* Point README to veda-docs (NASA-IMPACT#171)

* Upgrade titiler and titiler-pgstac

* Fix br/gzip header test

* Remove factory (it's included in new titiler-pgstac version)
NASA-IMPACT#148 (comment)

* Remove pin on cramjam

* Load test data in container (actions not updated)

* fix actions tests

* adjust container strategy

* actions connections fix

* remove -it flag (it broke actions)

* re-enable lint, propagate test changes to other actions

* docker-compose -> docker compose

* Fix template import

* include private subnet config

* fix subnet type

* format changes

* pub accessible default true

* remove publicly accessible variable

* Add sql connection and execution abstraction

* Add sql logic to fix projection extension types

* add script to delete null stac_extensions

* Lint and move sql command scripts to support_scripts dir

* Use pythonic naming conventions

* pgstac readme change

* docker compose pgstac version

* pre-deploy action fix

* RDS Proxy initial implementation

* proxy secret + urlllib fix

* use pgstac 0.7.9

* Update set environment

* Add support for permissions boundary

* use titiler custom JSONResponse to handle NaN values

---------

Co-authored-by: Julia Signell <[email protected]>
Co-authored-by: ividito <[email protected]>
Co-authored-by: smohiudd <[email protected]>
Co-authored-by: Saadiq Mohiuddin <[email protected]>
Co-authored-by: Nathan Zimmerman <[email protected]>
Co-authored-by: Caden Helbling <[email protected]>
Co-authored-by: vincentsarago <[email protected]>
Co-authored-by: Alexandra Kirk <[email protected]>

* Update bootstrapper lambda timeout (#11)

* Fix order of db search path (#13)

* Fix order of db search path

* Remove environment from predeploy

* Make RDS instance type configurable (#18)

* Fix missing rds config update (#22)

* Update rds type example config value (#25)

* Fix missing rds config update

* Update rds type config example value

* update collection summaries methods to include max end datetime

* fix docker compose in pr action

* Add DB storage encryption configurability (#34)

* Only add storage_encrypted db config if true (#35)

* use NAT Gateway

* Add TMS route for tile matrices (#40)

* Optionally overwrite host param in stac api (#43)

* Update mappingvalue to custom

* Overwrite host header for both raster and stac apis (#46)

* Overwrite host header for both raster and stac apis

* Add docstrings

* Fix stac config env prefix

* Host param override for api gateway (#48)

* Fetch upstream changes (#51)

* Fix mangum db connection pool

* lint

* Point README to veda-docs (NASA-IMPACT#171)

* Upgrade titiler and titiler-pgstac

* Fix br/gzip header test

* Remove factory (it's included in new titiler-pgstac version)
NASA-IMPACT#148 (comment)

* Remove pin on cramjam

* Load test data in container (actions not updated)

* fix actions tests

* adjust container strategy

* actions connections fix

* remove -it flag (it broke actions)

* re-enable lint, propagate test changes to other actions

* docker-compose -> docker compose

* Fix template import

* include private subnet config

* fix subnet type

* format changes

* pub accessible default true

* remove publicly accessible variable

* Add sql connection and execution abstraction

* Add sql logic to fix projection extension types

* add script to delete null stac_extensions

* Lint and move sql command scripts to support_scripts dir

* Use pythonic naming conventions

* pgstac readme change

* pin to urllib3<2

* pin urllib3 in test

* format

* revert

* pin httpx

* revert

* docker compose pgstac version

* pre-deploy action fix

* RDS Proxy initial implementation

* proxy secret + urlllib fix

* use pgstac 0.7.4

* use titiler custom JSONResponse to handle NaN values

* change db search path

* hacky fix

* try exporting os env vars

* export os env vars

* lint

* comment

* move to APISettings check

* black changes

* hide route

* Pin pydantic for now

* put raster assume role config in lambda construct

* pass lambda env variable bool as string

* NAT SG rules

* order of operation

* remove implicity SGs

* black formatted

* fix invalid string in rule description

* updates to deployment docs in readme

* update pgstac version in docker compose

* use max/end datetime in periodic collection datetime summary

* correct table name typo

* use NAT Gateway instead of EC2 Instance as NAT

* aws_ec2 mistake

* use aws_ec2.SubnetType.PRIVATE_WITH_EGRESS

* add back in NAT count

* add rds subnet group manual removal step to instructions for destroying a stack

* Enable tilematrixsets

* feat(database): RDS Configurations (NASA-IMPACT#218)

* feat(database): RDS Configurations

* chore: string configurations

* feat(database): Configurable RDS Configurations

* consolidate configuration docs in readme

* update table header

---------

Co-authored-by: anayeaye <[email protected]>

* raster path prefix

* stac path prefix

* format

* config changes

* format

* Revert "format"

This reverts commit 3a26c1c.

* Revert "config changes"

This reverts commit 1425de6.

* feat: add configuration and github actions for python-semantic-release

* feat: lint conventional pr

* ci: cdk deploy should not require approval in github actions workflow

* docs: add contributing.md

* chore(ci): fix typo

* chore: explain versioning init choice

* chore: expalin automated version in setup.py

* chore: typo

Co-authored-by: Jamison French <[email protected]>

* docs: typos and improvements in contributing docs

* docs: typos in contributing

* ci: handle semantic version releases with tags only

* chore: add exclude commit patterns from release changelog

* cloudfront in veda backend

* format

* fix: if provided, apply permissions boundary to all roles created within a stack

* mypy, pydocstyle fixes

pydocstyle fixes

format

isort changes

optional config

format

config changes

format

config changes

construct change

* include apigateway parameter mapping

* remove unused import

* update readme

* remove unused config

* docs: s/veda-data-pipelines/veda-data-airflow/

I can't update the diagram b/c it's draw.io.

* include parameter mapping in raster api

* ci: branch specific pre-deploy check on pull request action

* ci: pre-deploy test against dev stack by default

* fix github var name in action

* typo

* include conditional param mapping

* change param mapping kwargs

* fix cloudfront subdomain

* incude missing argument

* formatting

* feat(raster)!: update titiler-pgstac from 0.2.3 to 0.8.0

* add dependencies

* add tests deps

* fix tests

* 🤦

* update handler

* pin pydantic to 1.* for cdk deployment

* fix deps

* fix(raster) use root path for prefixing and add to gateway base url in handler

* fix(stac) use root path for prefixing urls

* root path in fastapi app

* updates to for using a proxy

* lint

* only add additional servers to fast api if root path in config

* root path setting is optional

* cleanup

* cleanup

* do not configure alias for shared subdomain

* pr review cleanup

* fastapi additional servers not needed with apigw base path=app.root_path

* add custom colormap for EPA dataset

* Update raster_api/runtime/src/cmap_data/README.md

* rename cmap

* fix(apis)!: overwrite host in api integration if custom host provided

* fix(apis)!: overwrite host in api integration if custom host provided (p2)

* fix(routes)!: ingest api root path is /api/publish

* change ingestor api cf behavior

* format

* fix(domain)! only create custom api subdomains when configured

* improve config descriptions

* typo

* improve domain config docs

* account for custom staged url of veda-stac-ingestor

* do not run lint conventional pr

* merge duplicate corrected

* lint

* merge mismatched rds config naming

* merge inconsistencies

* merge inconsistencies

---------

Co-authored-by: Saadiq Mohiuddin <[email protected]>
Co-authored-by: ividito <[email protected]>
Co-authored-by: Julia Signell <[email protected]>
Co-authored-by: smohiudd <[email protected]>
Co-authored-by: Nathan Zimmerman <[email protected]>
Co-authored-by: vincentsarago <[email protected]>
Co-authored-by: ranchodeluxe <[email protected]>
Co-authored-by: sudobangbang <[email protected]>
Co-authored-by: Jamison French <[email protected]>
Co-authored-by: Pete Gadomski <[email protected]>

* Remove unnecessary remanants of merge

* Remove "host" config var

---------

Co-authored-by: Julia Signell <[email protected]>
Co-authored-by: ividito <[email protected]>
Co-authored-by: smohiudd <[email protected]>
Co-authored-by: Saadiq Mohiuddin <[email protected]>
Co-authored-by: Nathan Zimmerman <[email protected]>
Co-authored-by: Caden Helbling <[email protected]>
Co-authored-by: vincentsarago <[email protected]>
Co-authored-by: Alexandra Kirk <[email protected]>
Co-authored-by: Abdelhak Marouane <[email protected]>
Co-authored-by: ranchodeluxe <[email protected]>
Co-authored-by: sudobangbang <[email protected]>
Co-authored-by: Jamison French <[email protected]>
Co-authored-by: Pete Gadomski <[email protected]>

* Fix rds encryption var in example .env file (#55)

---------

Co-authored-by: Julia Signell <[email protected]>
Co-authored-by: ividito <[email protected]>
Co-authored-by: smohiudd <[email protected]>
Co-authored-by: Saadiq Mohiuddin <[email protected]>
Co-authored-by: Nathan Zimmerman <[email protected]>
Co-authored-by: Caden Helbling <[email protected]>
Co-authored-by: vincentsarago <[email protected]>
Co-authored-by: Alexandra Kirk <[email protected]>
Co-authored-by: Abdelhak Marouane <[email protected]>
Co-authored-by: ranchodeluxe <[email protected]>
Co-authored-by: sudobangbang <[email protected]>
Co-authored-by: Jamison French <[email protected]>
Co-authored-by: Pete Gadomski <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants