dtcarls / fantasy_football_chat_bot

GroupMe Discord and Slack Chatbot for ESPN Fantasy Football
GNU General Public License v3.0
296 stars 234 forks source link

Serverless Setup Boilerplate/Instructions #33

Closed mikaelweave closed 5 years ago

mikaelweave commented 5 years ago

These scheduled messages seem like an ideal use case for running as scheduled, serverless function in order to minimize the amount of compute needed to run this workload. Also management would be easier as there would be no need to keep the process running.

Is there any interest in some basic scaffolding code and documentation around getting this to code to work as a scheduled Azure Function? Ideally there would be an easy deployment script (terraform, bash, powershell, whatever) that folks can run to handle the deployment.

dtcarls commented 5 years ago

I 100% agree it fits that architecture perfectly and debated implementing it over the summer. However the barrier to entry then gets higher for the casual commissioner. I am still potentially interested in doing it in another branch just for the exercise of it and potentially pull into master if I can get it as close as possible to the “push button” setup.

On Thu, Aug 29, 2019 at 2:57 PM Mikael Stadden notifications@github.com wrote:

These scheduled messages seem like an ideal use case for running as scheduled, serverless function in order to minimize the amount of compute needed to run this workload. Also management would be easier as there would be no need to keep the process running.

Is there any interest in some basic scaffolding code and documentation around getting this to code to work as a scheduled Azure Function? Ideally there would be an easy deployment script (terraform, bash, powershell, whatever) that folks can run to handle the deployment.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dtcarls/ff_bot/issues/33?email_source=notifications&email_token=ACWGOWKGRMMXYL4P5LLM6FLQHALZLA5CNFSM4ISFXJN2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HII5GGQ, or mute the thread https://github.com/notifications/unsubscribe-auth/ACWGOWPJ4YMVVTHAH2HIRRDQHALZLANCNFSM4ISFXJNQ .

mikaelweave commented 5 years ago

I completed this and I'm honestly not super happy with how Azure Functions requires function folders to be top level (it clutters the repository). There is a more elegant way to use a Logic App to trigger the function via HTTP but I'm out of time today and I want to think on it.

Check it out below if you'd like, it's working for my league. I can clean it up and add deployment instructions if you're looking to use it as an example in docs. Perhaps it would be more useful if I just made an Azure Function shim for this in a completely separate repo.

Repo link here

dtcarls commented 5 years ago

Thank you for sharing this. Do you mind if I put in a branch of this base repo?

mikaelweave commented 5 years ago

Not at all - I guess fixes could be merged from main back to the "cloud" branch. I have a bit of cleanup (ARM template deploy, docs) to do - but you can add it now if you'd like and I can do a PR against the new branch.

dtcarls commented 5 years ago

Added to azure-serverless branch. Thank you @mikaelweave