-
Notifications
You must be signed in to change notification settings - Fork 113
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
Idea: Deployment API hooks #110
Comments
Generally 👍 but I am concerned about the 💥 that is Capistrano's callback morass. |
Seems like a resque style before_deploy, before_container_stop, before_container_start, after_deploy set would probably get you there. |
I've started on this. We need this feature as well to roll nodes in and out of our load balancers. |
@MarkBorcherding I think that the code might be simpler if you used existing rake API which lets you add before/after callbacks natively, rather than implementing a callback for every point in deployment lifecycle. I think that the only change necessary would be to split the rolling deploy into multiple tasks and passing state between them. |
@kremso I was thinking it would be that easy too when I started, but if you look at the existing rake tasks rolling through the server happens inside one task. You could create a |
That's why I'm suggesting to split the rolling_deploy task into multiple smaller tasks. Something like task :rolling_deploy do
on_each_docker_host do |server|
set :target_server, server
invoke 'deploy:stop'
invoke 'deploy:start_new'
invoke 'deploy:health_check'
invoke 'deploy:cleanup'
end
end |
I see. The problems i see is While the end result, would look cleaner, that change is a bit more invasive than I can manage right now. |
You're right, but you could change the invoke method to do something like below. Rake::Task[task].invoke(*args)
Rake::Task[task].reenable
Rake::Task[task].all_prerequisite_tasks.each &:reenable |
Some saas analytics platforms, like New Relic, have an API that can be called during deployment of new versions. I think it would be cool if centurion had support for something like this. Maybe just a method that could be overridden to make the API call at start or end of deployment?
The text was updated successfully, but these errors were encountered: