Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Maitreyee Joshi 822f8f5120
Remove development azurite keys (#235)
* remove development azurite keys

* add AZURITE_DEFAULT_KEY to workflows

* rename azurite default key

* fix validate

* lint fix

* add defult key before validate

* test

* revert test change

* remove dash from docker-compose

* revert change

* replace docker-compose with docker compose

* add AZURITE_ACCOUNT_KEY as env var

* update azurite account key

---------

Co-authored-by: elay <yileihu@microsoft.com>
2024-08-13 10:36:10 -07:00
Matt McFarland 66fa8fe96d
Update pydantic, titiler, stac-fastapi (#233)
* update pccommon requirements

* update pcstac requirements

* update pcfuncs

* update pcfuncs/pcstac/pccommon

* allow YYYY-MM-DD date format in search

* update pctiler

* update stac-fastapi.*

* Dependencies

* Get mosaic tiles working

* Formatting

* Use items request model

* Backwards compat with searchid

* certifi upgrade

* Read envs correctly

* Restore health check filtering

* Update titiler uvicorn

* lint

* Fix casing on colormaps

* Fix cmap and add /crop

* Fixups

---------

Co-authored-by: vincentsarago <vincent.sarago@gmail.com>
2024-07-17 10:22:54 -04:00
Matt McFarland 1282fbb893
Add config/map/token endpoint to support Data Catalog (#187)
* Add map token endpoint to tiler service

The tiler service will generate a token for use against an azure maps
instance, using the identity of the tiler (when deployed) or the local
developer credentials (in local development).

A test has been added that requires a local identity, and this has been
skipped in CI, which does not have access to those kind of credentials.

This endpoint will be used by the Data Catalog app to avoid distributing
an azure maps key within that application.

* Remove unneeded role assignment

* Remove unused variables
2024-03-18 09:44:34 -04:00
Matt McFarland 26a67e1266
Support collection-level vector tiles (#147)
* Fetch all configs when iterating over collections

Rather then fetch 1 render config at a time on the /collections
endpoint, fetch all at once and preserve the Dict for the request
duration.

* Allow POST CORS requests in dev env

* Vector tile support

* Add default msft:region attribute to collections

* Upgrade to postgres 14 and pgstac 0.6.13

Prod services operate on pg14

* Fix tests and setup

The API now uses table_service.get_entities and there is an Azurite bug
that prevents an empty string for "all records", so it was switched to a
specific PartitionKey filter string.

* Add logging for pbf requests

* Deployment

* Add logging and debug code

Analyze relative performance of different calls in the VT endpoint
chain.

* Fix Exceptions

* Changelog
2023-01-24 15:22:44 -05:00
Matt McFarland 7562b6052c
Fix tiler_href setting preventing full hrefs (#59)
The tiler_href env var value was updated to an incorrect value. This
fixes the appropriate setting, and adds a test to ensure that the setting
is applied as part of the generated tiler links.
2022-03-11 13:09:55 -05:00
Rob Emanuele 3684024c9c
Add redis for caching and rate limiting (#52)
* Add redis to docker-compose services

* Refactor get_request_ip into utils

* Rename TABLE_TTL -> TTL, will use it with caching

* Add redis caching and rate limiting to pccommon

* Add rate limit configuration

* Caching and rate limiting on STAC API

* Add redis to terraform

* Add redis config to helm charts

* Connect to redis for tests

* Add test for rate limit, but skip as it is nondeterministic

* Update CHANGELOG

* Implement backpressure

* Add backpressure to Helm chart

* Use decorators for rate_limit and back_pressure

* Add IP exception table that avoids rate limiting

* Get the IP from the last in the list, not first

If using an X-Forwarded-For to get the IP,
get the last one as that will be the IP coming from
the last proxy. The first IP can be anything set on
the header of the request. Since we take the
X-Azure-ClientIP header value first, this would
have not been used, but changing for best practice.

* And IP exception table to Helm chart

* Allow traffic from planetarycomputer-test

* Add ip-exception config to tiler docker-compose

Co-authored-by: Matt McFarland <mmcfarland@microsoft.com>
2022-03-04 15:23:45 -05:00
Rob Emanuele 33f5487247
Use Azure Storage Tables for collection and container configuration (#48)
* Add additional dependencies to pccommon

* Fix mypy error in pctiler

Brining in the type stubs for cachetools caused
mypy to complain about unknown types for the key
function

* Refactor scripts to test pccommon

Also run flake8 on pccommon,
which wasn't happening

* Linting fixups

* Add tables classes

* Refactor collection config in pccommon

Also refactor CommonConfig to use pydantic settings.
Create a table setup for collection configuration
and container configuration.
Use cachetools to cache the configuration.

* Add Azurite setup

Encode collection configuration and container
configuration (which was hardcoded) as JSON.
This can be used to populate the initial
table structure in deployment as well, after
which this test data will diverge from production
settings.

* Update codebase to use refactored configuration

* Set azurite settings in docker-compose

Also account for environment prefix for DEBUG
that change with refactor to use BaseSettings in
CommonConfig

* Move to using only pytest for consistency

* Test get render config for naip

* Refactor config code layout

Enable configuration of TTL

* Run azurite setup in scripts/setup

Also fix setup_azurite

* Add mosaicInfo and queriables to collection config

* Remove usage of requirements.txt

This was being used inconsistently.

* Add script for local package install

* Fetch queryables from storage tables

* Use orjson in pccommon

* Use ORJSONResponse

* Remove unused endpoint prefixes

* Add mosiac/info endpoint

* Add method to fetch all rows

* Add CLI for loading and dumping config data

* Variable for k8s version; update dev

* Allow AKS to pull from ACR

* Storage Tables in terraform

* Add config table env vars to helm charts

* Update ingress apiVersion

* Make note in deploy README about updating tables

* Update CHANGELOG

* Linting/formatting

* Remove unused __init__ override

This was left over from a previous
implementation, should have been cleaned up.

* Remove unused vars in dev terraform

* Allow cli to dump configs by id

Co-authored-by: Matt McFarland <mmcfarland@microsoft.com>
2022-02-17 16:06:08 -05:00
Vincent Sarago 61985a8dea
add packages setup.py and simplify dockerfiles (#30)
* add packages setup.py and simplify dockerfiles
2022-02-07 09:52:01 -05:00
Rob Emanuele 81a666e843
Project renames; publish and deploy (#12)
* Add helm chart publication

* Remove old cipublish path

* switch from "1" to "true"

GitHub sets CI to "true" rather than 1:
https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables

* wip -- attempt the run

* don't condition deploy step for now

* switch branch back to main

youc an use $default-branch in templates, but not
actual workflows:
https://github.blog/changelog/2020-07-22-github-actions-better-support-for-alternative-default-branch-names/

* switch branch back to main

youc an use $default-branch in templates, but not
actual workflows:
https://github.blog/changelog/2020-07-22-github-actions-better-support-for-alternative-default-branch-names/

* set azure env variables

* parse and echo from json

* don't set tenant id?

https://github.com/hashicorp/terraform-provider-azuread/issues/343#issuecomment-721455149

??

* oops i don't think these are getting passed through

* add override compose

this compose file un-sets the env variables that we don't have because
we don't have a .env file in ci, so I _think_ it should inherit them
from the environment

* add back mqe resource group

why was this deleted

am i being trolled

* Add path debugging

* check what tf keys we got

* remove api management from ingress 🤞🏻

* all container registries through github

* remove debug prints from jinja

* re-remove the mqe resource group

because it was deliberately missing, not accidentally

* skip tests for a sec

* debug echo cluster name and rg

* require az account env variables

* reuse tf env variable names

* don't point to `latest` tag

* Add workflow for publishing helm charts to GH Pages.

* Rename charts, separate published, reset versions

* Use -dev suffix for development release

* Publish dev charts only on main

* Rename mqe -> stac, dqe -> tiler in codebase

* Update README

Rename MQE to STAC API and DQE to Tiler; also editorally make things more terse

* Remove testdata, move loadtestdata to tests

* Remove out of date and generic docs for tiler

* Use cipublish to publish images

* Rename python packages to be prefixed with 'pc'

* Remove stac-vrt

* Remove unused model and method.

Also formatting

* Remove scripts/env

* Upgrade to stac-fastapi 2.2.0

* Delete unusued doc images

* Update deployment code with renames.

* Update cert-manager, other deployment fixes

* Test on cibuild, remove GA test branch trigger

* Fixup PR template

Co-authored-by: Nathan Zimmerman <npzimmerman@gmail.com>
Co-authored-by: James Santucci <james.santucci@gmail.com>
2021-11-01 11:27:39 -04:00
Rob Emanuele e1ec9529c6 Initial commit. 2021-10-18 12:13:28 -04:00