dmac / fezzik

A light deployment system that takes care of the heavy lifting.
https://rubygems.org/gems/fezzik
MIT License
37 stars 6 forks source link

Expose weave options #53

Closed dmac closed 11 years ago

dmac commented 11 years ago

Weave accepts some options, such as the number of concurrent connections to use, that fezzik doesn't yet take advantage of. There are a few ways we could expose this:

  1. Global option

    Fezzik.num_threads = 20
  2. Option on host task

    host_task :foo, :num_threads => 20 do
    end
  3. General exposure of weave options

    host_task :foo, :weave_options => {:num_threads => 20} do
    end

Other weave options to potentially add are :serial and :batch_by.

dmac commented 11 years ago

Weave options are now allowed on the same level as :deps, :args, and :roles, and are passed along to the weave connection pool.

cespare commented 11 years ago

Cool, I like this. The third option looks the messiest but I think it's the best because (a) it's not magical (there's no translation of certain options to weave options) and (b) you probably won't be specifying these options very often.

Side note: do you now get rolling deploys for free by doing :weave_options => { :batch_by => N, :num_threads => N } on your deploy host_task?

dmac commented 11 years ago

Almost. If you have the common setup of a single :deploy task that has many :host_tasks as dependencies, you couldn't (for example) add those options to the top level :deploy task.

You can, however, add them to your restart task, and you're basically good.

cespare commented 11 years ago

Oh, will those settings not recursively apply? It seems like they should.

dmac commented 11 years ago

I meant that you can't specify them on task, just host_task.