bosh-stemcell 1.5.0.pre.1226 → 1.5.0.pre.1244

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.
Files changed (39) hide show
  1. data/lib/bosh/stemcell/version.rb +1 -1
  2. metadata +6 -75
  3. data/.rspec +0 -3
  4. data/Berksfile +0 -3
  5. data/Berksfile.lock +0 -28
  6. data/Vagrantfile +0 -50
  7. data/bosh-stemcell.gemspec +0 -28
  8. data/spec/assets/fake-stemcell-aws.tgz +0 -0
  9. data/spec/assets/fake-stemcell-vsphere.tgz +0 -0
  10. data/spec/assets/light-fake-stemcell-aws.tgz +0 -0
  11. data/spec/bosh/monkeypatch/serverspec/backend/exec_spec.rb +0 -46
  12. data/spec/bosh/stemcell/archive_filename_spec.rb +0 -56
  13. data/spec/bosh/stemcell/archive_spec.rb +0 -123
  14. data/spec/bosh/stemcell/aws/ami_spec.rb +0 -30
  15. data/spec/bosh/stemcell/aws/light_stemcell_spec.rb +0 -94
  16. data/spec/bosh/stemcell/aws/region_spec.rb +0 -12
  17. data/spec/bosh/stemcell/builder_command_spec.rb +0 -273
  18. data/spec/bosh/stemcell/builder_options_spec.rb +0 -216
  19. data/spec/bosh/stemcell/disk_image_spec.rb +0 -163
  20. data/spec/bosh/stemcell/infrastructure_spec.rb +0 -66
  21. data/spec/bosh/stemcell/operating_system_spec.rb +0 -47
  22. data/spec/bosh/stemcell/stage_collection_spec.rb +0 -279
  23. data/spec/bosh/stemcell/stage_runner_spec.rb +0 -141
  24. data/spec/bosh/stemcell/version_spec.rb +0 -12
  25. data/spec/bosh/stemcell_spec.rb +0 -6
  26. data/spec/spec_helper.rb +0 -6
  27. data/spec/stemcells/aws_spec.rb +0 -9
  28. data/spec/stemcells/centos_spec.rb +0 -146
  29. data/spec/stemcells/go_agent_spec.rb +0 -10
  30. data/spec/stemcells/openstack_spec.rb +0 -9
  31. data/spec/stemcells/ruby_agent_spec.rb +0 -27
  32. data/spec/stemcells/ubuntu_spec.rb +0 -165
  33. data/spec/stemcells/vsphere_spec.rb +0 -9
  34. data/spec/support/rspec_fire.rb +0 -9
  35. data/spec/support/serverspec.rb +0 -4
  36. data/spec/support/spec_assets.rb +0 -11
  37. data/spec/support/stemcell_image.rb +0 -26
  38. data/spec/support/stemcell_shared_examples.rb +0 -27
  39. data/spec/support/stub_env.rb +0 -5
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Stemcell
3
- VERSION = '1.5.0.pre.1226'
3
+ VERSION = '1.5.0.pre.1244'
4
4
  end
5
5
  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.5.0.pre.1226
4
+ version: 1.5.0.pre.1244
5
5
  prerelease: 6
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: 2013-11-01 00:00:00.000000000 Z
12
+ date: 2013-11-04 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.5.0.pre.1226
21
+ version: 1.5.0.pre.1244
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.5.0.pre.1226
29
+ version: 1.5.0.pre.1244
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rake
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -129,12 +129,6 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
- - .rspec
133
- - Berksfile
134
- - Berksfile.lock
135
- - README.md
136
- - Vagrantfile
137
- - bosh-stemcell.gemspec
138
132
  - lib/bosh/stemcell.rb
139
133
  - lib/bosh/stemcell/archive.rb
140
134
  - lib/bosh/stemcell/archive_filename.rb
@@ -150,38 +144,7 @@ files:
150
144
  - lib/bosh/stemcell/stage_runner.rb
151
145
  - lib/bosh/stemcell/version.rb
152
146
  - lib/monkeypatch/serverspec/backend/exec.rb
153
- - spec/assets/fake-stemcell-aws.tgz
154
- - spec/assets/fake-stemcell-vsphere.tgz
155
- - spec/assets/light-fake-stemcell-aws.tgz
156
- - spec/bosh/monkeypatch/serverspec/backend/exec_spec.rb
157
- - spec/bosh/stemcell/archive_filename_spec.rb
158
- - spec/bosh/stemcell/archive_spec.rb
159
- - spec/bosh/stemcell/aws/ami_spec.rb
160
- - spec/bosh/stemcell/aws/light_stemcell_spec.rb
161
- - spec/bosh/stemcell/aws/region_spec.rb
162
- - spec/bosh/stemcell/builder_command_spec.rb
163
- - spec/bosh/stemcell/builder_options_spec.rb
164
- - spec/bosh/stemcell/disk_image_spec.rb
165
- - spec/bosh/stemcell/infrastructure_spec.rb
166
- - spec/bosh/stemcell/operating_system_spec.rb
167
- - spec/bosh/stemcell/stage_collection_spec.rb
168
- - spec/bosh/stemcell/stage_runner_spec.rb
169
- - spec/bosh/stemcell/version_spec.rb
170
- - spec/bosh/stemcell_spec.rb
171
- - spec/spec_helper.rb
172
- - spec/stemcells/aws_spec.rb
173
- - spec/stemcells/centos_spec.rb
174
- - spec/stemcells/go_agent_spec.rb
175
- - spec/stemcells/openstack_spec.rb
176
- - spec/stemcells/ruby_agent_spec.rb
177
- - spec/stemcells/ubuntu_spec.rb
178
- - spec/stemcells/vsphere_spec.rb
179
- - spec/support/rspec_fire.rb
180
- - spec/support/serverspec.rb
181
- - spec/support/spec_assets.rb
182
- - spec/support/stemcell_image.rb
183
- - spec/support/stemcell_shared_examples.rb
184
- - spec/support/stub_env.rb
147
+ - README.md
185
148
  homepage: https://github.com/cloudfoundry/bosh
186
149
  licenses:
187
150
  - Apache 2.0
@@ -207,36 +170,4 @@ rubygems_version: 1.8.23
207
170
  signing_key:
208
171
  specification_version: 3
209
172
  summary: Bosh::Stemcell provides tools to manage stemcells
210
- test_files:
211
- - spec/assets/fake-stemcell-aws.tgz
212
- - spec/assets/fake-stemcell-vsphere.tgz
213
- - spec/assets/light-fake-stemcell-aws.tgz
214
- - spec/bosh/monkeypatch/serverspec/backend/exec_spec.rb
215
- - spec/bosh/stemcell/archive_filename_spec.rb
216
- - spec/bosh/stemcell/archive_spec.rb
217
- - spec/bosh/stemcell/aws/ami_spec.rb
218
- - spec/bosh/stemcell/aws/light_stemcell_spec.rb
219
- - spec/bosh/stemcell/aws/region_spec.rb
220
- - spec/bosh/stemcell/builder_command_spec.rb
221
- - spec/bosh/stemcell/builder_options_spec.rb
222
- - spec/bosh/stemcell/disk_image_spec.rb
223
- - spec/bosh/stemcell/infrastructure_spec.rb
224
- - spec/bosh/stemcell/operating_system_spec.rb
225
- - spec/bosh/stemcell/stage_collection_spec.rb
226
- - spec/bosh/stemcell/stage_runner_spec.rb
227
- - spec/bosh/stemcell/version_spec.rb
228
- - spec/bosh/stemcell_spec.rb
229
- - spec/spec_helper.rb
230
- - spec/stemcells/aws_spec.rb
231
- - spec/stemcells/centos_spec.rb
232
- - spec/stemcells/go_agent_spec.rb
233
- - spec/stemcells/openstack_spec.rb
234
- - spec/stemcells/ruby_agent_spec.rb
235
- - spec/stemcells/ubuntu_spec.rb
236
- - spec/stemcells/vsphere_spec.rb
237
- - spec/support/rspec_fire.rb
238
- - spec/support/serverspec.rb
239
- - spec/support/spec_assets.rb
240
- - spec/support/stemcell_image.rb
241
- - spec/support/stemcell_shared_examples.rb
242
- - spec/support/stub_env.rb
173
+ test_files: []
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --color
2
- --format progress
3
- --profile
data/Berksfile DELETED
@@ -1,3 +0,0 @@
1
- site :opscode
2
-
3
- cookbook 'golang'
data/Berksfile.lock DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "sources": {
3
- "golang": {
4
- "locked_version": "1.1.2"
5
- },
6
- "git": {
7
- "locked_version": "2.7.0"
8
- },
9
- "dmg": {
10
- "locked_version": "2.0.4"
11
- },
12
- "build-essential": {
13
- "locked_version": "1.4.2"
14
- },
15
- "yum": {
16
- "locked_version": "2.4.0"
17
- },
18
- "windows": {
19
- "locked_version": "1.11.0"
20
- },
21
- "chef_handler": {
22
- "locked_version": "1.1.4"
23
- },
24
- "runit": {
25
- "locked_version": "1.3.0"
26
- }
27
- }
28
- }
data/Vagrantfile DELETED
@@ -1,50 +0,0 @@
1
- Vagrant.configure('2') do |config|
2
- env = ENV.to_hash
3
- config.vm.box = 'bosh-stemcell'
4
- config.ssh.username = 'ubuntu'
5
-
6
- config.vm.define :local do |local|
7
- local.vm.box_url = 'https://bosh-jenkins-artifacts.s3.amazonaws.com/bosh-vagrant-boxes/bosh-stemcell-virtualbox.box'
8
- local.vm.provider :virtualbox do |virtualbox|
9
- virtualbox.customize ['modifyvm', :id, '--cpus', '2']
10
- virtualbox.customize ['modifyvm', :id, '--memory', '2048']
11
- end
12
- end
13
-
14
- config.vm.define :remote do |remote|
15
- remote.vm.box_url = 'https://bosh-jenkins-artifacts.s3.amazonaws.com/bosh-vagrant-boxes/bosh-stemcell-aws.box'
16
- remote.vm.provider :aws do |aws, override|
17
- aws.instance_type = 'c1.medium'
18
- aws.access_key_id = env.fetch('BOSH_AWS_ACCESS_KEY_ID')
19
- aws.secret_access_key = env.fetch('BOSH_AWS_SECRET_ACCESS_KEY')
20
- aws.keypair_name = 'bosh'
21
- aws.security_groups = ['bosh-stemcell']
22
- aws.tags = { 'Name' => 'bosh-stemcell' }
23
-
24
- override.ssh.username = 'ubuntu'
25
- override.ssh.private_key_path = '~/.ssh/id_rsa_bosh'
26
- end
27
- end
28
-
29
- config.vm.provision :shell do |shell|
30
- shell.inline = <<-BASH
31
- sudo mkdir -p /mnt/stemcells
32
- sudo chown -R ubuntu /mnt/stemcells
33
- BASH
34
- end
35
-
36
- config.omnibus.chef_version = :latest
37
- config.berkshelf.enabled = true
38
-
39
- config.vm.provision :chef_solo do |chef|
40
- chef.run_list = %w(recipe[golang])
41
-
42
- chef.json = {
43
- go: {
44
- version: '1.1.2',
45
- }
46
- }
47
- end
48
-
49
- config.vm.synced_folder '../', '/bosh'
50
- end
@@ -1,28 +0,0 @@
1
- # coding: utf-8
2
- version = File.read(File.expand_path('../../BOSH_VERSION', __FILE__)).strip
3
-
4
- Gem::Specification.new do |spec|
5
- spec.name = 'bosh-stemcell'
6
- spec.version = version
7
- spec.authors = 'Pivotal'
8
- spec.email = 'support@cloudfoundry.com'
9
- spec.description = 'Bosh::Stemcell provides tools to manage stemcells'
10
- spec.summary = 'Bosh::Stemcell provides tools to manage stemcells'
11
- spec.homepage = 'https://github.com/cloudfoundry/bosh'
12
- spec.license = 'Apache 2.0'
13
-
14
- spec.required_ruby_version = Gem::Requirement.new('>= 1.9.3')
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = %w[lib]
20
-
21
- spec.add_dependency 'bosh_aws_cpi', "~>#{version}"
22
- spec.add_development_dependency 'rake'
23
- spec.add_development_dependency 'rspec'
24
- spec.add_development_dependency 'rspec-fire'
25
- spec.add_development_dependency 'timecop'
26
- spec.add_development_dependency 'serverspec'
27
- spec.add_development_dependency 'foodcritic'
28
- end
Binary file
Binary file
@@ -1,46 +0,0 @@
1
- require 'spec_helper'
2
-
3
- module Serverspec::Backend
4
- describe Exec do
5
- subject(:exec) { Serverspec::Backend::Exec.instance }
6
-
7
- describe '#run_command' do
8
- context 'when #chroot_dir is NOT set' do
9
- before do
10
- exec.stub(chroot_dir: nil) # because "include Singleton"
11
- end
12
-
13
- it 'runs the provided command as expected' do
14
- exec.should_receive(:`).with('echo "FOO" 2>&1')
15
-
16
- exec.run_command('echo "FOO"')
17
- end
18
- end
19
-
20
- context 'when #chroot_dir is set' do
21
- before do
22
- exec.stub(chroot_dir: '/path/to/chroot') # because "include Singleton"
23
- end
24
-
25
- it 'runs the provided command within the chroot' do
26
- chroot_command = %Q{
27
- sudo chroot /path/to/chroot /bin/bash <<CHROOT_CMD
28
- echo "FOO" 2>&1; echo EXIT_CODE=\\$?
29
- CHROOT_CMD
30
- 2>&1}
31
- exec.should_receive(:`).with(chroot_command).and_return("FOO\nEXIT_CODE=0\n")
32
-
33
- exec.run_command('echo "FOO"')
34
- end
35
-
36
- it 'extracts the exit code returned from within the chroot into an Integer' do
37
- exec.stub(:` => "ATTENTION\nDO NOT CARE\nEXIT_CODE=8675309\n")
38
-
39
- result = exec.run_command('do_not_care')
40
-
41
- expect(result[:exit_status]).to eq(867_5309)
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,56 +0,0 @@
1
- require 'spec_helper'
2
-
3
- require 'bosh/stemcell/archive_filename'
4
- require 'bosh/stemcell/infrastructure'
5
- require 'bosh/stemcell/operating_system'
6
-
7
- module Bosh::Stemcell
8
- describe ArchiveFilename do
9
- let(:version) { '007' }
10
- let(:infrastructure) do
11
- instance_double('Bosh::Stemcell::Infrastructure::Base',
12
- name: 'INFRASTRUCTURE',
13
- hypervisor: 'HYPERVISOR')
14
- end
15
- let(:operating_system) do
16
- instance_double('Bosh::Stemcell::OperatingSystem::Base',
17
- name: 'OPERATING_SYSTEM')
18
- end
19
-
20
- subject(:archive_filename) do
21
- ArchiveFilename.new(version, infrastructure, operating_system, 'FAKE_NAME', light)
22
- end
23
-
24
- describe '#to_s' do
25
- context 'when stemcell is NOT light' do
26
- let(:light) { false }
27
-
28
- it 'includes name, version, infrastructure name, infrastructure hypervisor' do
29
- expect(archive_filename.to_s).to eq ('FAKE_NAME-007-INFRASTRUCTURE-HYPERVISOR-OPERATING_SYSTEM.tgz')
30
- end
31
- end
32
-
33
- context 'when stemcell is light' do
34
- let(:light) { true }
35
-
36
- it 'prefixes the name with "light-"' do
37
- expect(archive_filename.to_s).to eq ('light-FAKE_NAME-007-INFRASTRUCTURE-HYPERVISOR-OPERATING_SYSTEM.tgz')
38
- end
39
- end
40
-
41
- context 'when stemcell has ruby agent' do
42
- it 'does not include the agent name in the archive name' do
43
- archive_filename = ArchiveFilename.new(version, infrastructure, operating_system, 'FAKE_NAME', false, 'ruby')
44
- expect(archive_filename.to_s).to eq ('FAKE_NAME-007-INFRASTRUCTURE-HYPERVISOR-OPERATING_SYSTEM.tgz')
45
- end
46
- end
47
-
48
- context 'when stemcell has go agent' do
49
- it 'includes go_agent in the archive name' do
50
- archive_filename = ArchiveFilename.new(version, infrastructure, operating_system, 'FAKE_NAME', false, 'go')
51
- expect(archive_filename.to_s).to eq ('FAKE_NAME-007-INFRASTRUCTURE-HYPERVISOR-OPERATING_SYSTEM-go_agent.tgz')
52
- end
53
- end
54
- end
55
- end
56
- end
@@ -1,123 +0,0 @@
1
- require 'spec_helper'
2
- require 'bosh/stemcell/archive'
3
-
4
- module Bosh::Stemcell
5
- describe Archive do
6
- subject { described_class.new(stemcell_path) }
7
- let(:stemcell_path) { spec_asset('fake-stemcell-aws.tgz') }
8
-
9
- describe '#initialize' do
10
- it 'errors if path does not exist' do
11
- expect {
12
- described_class.new('/not/found/stemcell.tgz')
13
- }.to raise_error("Cannot find file `/not/found/stemcell.tgz'")
14
- end
15
- end
16
-
17
- describe '#manifest' do
18
- it 'has a manifest' do
19
- expect(subject.manifest).to be_a(Hash)
20
- end
21
- end
22
-
23
- describe '#name' do
24
- it 'has a name' do
25
- expect(subject.name).to eq('fake-stemcell')
26
- end
27
- end
28
-
29
- describe '#infrastructure' do
30
- it 'has an infrastructure' do
31
- expect(subject.infrastructure).to eq('aws')
32
- end
33
- end
34
-
35
- describe '#path' do
36
- it 'has a path' do
37
- expect(subject.path).to eq(stemcell_path)
38
- end
39
- end
40
-
41
- describe '#version' do
42
- it 'has a version' do
43
- expect(subject.version).to eq('007')
44
- end
45
- end
46
-
47
- describe '#sha1' do
48
- context 'when sha1 is just a string (from fake-stemcell-aws.tgz)' do
49
- it 'returns a sha1 as a string' do
50
- expect(subject.sha1).to eq('fake-stemcell-sha1')
51
- end
52
- end
53
-
54
- context 'when sha1 happens to be a number' do
55
- before { subject.manifest['sha1'] = 123 }
56
-
57
- it 'returns a sha1 as a string' do
58
- expect(subject.sha1).to eq('123')
59
- end
60
- end
61
-
62
- context 'when the sha1 is nil' do
63
- before { subject.manifest['sha1'] = nil }
64
-
65
- it 'raises an error' do
66
- expect {
67
- subject.sha1
68
- }.to raise_error(RuntimeError, 'sha1 must not be nil')
69
- end
70
- end
71
- end
72
-
73
- describe '#light?' do
74
- context 'when infrastructure is "aws"' do
75
- context 'when there is not an "ami" key in the "cloud_properties" section of the manifest' do
76
- it { should_not be_light }
77
- end
78
-
79
- context 'when there is an "ami" key in the "cloud_properties" section of the manifest' do
80
- let(:stemcell_path) { spec_asset('light-fake-stemcell-aws.tgz') }
81
- it { should be_light }
82
- end
83
- end
84
-
85
- context 'when infrastructure is anything but "aws"' do
86
- let(:stemcell_path) { spec_asset('fake-stemcell-vsphere.tgz') }
87
- it { should_not be_light }
88
- end
89
- end
90
-
91
- describe '#ami_id' do
92
- context 'when infrastructure is "aws"' do
93
- context 'when there is not an "ami" key in the "cloud_properties" section of the manifest' do
94
- its(:ami_id) { should be_nil }
95
- end
96
-
97
- context 'when there is an "ami" key in the "cloud_properties" section of the manifest' do
98
- let(:stemcell_path) { spec_asset('light-fake-stemcell-aws.tgz') }
99
- its(:ami_id) { should eq('ami-FAKE_AMI_KEY') }
100
- end
101
- end
102
-
103
- context 'when infrastructure is anything but "aws"' do
104
- let(:stemcell_path) { spec_asset('fake-stemcell-vsphere.tgz') }
105
- its(:ami_id) { should be_nil }
106
- end
107
- end
108
-
109
- describe '#extract' do
110
- it 'extracts stemcell' do
111
- Rake::FileUtilsExt.should_receive(:sh).with(
112
- /tar xzf .*#{stemcell_path} --directory/)
113
- subject.extract {}
114
- end
115
-
116
- it 'extracts stemcell and excludes files' do
117
- Rake::FileUtilsExt.should_receive(:sh).with(
118
- /tar xzf .*#{stemcell_path} --directory .* --exclude=image/)
119
- subject.extract(exclude: 'image') {}
120
- end
121
- end
122
- end
123
- end