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

Demo website isn't working #182

Open
plant99 opened this issue Jul 20, 2020 · 14 comments
Open

Demo website isn't working #182

plant99 opened this issue Jul 20, 2020 · 14 comments
Assignees
Labels
bug Something isn't working

Comments

@plant99
Copy link

plant99 commented Jul 20, 2020

https://terracotta-python.readthedocs.io/en/latest/preview-app.html on loading, gives the following error in browser console

Uncaught (in promise) TypeError: Cannot read property 'join' of undefined
    at updateColormap (main.js:593)
    at initUI (main.js:344)
    at main.js:1287
@dionhaefner
Copy link
Collaborator

Whoops! Thanks for letting us know.

The demo server runs an outdated version of Terracotta. I'm not sure how to best fix this (and avoid regressions in the future). Perhaps the Satlas and TC demo server should be separate deployments, where the latter one is deployed automatically on new releases (but they can use the same data). Would that be doable @j08lue?

@j08lue
Copy link
Collaborator

j08lue commented Jul 28, 2020

Perhaps the Satlas and TC demo server

Yes. I'll set up a dedicated demo deployment (AWS Lambda) with latest Terracotta.

How about we use some publicly available set of COGs and just index that? Any preferences? Maybe we can find some under this Twitter handle https://twitter.com/cogeotiff ...

In the https://registry.opendata.aws/ there are

We could also include historical maps from https://prd-tnm.s3.amazonaws.com/StagedProducts/Maps/HistoricalTopo/GeoTIFF/CA/CA_Yosemite_299696_1897_125000_geo.tif
https://kylebarron.dev/usgs-topo-mosaic
image

@dionhaefner
Copy link
Collaborator

Sure! Anything that's pretty to look at will do for me, really. If you can handle the AWS side of things and send me an access key, I can handle the Travis deployment. I think I would do it like this:

  • Run on new releases, before the PyPI deployment
  • Re-build database from scratch (so the rasters can't be too big)
  • Bundle the SQLite database with the Lambda code (then we don't need a dedicated S3 bucket for data)

@dionhaefner
Copy link
Collaborator

That hinges on the open data being cloud-optimized, though. Do you have any experience with that? Otherwise we would need to dump that into a dedicated S3 bucket (maybe the safer option anyway).

@j08lue
Copy link
Collaborator

j08lue commented Jul 31, 2020

Yes, the data I suggested is all COG. But we could also use our own data. The best would probably be to have both float and categorical data, so that we can nicely demo the color stretch functionality and users can also explore custom categorical color maps etc. So maybe I should just upload some of the old anyways.

Regarding deployment/upgrades: you are not talking about doing this in CI/CD, are you? Because, AFAIK, Zappa still requires an admin-ish account to create all the resources and roles that the S3 / Lambda / API Gateway stack needs and I don't want to store that anywhere, not even in GitHub/Travis secrets.

@dionhaefner
Copy link
Collaborator

The best would probably be to have both float and categorical data, so that we can nicely demo the color stretch functionality and users can also explore custom categorical color maps etc.

Don't bother with categorical data, the viewer doesn't expose that functionality.

AFAIK, Zappa still requires an admin-ish account to create all the resources and roles that the S3 / Lambda / API Gateway stack needs

Even when updating a Lambda? I imagine that S3 push access should be enough (but might be a PITA to figure out all the permissions)

@dionhaefner
Copy link
Collaborator

@j08lue Would it be possible to make a SQLite version of the Satlas database and deploy that for now? Just so we get the demo up and running again.

@ka-steve
Copy link

Do you have a working demo right now? I've just checked it and the linked demo still dies with the same error.

@j08lue
Copy link
Collaborator

j08lue commented Mar 23, 2021

I am terribly behind on getting a demo back up and will try to bump that up the priority list now. But in the meantime, you would be welcome to check out a deployment we have elsewhere: https://ix8zgaqqe1.execute-api.eu-central-1.amazonaws.com/production .

@ka-steve
Copy link

I am terribly behind on getting a demo back up and will try to bump that up the priority list now. But in the meantime, you would be welcome to check out a deployment we have elsewhere: https://ix8zgaqqe1.execute-api.eu-central-1.amazonaws.com/production .

Thanks for the reply, unfortunately it is a 404. I've managed to set up terracotta and test it on my computer, but I'm pretty sure it would be an important first step for other new users too to be able to see it before trying it out.

@j08lue
Copy link
Collaborator

j08lue commented Mar 25, 2021

Oh, sorry about that. The above URL is the Terracotta server deployment, so there is nothing to see there, but you can check out the REST API: the docs are at https://ix8zgaqqe1.execute-api.eu-central-1.amazonaws.com/production/apidoc.

To see it in action in the browser, you actually need to run the demo web client yourself, like

terracotta connect https://ix8zgaqqe1.execute-api.eu-central-1.amazonaws.com/production

You can also see the same server in action here: https://www.satlas.dk since we use it to feed that web app. Not the most recent viewer we have using Terracotta, but gives you an impression. We have probably 30 React web apps that show data hosted in various Terracotta deployments for various projects. Perhaps check out https://italy.satlas.dk or https://et4fao.dhigroup.com .

I'll still fix the docs so they point to a working deployment, of course.

@charalamm
Copy link
Collaborator

charalamm commented Feb 29, 2024

I created a demo that uses the terracotta frontend. https://terracotta-demo-frontend.orangebeach-11aa4896.westeurope.azurecontainerapps.io/. It has a cold start so please be patient at the beginning

I will add that to the docs in the near future with some explanation.

@dionhaefner
Copy link
Collaborator

Awesome, thanks @charalamm. Some questions:

  1. Any pointers as to what could be done about the cold start times? I think having a demo that stalls for a minute isn't a great experience for anyone interested in using Terracotta.
  2. How do we keep the demo deployment in sync with Terracotta? (This is what broke us the last time.) Any way we could get CI that redeploys on a new release or so?

@charalamm
Copy link
Collaborator

Hello @dionhaefner

  1. Thanks for raising this. I have put a minimum of 1 container so there should not be a cold start anymore
  2. Good point. I will work on it asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants