votingworks / arlo

GNU Affero General Public License v3.0
141 stars 25 forks source link

Document minimal deployment requirements, e.g. Heroku plan #511

Open nealmcb opened 4 years ago

nealmcb commented 4 years ago

What sort of Heroku plan would be necessary to:

Presumably Arlo it requires Postgresql support.

What about TLS support. Is it required even just for experimenting / testing / demos?

How much RAM?

Anything else to consider, for the Heroku newbie?

nealmcb commented 4 years ago

Oh, and do you have any simple hints on how to actually deploy on a cloud under any of those scenarios, to get folks started?

nealmcb commented 4 years ago

I guess that perhaps the first part of the answer is already in app.json, which currently lists "addons": [heroku-postgresql:hobby-free"]

I'm trying a free, but "verified" (via credit card) "hobby-free" Heroku account. I manually provisioned postgresql, which I though would happen automatically based on the app.json addons, but didn't (perhaps because I wasn't yet using a verified account?)

Then following the heroku commands in the README.md seemed helpful, and got me pretty far, but I haven't figured out the right blend of configuration options yet, or else am running in to bugs or something. I guess I have to set FLASK_ENV=staging manually, as well as DATABASE_URL, ARLO_HTTP_ORIGIN and ARLO_HTTP_ORIGIN. Then the app starts, but for some reason it tells me it is Running on http://0.0.0.0:58298/. When I visit the app url, I get a 404 not found.

nealmcb commented 4 years ago

Help!

I keep getting a wide variety errors when I try to get Arlo running via Heroku, everything from lack of dependencies that need to be chased down, to errors like sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) FATAL: permission denied for database "postgres" DETAIL: User does not have CONNECT privilege. due to the restrictions in the environment.

But surely it can be made to work, since the DOCKER support was dropped in its favor as noted in #296.

Providing documentation or hints or answers on how to get this running would immeasurably benefit the community's efforts to help you out and improve Arlo for everyone.

benadida commented 4 years ago

fair request, it may take us a bit to get to it, though, we've got an incredibly tight schedule between now and November.

umbernhard commented 4 years ago

@nealmcb for a local instance, we're working on a script to get you up and running here: https://github.com/votingworks/arlo/pull/750

I'm also reviewing the Heroku requirements you're asking for.

nealmcb commented 4 years ago

Thanks for the reference to votingworks/nOAuth: a simple oauth server that does NO real authentication and helps you test systems that depend on OAuth. More convenient than setting real auth servers up e.g. via auth0. And I like your cute new video to warn against running insecure servers ;)

I found the scripts/setup-dev.py code more useful as documentation than as something I could just run, since it assumes particular places and ways of installing the dependencies. So I excerpted pieces out into shell scripts for convenience. Thanks.