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-5.0.11 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-5.0.10 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-5.0.8 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-5.0.5 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-5.0.4 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-5.0.3 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-5.0.2 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-5.0.1 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-5.0.0 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.12.3 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.12.2 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.12.1 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.12.0 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.11.5 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.11.4 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.11.3 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.11.2 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.11.2.pre3 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.11.2.pre2 spec/ironfan/ec2/cloud_provider_spec.rb
ironfan-4.11.2.pre spec/ironfan/ec2/cloud_provider_spec.rb