-
Notifications
You must be signed in to change notification settings - Fork 6
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
Resolve chicken-vs-egg scenario of initial Heroku deployment vs initial DANDI Infrastructure deployment #195
Comments
Yikes, I was not aware of this intricacy. Thank you @aaronkanzer for filing the issue. |
In this case, Girder provisions much of the foundational resources that DANDI Archive relies on -- for starters, see here. We can always take the parts of Girder we like upstream and remove the reference to the module, but that could introduce different complexities. The core concept to keep in mind here (with Terraform modules in general), is that Terraform is designed to not have modules and resources defined upstream overwritten downstream -- upstream is immutable. Thus, any extension of Terraform is purely extension, not overwriting. I don't think this is a blocker by any means (we were able to deploy LINC Archive well enough, you could also theoretically switch |
Thanks @aaronkanzer. This is good to know. For LINC, what manual steps did you have to take to get around this circular dependency? I may have missed it in dandi/handbook#104. |
@kabilar -- definitely going to add handbook docs regarding this -- for LINC, I went into the Heroku app and populated the env vars manually in the Heroku console -- just a quick fix, but another manual step (see screenshot below -- red square is just hiding the env vars) |
Thanks. I would suggest that we keep this as a manual step for now. To resolve this circular dependency, I agree that we should update the Girder Readme and DANDI Handbook. |
@kabilar this isnt so much a problem with Girder, rather, it is the If |
Thanks. Is it possible to not hardcode this argument? I am not sure where |
Girder is the basis for the DANDI Archive API -- https://github.com/dandi/dandi-infrastructure/blob/master/terraform/api.tf#L5-L6.
A chicken vs. egg scenario occurs when using Girder for Heroku deployments of DANDI Archive, as DANDI Archive must be deployed at least once, applying its relevant Procfile to Heroku, as noted here in the Girder docs, prior to Heroku dyno configuration being recognized in corresponding
dandi-infrastructure
Terraform code.However, when initially deploying the DANDI Archive, certain environment variables must be set -- in the Django settings file here -- these values are set by the Terraform values set here -- thus, it is impossible to provide a clean, initial
terraform apply
, causing a chicken vs. egg scenario where DANDI Archive needs to be deployed beforedandi-infrastructure
, but can't because of missing env vars set via Girder.This ticket captures this issue -- there are be step-wise mechanisms to get around this (e.g. LINC Archive/infrastructure's prior trial-and-error), albeit potentially messy and confusing to a new user.
Cc @satra @kabilar @yarikoptic @waxlamp
The text was updated successfully, but these errors were encountered: