bosh-stemcell 1.2902.0 → 1.2905.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76bde8475a4210e1fd35c457fb02eb8f6884ff0c
4
- data.tar.gz: 52d550bc951f06e4c8e087b49fda9d9fcb15cae5
3
+ metadata.gz: f7c872da86e9de36279c5bae453ad95f947f04b3
4
+ data.tar.gz: 278a1d681113be28bda7c92dcf3746190c25ccbe
5
5
  SHA512:
6
- metadata.gz: 84b7f9f0130228ad82e9bd3ef1a4ffbee30f1e664feddbab614265301920e85f9c707eb7759c1eab4752b285214ac719a8fce55a5f20cadaf176ad1968d35777
7
- data.tar.gz: 9e68b7fc8e145b343731057ed50943cc259a885c4ed3de17e8ad4bdb325256f1b6175a31cbe244d66dd7139e49a456f33e105be5c950233c0bc68bcfd303b127
6
+ metadata.gz: 18ea9bb338dfbedb6820e43468c4a1825e8926920dfb1440a6724a5dd574cf747bd4a4aa911bd4f284c097f876a8016ce35ba4ff2a06f2a0f44074628a66ef15
7
+ data.tar.gz: f73524ea57b4a6328d0aed5fb066fc9650e117d93fa4971f9a1dc24bbb43270df2df2c381152baf52d13d274cb22762691816b19945ba986425896da0cc8e990
data/README.md CHANGED
@@ -35,6 +35,16 @@ With existing stemcell building VM run:
35
35
  cd bosh-stemcell
36
36
  vagrant provision remote
37
37
 
38
+ ## Configure your local ssh and scp to communicate with the stemcell building VM
39
+
40
+ Once the stemcell builing machine is up, run:
41
+
42
+ vagrant ssh-config remote
43
+
44
+ Then copy the resulting output into your `~/.ssh/config` file.
45
+
46
+ Once this has been done, you can ssh into the stemcell building machine with `ssh remote`
47
+ and you can copy files to and from it using `scp localfile remote:/path/to/destination`
38
48
 
39
49
  ## Build an OS image
40
50
 
@@ -49,10 +59,31 @@ If you have changes that will require new OS image you need to build one. A stem
49
59
 
50
60
  The arguments to `stemcell:build_os_image` are:
51
61
 
52
- 1. *`operating_system_name`* identifies which type of OS to fetch. Determines which package repository and packaging tool will be used to download and assemble the files. Must match a value recognized by the [OperatingSystem](lib/bosh/stemcell/operating_system.rb) module. Currently, only `ubuntu` and `centos` are recognized.
53
- 2. *`operating_system_version`* an identifier that the system may use to decide which release of the OS to download. Acceptable values depend on the operating system. For `ubuntu`, use `trusty`. For `centos`, use `6` or `7`. No other combinations are presently supported.
62
+ 1. *`operating_system_name`* identifies which type of OS to fetch. Determines which package repository and packaging tool will be used to download and assemble the files. Must match a value recognized by the [OperatingSystem](lib/bosh/stemcell/operatingsystem.rb) module. Currently, `ubuntu` `centos` and `rhel` are recognized.
63
+ 2. *`operating_system_version`* an identifier that the system may use to decide which release of the OS to download. Acceptable values depend on the operating system. For `ubuntu`, use `trusty`. For `centos`, use `6` or `7`. For `rhel`, use `7`.
54
64
  3. *`os_image_path`* the path to write the finished OS image tarball to. If a file exists at this path already, it will be overwritten without warning.
55
65
 
66
+ ### Special requirements for building a RHEL OS image
67
+
68
+ There are a few extra steps you need to do before building a RHEL OS image:
69
+
70
+ 1. Start up or re-provision the stemcell building machine (run `vagrant up` or `vagrant provision` from this directory)
71
+ 2. Download the RHEL 7 install DVD image and use `scp` to copy it to the stemcell building machine
72
+ 3. On the stemcell building machine, mount the RHEL 7 DVD at `/mnt/rhel`:
73
+
74
+ # mkdir -p /mnt/rhel
75
+ # mount rhel-server-7.0-x86_64-dvd.iso /mnt/rhel
76
+
77
+ 4. On the stemcell building machine, put your Red Hat Account username and password into environment variables:
78
+
79
+ $ export RHN_USERNAME=my-rh-username@company.com
80
+ $ export RHN_PASSWORD=my-password
81
+
82
+ 5. On the stemcell building machine, run the stemcell building rake task:
83
+
84
+ $ cd /bosh
85
+ $ bundle exec rake stemcell:build_os_image[rhel,7,/tmp/rhel_7_base_image.tgz]
86
+
56
87
  See below [Building the stemcell with local OS image](#building-the-stemcell-with-local-os-image) on how to build stemcell with the new OS image.
57
88
 
58
89
  ## Building a stemcell
@@ -43,8 +43,6 @@ module Bosh::Stemcell
43
43
  "cd #{STEMCELL_SPECS_DIR};",
44
44
  "OS_IMAGE=#{os_image_tarball_path}",
45
45
  'bundle exec rspec -fd',
46
- "spec/os_image/common_spec.rb",
47
- "spec/os_image/#{operating_system.name}_common_spec.rb",
48
46
  "spec/os_image/#{operating_system_spec_name}_spec.rb",
49
47
  ].join(' ')
50
48
  end
@@ -65,6 +65,8 @@ module Bosh::Stemcell
65
65
  {
66
66
  'UBUNTU_ISO' => environment['UBUNTU_ISO'],
67
67
  'UBUNTU_MIRROR' => environment['UBUNTU_MIRROR'],
68
+ 'RHN_USERNAME' => environment['RHN_USERNAME'],
69
+ 'RHN_PASSWORD' => environment['RHN_PASSWORD'],
68
70
  }
69
71
  end
70
72
 
@@ -4,6 +4,7 @@ module Bosh::Stemcell
4
4
  def self.for(operating_system_name, operating_system_version = nil)
5
5
  case operating_system_name
6
6
  when 'centos' then Centos.new(operating_system_version)
7
+ when 'rhel' then Rhel.new(operating_system_version)
7
8
  when 'ubuntu' then Ubuntu.new(operating_system_version)
8
9
  else raise ArgumentError.new("invalid operating system: #{operating_system_name}")
9
10
  end
@@ -22,6 +23,12 @@ module Bosh::Stemcell
22
23
  end
23
24
  end
24
25
 
26
+ class Rhel < Base
27
+ def initialize(version)
28
+ super(name: 'rhel', version: version)
29
+ end
30
+ end
31
+
25
32
  class Centos < Base
26
33
  def initialize(version)
27
34
  super(name: 'centos', version: version)
@@ -11,10 +11,12 @@ module Bosh::Stemcell
11
11
 
12
12
  def operating_system_stages
13
13
  case operating_system
14
- when OperatingSystem::Centos then
15
- centos_os_stages
16
- when OperatingSystem::Ubuntu then
17
- ubuntu_os_stages
14
+ when OperatingSystem::Centos then
15
+ centos_os_stages
16
+ when OperatingSystem::Rhel then
17
+ rhel_os_stages
18
+ when OperatingSystem::Ubuntu then
19
+ ubuntu_os_stages
18
20
  end
19
21
  end
20
22
 
@@ -67,7 +69,7 @@ module Bosh::Stemcell
67
69
  def_delegators :@definition, :infrastructure, :operating_system, :agent
68
70
 
69
71
  def openstack_stages
70
- if operating_system.instance_of?(OperatingSystem::Centos)
72
+ if operating_system.instance_of?(OperatingSystem::Centos) || operating_system.instance_of?(OperatingSystem::Rhel)
71
73
  centos_openstack_stages
72
74
  else
73
75
  ubuntu_openstack_stages
@@ -95,7 +97,6 @@ module Bosh::Stemcell
95
97
  :base_centos,
96
98
  :base_centos_packages,
97
99
  :base_ssh,
98
- :bosh_sysctl,
99
100
  bosh_steps,
100
101
  :rsyslog_config,
101
102
  :delay_monit_start,
@@ -109,6 +110,19 @@ module Bosh::Stemcell
109
110
  os_stages
110
111
  end
111
112
 
113
+ def rhel_os_stages
114
+ [
115
+ :base_rhel,
116
+ :base_centos_packages,
117
+ :base_ssh,
118
+ bosh_steps,
119
+ :rsyslog_config,
120
+ :delay_monit_start,
121
+ :system_grub,
122
+ :rhel_unsubscribe,
123
+ ].flatten
124
+ end
125
+
112
126
  def ubuntu_os_stages
113
127
  [
114
128
  :base_debootstrap,
@@ -119,7 +133,6 @@ module Bosh::Stemcell
119
133
  :base_ssh,
120
134
  :bosh_dpkg_list,
121
135
  :bosh_sysstat,
122
- :bosh_sysctl,
123
136
  :system_kernel,
124
137
  bosh_steps,
125
138
  :rsyslog_build,
@@ -132,6 +145,7 @@ module Bosh::Stemcell
132
145
 
133
146
  def bosh_steps
134
147
  [
148
+ :bosh_sysctl,
135
149
  :bosh_users,
136
150
  :bosh_monit,
137
151
  :bosh_ntpdate,
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Stemcell
3
- VERSION = '1.2902.0'
3
+ VERSION = '1.2905.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.2902.0
4
+ version: 1.2905.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pivotal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bosh_aws_cpi
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.2902.0
19
+ version: 1.2905.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.2902.0
26
+ version: 1.2905.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bosh-core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.2902.0
33
+ version: 1.2905.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.2902.0
40
+ version: 1.2905.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: fakefs
43
43
  requirement: !ruby/object:Gem::Requirement