algora-io / tv

Open source Twitch for developers
https://algora.tv
Other
1.08k stars 69 forks source link

Graceful deployments #78

Open zcesur opened 2 months ago

zcesur commented 2 months ago

Let's set up a Fly.io deployment pipeline such that machines running with an old version are shut down gracefully. This is important to ensure livestreams are not interrupted during deployments

This tweet along with this complementary repo explain how we can implement this

The only missing part is to destroy old machines after all running livestreams are terminated, which we can implement inside the end_of_stream callback using Membrane.Pipeline.list_pipelines

If anyone wants to tackle this, please include a short demo of the entire process in the PR, which should include:

  1. Starting a livestream
  2. Triggering a deployment
  3. Confirming that the livestream is still running once the new version is deployed
  4. Stopping the livestream
  5. Confirming that the old machine is destroyed automatically
zcesur commented 2 months ago

/bounty $50

algora-pbc[bot] commented 2 months ago

💎 $50 bounty • Algora

Steps to solve:

  1. Start working: Comment /attempt #78 with your implementation plan
  2. Submit work: Create a pull request including /claim #78 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

❗ Important guidelines:

Thank you for contributing to algora-io/tv!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🔴 @aybanda Sep 5, 2024, 6:04:09 AM WIP
🟢 @destinedcodes Sep 12, 2024, 4:36:40 PM WIP
🟢 @vishwamartur Nov 17, 2024, 5:19:09 PM #119
aybanda commented 2 months ago

@zcesur /attempt #78 Here is my implementation plan 1.Set up environment 2.Implement livestream status check 3.Implement old machine destruction check 4.Create livestream control endpoints 5.Test livestream start 6.Set up Fly.io deployment 7.Implement deployment monitoring 8.Run full demo deployment 9.Error handling

Algora profile Completed bounties Tech Active attempts Options
@aybanda 1 bounty from 1 project
Cancel attempt
ThePrimeJnr commented 2 months ago

/attempt #78

raphaelbernhart commented 1 month ago

Just checking in, is this still needed?

zcesur commented 1 month ago

Yep, still open @raphaelbernhart

vishwamartur commented 1 week ago

/attempt #78

algora-pbc[bot] commented 1 week ago

💡 @vishwamartur submitted a pull request that claims the bounty. You can visit your bounty board to reward.