microsoft / PlanetaryComputer

Issues, discussions, and information about the Microsoft Planetary Computer
https://planetarycomputer.microsoft.com/
MIT License
185 stars 9 forks source link

Difficulties setting up own PC hub #280

Closed mattsmiScientific closed 1 year ago

mattsmiScientific commented 1 year ago

Experiencing difficulties installing own Planetary Computer Hub in Azure. Following instructions here: https://planetarycomputer.microsoft.com/docs/concepts/hub-deployment/.

I can get "simple deployment" to work, but cannot get "recommended deployment" to.

I find the instructions get too vague in the "Create app registration" section leaving me unsure what I'm missing / doing wrong. The direction to https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app introduces quite a few new sources of variation. I'm trying to follow the "default path" but am unsure in some of the setup details (is this a "Web application?" or "Single page application?" and can I just pick https://pangeo-hub.westeurope.cloudapp.azure.com/ as my url?)

Is there an even more explicit walkthrough doc/video for this bit?

TomAugspurger commented 1 year ago

is this a "Web application"?

Yes. This is a Web application (the JupyterHub server is the web sever in this case), not a Single page application (which is Javascript that runs client side). I can update the docs to clarify that.

and can I just pick https://pangeo-hub.westeurope.cloudapp.azure.com/ as my url?)

That's addressed a bit further down:

When creating a new app registration, you’ll be asked for a redirect URI. This URI should match where your users will access the Hub. If your organization already has a DNS provider, use that. Alternatively, you can have Azure handle the DNS for your Hub service automatically, which is what we’ll use in this guide. We’re calling our cluster pangeo-hub and deploying it in West Europe, so the callback URL is https://pangeo-hub.westeurope.cloudapp.azure.com/hub/oauth_callback. In general the pattern is https://..cloudapp.azure.com/hub/oauth_callback.

There isn't a longer walkthrough of this. I'm trying to keep things maintainable, and only cover surface things here while linking to the upstream documentation for the details.

TomAugspurger commented 1 year ago

https://github.com/microsoft/PlanetaryComputerDataCatalog/pull/446 clarifies things a bit. LMK if there are still spots that are confusing.

mattsmiScientific commented 1 year ago

Thanks Tom - it's certainly good to be clear it's a web application! The further text is still not actually explicit. "We're calling out cluster....." - yes, but am I allowed to call it the same? I understand it's difficult to write when there's such a wide diversity of possible configuration cases. Right now I am assuming that I can use the URL https://pangeo-hub.westeurope.cloudapp.azure.com/hub/oauth_callback

mattsmiScientific commented 1 year ago

This is now sorted. To close the loop. You DO need a URL that is different from the one in the example, otherwise the IP address sits as "pending". So I made my own custom service name at westeurope.cloudapp etc... and clean rebuilt the PC and it finally worked. Phew, I need a lie down now.

TomAugspurger commented 1 year ago

You DO need a URL that is different from the one in the example, otherwise the IP address sits as "pending"

Yes, that's setting a DNS value, which needs to be globally unique.

Glad you got it sorted out!