reclaim-the-stack / talos-manager

Rails application to help bootstrap Talos Linux on Hetzner servers
MIT License
32 stars 10 forks source link

Talos manager doesn't come up #4

Closed gunnars04 closed 9 months ago

gunnars04 commented 9 months ago

Hi, I'm running through the Talos Manager tutorial again, and the app builds and deploys ok But nothing comes up in the url (that I set previously in the HOST variable) https://talos-manager-br.herokuapp.com/ And if I click the "open app" link in the Heroku dashboard, I get this link and a 403 https://talos-manager-br-f84bb46ed82a.herokuapp.com/ I did the tutorial 2x times (with different host names each time), and same result My host url is correct "heroku config:get HOST" gives me: talos-manager-br.herokuapp.com image

If I go to: https://talos-manager-br-f84bb46ed82a.herokuapp.com/ and do: "heroku logs --tail" I get: ERROR -- : [ActionDispatch::HostAuthorization::DefaultResponseApp] Blocked host: talos-manager-br-f84bb46ed82a.herokuapp.com And if I go to https://talos-manager-br.herokuapp.com/ I get nothing in the log. image

dbackeus commented 9 months ago

@gunnars04 kind of looks like it really expects talos-manager-br-f84bb46ed82a.herokuapp.com to be the host used. Does it work if you set HOST=talos-manager-br-f84bb46ed82a.herokuapp.com and use that as the domain?

Not sure why the suffix has been added to your app name. I'm assuming inside the Heroku UI that your app is named just talos-manager-br?

Maybe worth adding a custom domain and using your own host for more flexibility later on (eg. if you want to migrate talos-manager to another place in the future).

gunnars04 commented 9 months ago

@dbackeus I think I found the reason for this: https://devcenter.heroku.com/changelog-items/2597

No, it didn't help to change the host variable to the app domain url (I also deleted the app and re-created it). Adding a custom domain also didn't help. I still get the same 403 error in the logs when doing heroku logs --tail

I did: heroku config:set HOST=[my custom domain]

Also made a change and did a "git push heroku" (not sure if was needed though).

https://mi-test-talos-manager-76c645f5f9f1.herokuapp.com/

gunnars04 commented 9 months ago

@dbackeus Could you please try the first steps of the readme until after this step: git push heroku and see if you get reach your app at appname.herokuapp.com? :)

gunnars04 commented 9 months ago

Works now! 👍 I just did all the steps in the readme Got the error Created an Azure App Service (B1 SKU for $13/month, but I guess free with 60cpu minutes/day could work too) with the latest docker image: https://hub.docker.com/r/reclaimthestack/talos-manager/tags Created the name/value pairs in Configuration -> Application settings (same one that I used before in heroku config, except host=my azure domain name) Restarted the service Wollah!

Additional app service settings I did: Network -> Access restriction and white listed my ip (deny everything else)

View logs realtime: Monitoring -> Log Stream

image

Update: Another issue I had was getting a "could not parse private key" error, after creating a hetzner cloud server + clicking "sync" button. The solution was replacing empty space with a new line in the private key string (see first answer): https://stackoverflow.com/questions/49858657/how-do-you-insert-a-newline-in-an-azure-app-service-app-setting

dbackeus commented 9 months ago

For the record: Updated the documentation and app logic to support this new Heroku approach to subdomains in https://github.com/reclaim-the-stack/talos-manager/commit/bef536b035e57ff04557c83b53a2da64cb6d3590