bosh-stemcell 1.2427.0 → 1.2446.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.
- data/README.md +3 -3
- data/lib/bosh/stemcell/archive_filename.rb +1 -11
- data/lib/bosh/stemcell/build_environment.rb +10 -2
- data/lib/bosh/stemcell/builder_options.rb +2 -4
- data/lib/bosh/stemcell/definition.rb +13 -2
- data/lib/bosh/stemcell/operating_system.rb +6 -5
- data/lib/bosh/stemcell/stage_collection.rb +1 -0
- data/lib/bosh/stemcell/version.rb +1 -1
- metadata +5 -5
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,ruby,
|
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]
|
35
35
|
' remote
|
36
36
|
|
37
37
|
# Run the stemcell locally with Fusion
|
@@ -112,7 +112,7 @@ A stemcell with a custom OS image can be built using the stemcell-building VM cr
|
|
112
112
|
|
113
113
|
vagrant ssh -c '
|
114
114
|
cd /bosh
|
115
|
-
bundle exec rake stemcell:build_os_image[
|
116
|
-
bundle exec rake stemcell:build_with_local_os_image[aws,
|
115
|
+
bundle exec rake stemcell:build_os_image[ubuntu,lucid,/tmp/ubuntu_base_image.tgz]
|
116
|
+
bundle exec rake stemcell:build_with_local_os_image[aws,ubuntu,lucid,ruby,/tmp/ubuntu_base_image.tgz]
|
117
117
|
' remote
|
118
118
|
|
@@ -15,11 +15,8 @@ module Bosh::Stemcell
|
|
15
15
|
stemcell_filename_parts = [
|
16
16
|
name,
|
17
17
|
version,
|
18
|
-
|
19
|
-
infrastructure.hypervisor,
|
20
|
-
operating_system.name,
|
18
|
+
@definition.stemcell_name
|
21
19
|
]
|
22
|
-
stemcell_filename_parts << "#{agent.name}_agent" unless agent.name == 'ruby'
|
23
20
|
"#{stemcell_filename_parts.join('-')}.tgz"
|
24
21
|
end
|
25
22
|
|
@@ -29,13 +26,6 @@ module Bosh::Stemcell
|
|
29
26
|
light ? "light-#{base_name}" : base_name
|
30
27
|
end
|
31
28
|
|
32
|
-
def_delegators(
|
33
|
-
:@definition,
|
34
|
-
:infrastructure,
|
35
|
-
:operating_system,
|
36
|
-
:agent,
|
37
|
-
)
|
38
|
-
|
39
29
|
attr_reader(
|
40
30
|
:base_name,
|
41
31
|
:version,
|
@@ -36,7 +36,7 @@ module Bosh::Stemcell
|
|
36
36
|
"cd #{STEMCELL_SPECS_DIR};",
|
37
37
|
"OS_IMAGE=#{os_image_tarball_path}",
|
38
38
|
'bundle exec rspec -fd',
|
39
|
-
"spec/os_image/#{
|
39
|
+
"spec/os_image/#{operating_system_spec_name}_spec.rb",
|
40
40
|
].join(' ')
|
41
41
|
end
|
42
42
|
|
@@ -45,7 +45,7 @@ module Bosh::Stemcell
|
|
45
45
|
"cd #{STEMCELL_SPECS_DIR};",
|
46
46
|
"STEMCELL_IMAGE=#{image_file_path}",
|
47
47
|
"bundle exec rspec -fd#{exclude_exclusions}",
|
48
|
-
"spec/stemcells/#{
|
48
|
+
"spec/stemcells/#{operating_system_spec_name}_spec.rb",
|
49
49
|
"spec/stemcells/#{agent.name}_agent_spec.rb",
|
50
50
|
"spec/stemcells/#{infrastructure.name}_spec.rb",
|
51
51
|
].join(' ')
|
@@ -103,6 +103,14 @@ module Bosh::Stemcell
|
|
103
103
|
shell.run("sudo rm -rf #{base_directory}", { ignore_failures: true })
|
104
104
|
end
|
105
105
|
|
106
|
+
def operating_system_spec_name
|
107
|
+
spec_name = operating_system.name
|
108
|
+
if operating_system.version
|
109
|
+
spec_name = "#{spec_name}_#{operating_system.version}"
|
110
|
+
end
|
111
|
+
spec_name
|
112
|
+
end
|
113
|
+
|
106
114
|
def prepare_build_path
|
107
115
|
FileUtils.rm_rf(build_path, verbose: true) if File.exist?(build_path)
|
108
116
|
FileUtils.mkdir_p(build_path, verbose: true)
|
@@ -19,17 +19,15 @@ module Bosh::Stemcell
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def default
|
22
|
-
stemcell_name = "bosh-#{infrastructure.name}-#{infrastructure.hypervisor}-#{operating_system.name}"
|
23
|
-
stemcell_name += "-#{agent.name}_agent" unless agent.name == 'ruby'
|
24
|
-
|
25
22
|
{
|
26
|
-
'stemcell_name' => stemcell_name,
|
23
|
+
'stemcell_name' => "bosh-#{@definition.stemcell_name}",
|
27
24
|
'stemcell_tgz' => archive_filename.to_s,
|
28
25
|
'stemcell_image_name' => stemcell_image_name,
|
29
26
|
'stemcell_version' => stemcell_version,
|
30
27
|
'stemcell_hypervisor' => infrastructure.hypervisor,
|
31
28
|
'stemcell_infrastructure' => infrastructure.name,
|
32
29
|
'stemcell_operating_system' => operating_system.name,
|
30
|
+
'stemcell_operating_system_version' => operating_system.version,
|
33
31
|
'bosh_protocol_version' => Bosh::Agent::BOSH_PROTOCOL,
|
34
32
|
'ruby_bin' => ruby_bin,
|
35
33
|
'bosh_release_src_dir' => File.join(source_root, 'release/src/bosh'),
|
@@ -6,10 +6,10 @@ module Bosh::Stemcell
|
|
6
6
|
class Definition
|
7
7
|
attr_reader :infrastructure, :operating_system, :agent
|
8
8
|
|
9
|
-
def self.for(infrastructure_name, operating_system_name, agent_name)
|
9
|
+
def self.for(infrastructure_name, operating_system_name, operating_system_version, agent_name)
|
10
10
|
new(
|
11
11
|
Bosh::Stemcell::Infrastructure.for(infrastructure_name),
|
12
|
-
Bosh::Stemcell::OperatingSystem.for(operating_system_name),
|
12
|
+
Bosh::Stemcell::OperatingSystem.for(operating_system_name, operating_system_version),
|
13
13
|
Bosh::Stemcell::Agent.for(agent_name),
|
14
14
|
)
|
15
15
|
end
|
@@ -20,6 +20,17 @@ module Bosh::Stemcell
|
|
20
20
|
@agent = agent
|
21
21
|
end
|
22
22
|
|
23
|
+
def stemcell_name
|
24
|
+
stemcell_name_parts = [
|
25
|
+
infrastructure.name,
|
26
|
+
infrastructure.hypervisor,
|
27
|
+
operating_system.name,
|
28
|
+
]
|
29
|
+
stemcell_name_parts << operating_system.version if operating_system.version
|
30
|
+
stemcell_name_parts << "#{agent.name}_agent" unless agent.name == 'ruby'
|
31
|
+
stemcell_name_parts.join('-')
|
32
|
+
end
|
33
|
+
|
23
34
|
def ==(other)
|
24
35
|
infrastructure == other.infrastructure &&
|
25
36
|
operating_system == other.operating_system &&
|
@@ -1,18 +1,19 @@
|
|
1
1
|
module Bosh::Stemcell
|
2
2
|
module OperatingSystem
|
3
|
-
def self.for(operating_system_name)
|
3
|
+
def self.for(operating_system_name, operating_system_version = nil)
|
4
4
|
case operating_system_name
|
5
5
|
when 'centos' then Centos.new
|
6
|
-
when 'ubuntu' then Ubuntu.new
|
6
|
+
when 'ubuntu' then Ubuntu.new(operating_system_version)
|
7
7
|
else raise ArgumentError.new("invalid operating system: #{operating_system_name}")
|
8
8
|
end
|
9
9
|
end
|
10
10
|
|
11
11
|
class Base
|
12
|
-
attr_reader :name
|
12
|
+
attr_reader :name, :version
|
13
13
|
|
14
14
|
def initialize(options = {})
|
15
15
|
@name = options.fetch(:name)
|
16
|
+
@version = options.fetch(:version, nil)
|
16
17
|
end
|
17
18
|
|
18
19
|
def ==(other)
|
@@ -27,8 +28,8 @@ module Bosh::Stemcell
|
|
27
28
|
end
|
28
29
|
|
29
30
|
class Ubuntu < Base
|
30
|
-
def initialize
|
31
|
-
super(name: 'ubuntu')
|
31
|
+
def initialize(version)
|
32
|
+
super(name: 'ubuntu', version: version)
|
32
33
|
end
|
33
34
|
end
|
34
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bosh-stemcell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2446.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-04-
|
12
|
+
date: 2014-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bosh_aws_cpi
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.2446.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
29
|
+
version: 1.2446.0
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: fakefs
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
188
|
version: '0'
|
189
189
|
segments:
|
190
190
|
- 0
|
191
|
-
hash: -
|
191
|
+
hash: -3079839408081351394
|
192
192
|
requirements: []
|
193
193
|
rubyforge_project:
|
194
194
|
rubygems_version: 1.8.23
|