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

proper production deployment documentation #412

Open
gnosys-ccoupal opened this issue Jun 16, 2022 · 5 comments
Open

proper production deployment documentation #412

gnosys-ccoupal opened this issue Jun 16, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@gnosys-ccoupal
Copy link

I've been working through a number of production AWS deployment options... It surprises me that there isn't more guidance on how to deploy.

I'm volunteering to document the successful deployment but actually need to achieve it first. I'm sure there are many deployment approaches, but for me I've been playing around with an API Gateway approach (some success) and a ECS/Aurora serverless approach (some success). Both are currently struggling with proxy issues related to the base_url.

If anyone feels they have cracked this nut and are willing to collaborate, please let me know. I could see a few scenarios documented.

@alexgleith
Copy link

Hey @gnosys-ccoupal I'm keen to help with this too. I'm exploring the use of stac-fastapi, and currently, it seems to be able to run migration and a production Docker image, I'll need to read through the code and understand things a lot.

It would be great to have a docker-compose with a production deployment defined.

@geospatial-jeff
Copy link
Collaborator

geospatial-jeff commented Aug 4, 2022

At this point in time the main goal is to provide a Docker container with the application and nothing else; this is the least opinioned approach which gives the most flexibility to end users. Backends (ex. pgstac, sqlalchemy) will typically provide schema migrations but the implementation of course differs across backends. In the future it may be a good idea to add more opinionated deployment options for specific patterns (k8s, ecs/aurora etc.) but that is not an immediate goal.

Personally I have the most experience with deploying stac-fastapi to k8s and that has worked great so far. For a publicly facing deployment this looks something like nginx > k8s deployment > container(s) wrapped up and deployed with helm.

Please note that with #432 we are splitting the backends into their own individual repos, at which point it will probably be the responsibility of those repos to define deployment options. stac-fastapi itself (w/out the backends) may provide some basic tooling that is usable across different backends but ultimately the shape of the deployment will be influenced by its external dependencies (ex. postgres vs. elasticsearch vs. mongo).

@geospatial-jeff geospatial-jeff added the enhancement New feature or request label Aug 4, 2022
@gnosys-ccoupal
Copy link
Author

@alexgleith @geospatial-jeff thanks gents.. I'm going to try deploying this to ECS now that Tom has added support for X-Foreward and see how it goes. Jeff, I assume this would be similar to k8s, but I'd like to forgo nginx and replace with API gateway. Are you willing to share your helm chart?

@julianblue
Copy link

@gnosys-ccoupal , is there any update on this ? I was looking onto AWS deployment options and came across this post.

@cboettig
Copy link

@geospatial-jeff thanks for this, the docker-based deploy based on your docker-compose files is very smooth and easy. I'd still appreciate a little more documentation around that, e.g. most of the env vars used in the dockerized version are perfectly intuitive but not documented (i.e. what is the role of ENVIRONMENT=local)?

probably a stupid / naive question, but it's not obvious to me how to get my data into the API in the first place. I currently have a static STAC catalog and as it grows would like to provide an API option, but not entirely clear how I connect these dots. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants