Sha256: e9a89253cf8abf0d64c40dc7db0ed1184db42413591c5556c9df03682afa88e2

Contents?: true

Size: 979 Bytes

Versions: 46

Compression:

Stored size: 979 Bytes

Contents

require 'spec_helper'

require 'ironfan'

describe Ironfan::Dsl::Cluster do
  let (:cluster) do
    Ironfan.cluster "sparky" do

      cloud(:ec2) do
        security_group(:ssh).authorize_port_range 22..22
        flavor 't1.micro'
      end

      facet :web do
        instances 3
        cloud(:ec2) do
          flavor 'm1.small'
          mount_ephemerals({ :disks => { 0 => { :mount_point => '/data' } } })
        end
      end

    end
  end

  describe 'web facet server resolution' do
    before { @facet = cluster.facets.values.first }
    subject { @facet }
    its(:name) { should eql "web" }

    it 'should have the right number of servers' do
      @facet.servers.length.should == 3
    end

    it 'should have one cloud provider, EC2' do
      @facet.servers[0].clouds.keys.should == [ :ec2 ]
    end

    it 'should have its first ephemeral disk mounted at /data' do
      @facet.servers[0].implied_volumes[1].mount_point.should == '/data'
    end
  end

end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
ironfan-4.11.1 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.11.0 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.10.4 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.10.3 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.10.2 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.10.1 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.10 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.9 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.8 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.7 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.6 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.5 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.4 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.3 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.2 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.1 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.9.0 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.8.7 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.8.6 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.8.5 spec/ironfan/ec2/cloud_provider_spec.rb