Closed djcp closed 8 years ago
I don't know of anyone who has deployed UDOIT to Heroku successfully, but we want the system to be deployable to as many platforms as possible.
We have a few ideas for storing the reports in a different way, like gzipping them and storing them in the database, but I don't know when we'll get around to doing that. Most of our time is spent squashing bugs and adding UFIXITs, and we haven't run into any scale issues yet.
I'm interested to hear your experience with deploying UDOIT to Heroku, and I hope you'll consider contributing to this project. There's a lot of work to be done in terms of scale and automated testing/deployment, and we'll need all the help we can get.
In practice, the reports generally seem to hover around 75-250kb, but can vary greatly.
The database would be the simplest place to setup for everyone, though I think we'd find s3 more desirable over time.
s3 is pretty simple and gets rid of all load and scaling concerns around assets. Is there a pluggable storage PHP library you could use? There must be. If you're familiar with ruby, I'm thinking something like fog
or paperclip
.
The other big change is configuration through environment variables to allow the same code to be pushed to multiple remotes for absolute production / development parity. All hostnames, database dsns, etc, need to be set via ENV.
What's neat about making your app work for heroku is that it's useful generically - it'll make your app easier:
I haven't had a role in building till now. Now that it's out and gaining traction, I want to squeeze in some spare time to make UDOIT a little more polished and easier to deploy.
I was polishing first, but I'll take a look at Heroku support very soon.
Progress!!
I've been working on this on my own fork. It requires some small but not trivial changes. (postgresql support, file organization, relative url updates, config changes, and s3 integration)
It's able to scan the course, but I'll need the team to help me test it before it's ready.
You're a champ! Thanks! Once you've got a PR ready I'd be happy to review and do a test deploy.
I created a PR, it's massive (changes include moving stuff around to keep files out of the web reachable directories).
The move will require some new configuration to set up in an existing directory for those that have already deployed. We'll test that out in the next week or so.
Currently, this ignores changing the file storage to S3. We've talked internally, I think we need to mature the reports a bit. They need to be deleted after a certain point, and they need should probably just be moved into the database.
That said, the reports function fine currently as-is. They just may get lost if heorku clears out the disk.
I'll be adding heroku setup instructions soon.
Resolved with v2.0.0
Have you, or do you know of anyone that's deployed this to heroku? PHP apps work fine on heroku, BTW, as long as they adhere (or can be easily modified) to 12 factor principles.
Using file system storage for reports stands out as being problematic - it means the app couldn't easily be put behind a load balancer without using NFS or some other shared file system. Typically you'd use database, s3, or some other detached persistence in a separately scaled service.
Thanks! We're interested in hosting this but would like to keep it consistent with our other heroku-hosted LTI apps.