Sha256: cbfc3ed7d47ca05c3e0e81174d5bb3c5cfbe98bebdfd6c70fd4ad45dd5c56a81

Contents?: true

Size: 625 Bytes

Versions: 6

Compression:

Stored size: 625 Bytes

Contents

module Pvcglue
  class Nodes
    def self.build(roles_filter)
      Pvcglue::Nodes.new(roles_filter).run
    end

    def initialize(roles_filter)
      @roles_filter = roles_filter
    end

    def apply_role?(role)
      @roles_filter == 'all' || role == @roles_filter
    end
    
    def run
      puts "This is where it should configure the nodes for #{@roles_filter}.  :)"

      %w(lb db web caching redis).each do |role|
        if apply_role?(role)
          Pvcglue::Packages.apply(role.to_sym, :build, Pvcglue.cloud.nodes_in_stage(role))
        end
      end

      Pvcglue::Capistrano.capify

    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pvcglue-0.1.25 lib/pvcglue/nodes.rb
pvcglue-0.1.24 lib/pvcglue/nodes.rb
pvcglue-0.1.23 lib/pvcglue/nodes.rb
pvcglue-0.1.22 lib/pvcglue/nodes.rb
pvcglue-0.1.21 lib/pvcglue/nodes.rb
pvcglue-0.1.20 lib/pvcglue/nodes.rb