Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: custom domain name #15

Merged
merged 7 commits into from
Aug 21, 2023
Merged

feat: custom domain name #15

merged 7 commits into from
Aug 21, 2023

Conversation

jjfrench
Copy link
Collaborator

@jjfrench jjfrench commented Aug 16, 2023

  • adds logic to create custom domain names for stac-api, titiler-pgstac-api, and stac-ingestor-api
  • for custom domain names to be deployed, the following environment variables must be defined before deployment : CERTIFICATE_ARN (the ARN of the certificate to be used for the domain name), INGESTOR_CUSTOM_DOMAIN_NAME (if missing, no domain name will be created for the ingestor API), STAC_API_CUSTOM_DOMAIN_NAME (if missing, no domain name will be created for the STAC API) and TITILER_PGSTAC_API_CUSTOM_DOMAIN_NAME (if missing, no domain name will be created for the titiler pgstac API)
  • there must be route53 records pointing to each custom domain names created here. Those records are not created here, so they must be manually updated every time the custom domain names are re-created (because their regional domain name changes).

@emileten
Copy link
Contributor

This was deployed locally to the test environment with the main branch of eoapi-cdk and it's breaking the titiler pgstac. https://titiler-pgstac-api.dit.maap-project.org/docs gives Internal Server Error. Logs from the AWS console :

[ERROR] ValidationError: 1 validation error for PostgresSettings
database_url
  can only concatenate str (not "NoneType") to str (type=type_error)
Traceback (most recent call last):
  File "/var/lang/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/var/task/handler.py", line 9, in <module>
    from titiler.pgstac.main import app
  File "/tmp/pip-target-wacn12dk/lib/python/titiler/pgstac/main.py", line 42, in <module>
  File "pydantic/env_settings.py", line 40, in pydantic.env_settings.BaseSettings.__init__
  File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__

By locally deploying with eoapi-cdk main we incorporated this change developmentseed/eoapi-cdk#61, that significantly bumps titiler-pgstac and changes a little bit the handler, I strongly suspect this is the cause.

@emileten
Copy link
Contributor

I think I found the bug, I am going to try to redeploy to test with a fix right now

Copy link
Contributor

@emileten emileten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was also unable to create the ingestor domain name when deploying locally. I fixed this bug and the other one I mentioned (titiler-pgstac broken) in developmentseed/eoapi-cdk#63.

I am not approving this yet, as we need to change the import statement once the eoapi-cdk PR is merged.

cdk/PgStacInfra.ts Show resolved Hide resolved
cdk/config.ts Show resolved Hide resolved
cdk/PgStacInfra.ts Outdated Show resolved Hide resolved
@emileten emileten temporarily deployed to test August 21, 2023 10:41 — with GitHub Actions Inactive
@emileten emileten temporarily deployed to dev August 21, 2023 11:12 — with GitHub Actions Inactive
Copy link
Contributor

@emileten emileten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deployed on GH to test and dev

@emileten emileten merged commit 23fc3d7 into main Aug 21, 2023
@emileten emileten deleted the feature/custom-domain-name branch August 22, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants