bosh-stemcell 1.2732.0 → 1.2739.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6af57b2b2aa30aeb5e1371bac76cc2089a8c9a11
4
- data.tar.gz: d85dcb63119f9b54967bd8994e19c2ed94534f98
3
+ metadata.gz: f391c492204806e3bfcd171e26854c8af6408f95
4
+ data.tar.gz: c6c48c98b4c63f4969e8d05ef9b6a257edcf3875
5
5
  SHA512:
6
- metadata.gz: c4a975a647be7580188d58926442860781afa0688d116bb89d4f0676070bfc6ecbc3e8fa041755df3fde41d87e24327dd00d2a9807265f3e924aeb3421b6d172
7
- data.tar.gz: 80d441d98f340b07d55f05cb7c9794194e995efb593726719df72d24bee61e1693b93ae699bf57b525f63aa9eb11b2fa95db42e5a05d1113e4fd43ecb28a4b90
6
+ metadata.gz: f38634e2673109b6301ed6854a1ae4ec88fbe46c0e0f449bcb430525812e63479a7b01372eef5cf81db77d8217470c37b585c88875b3c63b25bed512078ca840
7
+ data.tar.gz: c96dfad9f812e7a2e3bf822d77228fa192cbd337463e9580567700c12abbf9523a089cbced1e9f3824ee90ba666570b789e4e6f696f088a900e08dc170828f05
data/README.md CHANGED
@@ -31,7 +31,7 @@ The final two arguments are the S3 bucket and key for the OS image to use, which
31
31
 
32
32
  vagrant ssh -c '
33
33
  cd /bosh
34
- CANDIDATE_BUILD_NUMBER=<current_build> http_proxy=http://localhost:3142/ bundle exec rake stemcell:build[vsphere,centos,nil,ruby,bosh-os-images,bosh-centos-6_5-os-image.tgz]
34
+ CANDIDATE_BUILD_NUMBER=<current_build> http_proxy=http://localhost:3142/ bundle exec rake stemcell:build[vsphere,esxi,centos,nil,ruby,bosh-os-images,bosh-centos-6_5-os-image.tgz]
35
35
  ' remote
36
36
 
37
37
  # Run the stemcell locally with Fusion
@@ -113,6 +113,6 @@ A stemcell with a custom OS image can be built using the stemcell-building VM cr
113
113
  vagrant ssh -c '
114
114
  cd /bosh
115
115
  bundle exec rake stemcell:build_os_image[ubuntu,trusty,/tmp/ubuntu_base_image.tgz]
116
- bundle exec rake stemcell:build_with_local_os_image[aws,ubuntu,trusty,go,/tmp/ubuntu_base_image.tgz]
116
+ bundle exec rake stemcell:build_with_local_os_image[aws,xen,ubuntu,trusty,ruby,/tmp/ubuntu_base_image.tgz]
117
117
  ' remote
118
118
 
@@ -4,18 +4,17 @@ module Bosh::Stemcell
4
4
  class ArchiveFilename
5
5
  extend Forwardable
6
6
 
7
- def initialize(version, definition, base_name, light)
7
+ def initialize(version, definition, base_name)
8
8
  @version = version
9
9
  @definition = definition
10
10
  @base_name = base_name
11
- @light = light
12
11
  end
13
12
 
14
13
  def to_s
15
14
  stemcell_filename_parts = [
16
15
  name,
17
16
  version,
18
- @definition.stemcell_name
17
+ definition.stemcell_name
19
18
  ]
20
19
  "#{stemcell_filename_parts.join('-')}.tgz"
21
20
  end
@@ -23,13 +22,13 @@ module Bosh::Stemcell
23
22
  private
24
23
 
25
24
  def name
26
- light ? "light-#{base_name}" : base_name
25
+ definition.light? ? "light-#{base_name}" : base_name
27
26
  end
28
27
 
29
28
  attr_reader(
30
29
  :base_name,
31
30
  :version,
32
- :light,
31
+ :definition,
33
32
  )
34
33
  end
35
34
  end
@@ -9,9 +9,10 @@ module Bosh::Stemcell::Aws
9
9
  class Ami
10
10
  attr_reader :stemcell
11
11
 
12
- def initialize(stemcell, region)
12
+ def initialize(stemcell, region, virtualization_type)
13
13
  @stemcell = stemcell
14
14
  @region = region
15
+ @virtualization_type = virtualization_type || 'paravirtual'
15
16
  end
16
17
 
17
18
  def publish
@@ -21,7 +22,10 @@ module Bosh::Stemcell::Aws
21
22
  cloud = Bosh::Clouds::Provider.create(options, 'fake-director-uuid')
22
23
 
23
24
  stemcell.extract do |tmp_dir, stemcell_manifest|
24
- ami_id = cloud.create_stemcell("#{tmp_dir}/image", stemcell_manifest['cloud_properties'])
25
+ cloud_properties = stemcell_manifest['cloud_properties'].merge(
26
+ 'virtualization_type' => virtualization_type
27
+ )
28
+ ami_id = cloud.create_stemcell("#{tmp_dir}/image", cloud_properties)
25
29
  cloud.ec2.images[ami_id].public = true
26
30
  ami_id
27
31
  end
@@ -29,7 +33,7 @@ module Bosh::Stemcell::Aws
29
33
 
30
34
  private
31
35
 
32
- attr_reader :region
36
+ attr_reader :region, :virtualization_type
33
37
 
34
38
  def options
35
39
  # just fake the registry struct, as we don't use it
@@ -6,8 +6,9 @@ require 'bosh/stemcell/aws/ami'
6
6
 
7
7
  module Bosh::Stemcell::Aws
8
8
  class LightStemcell
9
- def initialize(stemcell)
9
+ def initialize(stemcell, virtualization_type)
10
10
  @stemcell = stemcell
11
+ @virtualization_type = virtualization_type
11
12
  end
12
13
 
13
14
  def write_archive
@@ -25,16 +26,18 @@ module Bosh::Stemcell::Aws
25
26
  end
26
27
 
27
28
  def path
28
- File.join(File.dirname(stemcell.path), "light-#{File.basename(stemcell.path)}")
29
+ stemcell_name = File.basename(stemcell.path)
30
+ stemcell_name = stemcell_name.gsub("xen", "xen-hvm") if virtualization_type == "hvm"
31
+ File.join(File.dirname(stemcell.path), "light-#{stemcell_name}")
29
32
  end
30
33
 
31
34
  private
32
35
 
33
- attr_reader :stemcell
36
+ attr_reader :stemcell, :virtualization_type
34
37
 
35
38
  def manifest
36
39
  region = Region.new
37
- ami = Ami.new(stemcell, region)
40
+ ami = Ami.new(stemcell, region, virtualization_type)
38
41
  ami_id = ami.publish
39
42
  manifest = Bosh::Common::DeepCopy.copy(stemcell.manifest)
40
43
  manifest['cloud_properties']['ami'] = { region.name => ami_id }
@@ -77,7 +77,7 @@ module Bosh::Stemcell
77
77
  end
78
78
 
79
79
  def archive_filename
80
- ArchiveFilename.new(stemcell_version, definition, 'bosh-stemcell', false)
80
+ ArchiveFilename.new(stemcell_version, definition, 'bosh-stemcell')
81
81
  end
82
82
 
83
83
  def stemcell_image_name
@@ -4,26 +4,37 @@ require 'bosh/stemcell/agent'
4
4
 
5
5
  module Bosh::Stemcell
6
6
  class Definition
7
- attr_reader :infrastructure, :operating_system, :agent
7
+ attr_reader :infrastructure, :hypervisor_name, :operating_system, :agent
8
8
 
9
- def self.for(infrastructure_name, operating_system_name, operating_system_version, agent_name)
9
+ def self.for(
10
+ infrastructure_name,
11
+ hypervisor_name,
12
+ operating_system_name,
13
+ operating_system_version,
14
+ agent_name,
15
+ light
16
+ )
10
17
  new(
11
18
  Bosh::Stemcell::Infrastructure.for(infrastructure_name),
19
+ hypervisor_name,
12
20
  Bosh::Stemcell::OperatingSystem.for(operating_system_name, operating_system_version),
13
21
  Bosh::Stemcell::Agent.for(agent_name),
22
+ light
14
23
  )
15
24
  end
16
25
 
17
- def initialize(infrastructure, operating_system, agent)
26
+ def initialize(infrastructure, hypervisor_name, operating_system, agent, light)
18
27
  @infrastructure = infrastructure
28
+ @hypervisor_name = hypervisor_name
19
29
  @operating_system = operating_system
20
30
  @agent = agent
31
+ @light = light
21
32
  end
22
33
 
23
34
  def stemcell_name
24
35
  stemcell_name_parts = [
25
36
  infrastructure.name,
26
- infrastructure.hypervisor,
37
+ hypervisor_name,
27
38
  operating_system.name,
28
39
  ]
29
40
  stemcell_name_parts << operating_system.version if operating_system.version
@@ -34,7 +45,12 @@ module Bosh::Stemcell
34
45
  def ==(other)
35
46
  infrastructure == other.infrastructure &&
36
47
  operating_system == other.operating_system &&
37
- agent == other.agent
48
+ agent == other.agent &&
49
+ light? == other.light?
50
+ end
51
+
52
+ def light?
53
+ @light
38
54
  end
39
55
  end
40
56
  end
@@ -29,15 +29,10 @@ module Bosh::Stemcell
29
29
  @default_disk_size = options.fetch(:default_disk_size)
30
30
  end
31
31
 
32
- def light?
33
- @supports_light_stemcell
34
- end
35
-
36
32
  def ==(other)
37
33
  name == other.name &&
38
34
  hypervisor == other.hypervisor &&
39
- default_disk_size == other.default_disk_size &&
40
- light? == other.light?
35
+ default_disk_size == other.default_disk_size
41
36
  end
42
37
  end
43
38
 
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Stemcell
3
- VERSION = '1.2732.0'
3
+ VERSION = '1.2739.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-stemcell
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2732.0
4
+ version: 1.2739.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-30 00:00:00.000000000 Z
11
+ date: 2014-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bosh_aws_cpi
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2732.0
19
+ version: 1.2739.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.2732.0
26
+ version: 1.2739.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fakefs
29
29
  requirement: !ruby/object:Gem::Requirement