-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Graceful deployments #78
Comments
/bounty $50 |
💎 $50 bounty • AlgoraSteps to solve:
❗ Important guidelines:
Thank you for contributing to algora-io/tv! Add a bounty • Share on socials
|
@zcesur /attempt #78
|
/attempt #78 Options |
Just checking in, is this still needed? |
Yep, still open @raphaelbernhart |
/attempt #78 Options |
Related to algora-io#78 Implement graceful shutdown of old machines during Fly.io deployments to ensure livestreams are not interrupted. * **Pipeline Changes**: - Modify `lib/algora/pipeline.ex` to list pipelines using `Membrane.Pipeline.list_pipelines` and check for running livestreams. - Add logic to destroy old machines if no livestreams are running in the `:end_of_stream` callback. * **Termination Logic**: - Update `lib/algora/terminate.ex` to include a function `terminate_interrupted_streams` that lists pipelines and destroys old machines if no livestreams are running. * **Deployment Controller**: - Add `lib/algora_web/controllers/deployment_controller.ex` to handle deployment-related actions such as starting/stopping livestreams, triggering deployments, confirming livestream continuity, and destroying old machines. * **Router Updates**: - Modify `lib/algora_web/router.ex` to add routes for the new deployment-related actions in the `DeploymentController`. * **Tests**: - Add `test/algora_web/controllers/deployment_controller_test.exs` to test the new deployment-related actions in the `DeploymentController`.
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 usingMembrane.Pipeline.list_pipelines
If anyone wants to tackle this, please include a short demo of the entire process in the PR, which should include:
The text was updated successfully, but these errors were encountered: