Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
This repository was archived by the owner on Jan 28, 2026. It is now read-only.

Idea: Deployment API hooks #110

Closed
Closed

Description

@bettse

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?

Activity

  1. relistan commented on Apr 30, 2015

    @relistan
    Collaborator

    Generally 👍 but I am concerned about the 💥 that is Capistrano's callback morass.

  2. intjonathan commented on May 8, 2015

    @intjonathan
    Contributor

    Seems like a resque style before_deploy, before_container_stop, before_container_start, after_deploy set would probably get you there.

  3. MarkBorcherding commented on Jun 7, 2015

    @MarkBorcherding
    Contributor

    I've started on this. We need this feature as well to roll nodes in and out of our load balancers.

  4. kremso commented on Jun 8, 2015

    @kremso
    Contributor

    @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.

  5. MarkBorcherding commented on Jun 9, 2015

    @MarkBorcherding
    Contributor

    @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 before_everything and after_everything, but you can't create one around an individual host.

  6. kremso commented on Jun 9, 2015

    @kremso
    Contributor

    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
  7. MarkBorcherding commented on Jun 9, 2015

    @MarkBorcherding
    Contributor

    I see. The problems i see is invoke, assuming you're using the Rake based Capistrano, will only run a task once, and execute doesn't run any prereqs...if I remember correctly.

    While the end result, would look cleaner, that change is a bit more invasive than I can manage right now.

  8. kremso commented on Jun 9, 2015

    @kremso
    Contributor

    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
  9. idleyoungman commented on Sep 11, 2025

    @idleyoungman
    Member

    We're archiving the project, so I'm closing all open issues:
    #208

    Thanks for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions