boxgrinder-build 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@
22
22
 
23
23
  require 'rubygems'
24
24
 
25
- gem 'boxgrinder-core', '>= 0.0.1'
25
+ gem 'boxgrinder-core', '>= 0.0.2'
26
26
  gem 'aws-s3', '>= 0.6.2'
27
27
  gem 'amazon-ec2', '>= 0.9.6'
28
28
  gem 'net-sftp', '>= 2.0.4'
@@ -39,10 +39,10 @@ rescue LoadError
39
39
  end
40
40
 
41
41
  task :default do
42
- puts "Run '#{Rake.application.name} -T' to get list of all available commands."
42
+ puts "Run '#{Rake.application.name} -T' to get list of all available commands."
43
43
  end
44
44
 
45
- BoxGrinder::RakeHelper.new
45
+ BoxGrinder::RakeHelper.new( :version => "1.0.0.Beta2", :release => "SNAPSHOT" )
46
46
 
47
47
  Rake.application.init('boxgrinder')
48
48
  Rake.application.top_level
@@ -31,9 +31,8 @@ module BoxGrinder
31
31
 
32
32
  aws_validator = AWSValidator.new( @config )
33
33
  aws_validator.validate_aws_config( @config.data['aws'] )
34
- aws_validator.validate_aws_release_config( @config.data['release'] )
35
34
 
36
- @aws_data = @config.data['aws']
35
+ @aws_data = @config.data['aws']
37
36
 
38
37
  # remove dashes from account number
39
38
  @aws_data['account_number'] = @aws_data['account_number'].to_s.gsub(/-/, '')
@@ -47,7 +46,7 @@ module BoxGrinder
47
46
  attr_reader :s3
48
47
 
49
48
  def bucket_key( appliance_name )
50
- "#{@config.release.s3['bucket_name']}/#{@config.version_with_release}/#{@appliance_config.hardware.arch}/#{appliance_name}"
49
+ "#{@aws_data['bucket_name']}/#{appliance_name}/#{@appliance_config.version}.#{@appliance_config.release}/#{@appliance_config.hardware.arch}"
51
50
  end
52
51
 
53
52
  def bucket_manifest_key( appliance_name )
@@ -155,9 +155,25 @@ module BoxGrinder
155
155
 
156
156
  if @appliance_config.os.name.eql?("fedora") and @appliance_config.os.version.to_s.eql?("12")
157
157
  @log.debug "Downgrading udev package to use in EC2 environment..."
158
+
159
+ repo_included = false
160
+
161
+ @appliance_config.repos.each do |repo|
162
+ repo_included = true if repo['baseurl'] == "http://repo.boxgrinder.org/boxgrinder/packages/fedora/12/RPMS/#{@appliance_config.hardware.arch}"
163
+ end
164
+
165
+ guestfs.upload( "#{@config.dir.base}/src/ec2/f12-#{@appliance_config.hardware.arch}-boxgrinder.repo", "/etc/yum.repos.d/f12-#{@appliance_config.hardware.arch}-boxgrinder.repo" ) unless repo_included
158
166
  guestfs.sh( "yum -y downgrade udev-142" )
159
167
  guestfs.upload( "#{@config.dir.base}/src/f12/yum.conf", "/etc/yum.conf" )
168
+ guestfs.rm_rf( "/etc/yum.repos.d/f12-#{@appliance_config.hardware.arch}-boxgrinder.repo" ) unless repo_included
169
+
160
170
  @log.debug "Package udev downgraded."
171
+
172
+ # TODO EC2 fix, remove that after Fedora pushes kernels to Amazon
173
+ @log.debug "Disabling unnecessary services..."
174
+ guestfs.sh( "/sbin/chkconfig ksm off" ) if guestfs.exists( "/etc/init.d/ksm" ) != 0
175
+ guestfs.sh( "/sbin/chkconfig ksmtuned off" ) if guestfs.exists( "/etc/init.d/ksmtuned" ) != 0
176
+ @log.debug "Services disabled."
161
177
  end
162
178
 
163
179
  guestfs.close
@@ -94,7 +94,7 @@ module BoxGrinder
94
94
  @log.debug "Changing configuration files using augeas..."
95
95
  guestfs.aug_init( "/", 0 )
96
96
  # don't use DNS for SSH
97
- guestfs.aug_set( "/files/etc/ssh/sshd_config/UseDNS", "no" ) if guestfs.exists( '/etc/ssh/sshd_config' )
97
+ guestfs.aug_set( "/files/etc/ssh/sshd_config/UseDNS", "no" ) if guestfs.exists( '/etc/ssh/sshd_config' ) != 0
98
98
  guestfs.aug_save
99
99
  @log.debug "Augeas changes saved."
100
100
  end
@@ -45,14 +45,7 @@ module BoxGrinder
45
45
  raise ValidationError, "Please specify account number in aws section in configuration file (#{@config.config_file}). #{DEFAULT_HELP_TEXT[:general]}" if config['account_number'].nil?
46
46
  raise ValidationError, "Please specify access key in aws section in configuration file (#{@config.config_file}). #{DEFAULT_HELP_TEXT[:general]}" if config['access_key'].nil?
47
47
  raise ValidationError, "Please specify secret access key in aws section in configuration file (#{@config.config_file}). #{DEFAULT_HELP_TEXT[:general]}" if config['secret_access_key'].nil?
48
- end
49
-
50
- # TODO we're using this?
51
- def validate_aws_release_config( config )
52
- return if config.nil?
53
-
54
- raise ValidationError, "No 's3' subsection in 'release' section in configuration file (#{@config.config_file})." if config['s3'].nil?
55
- raise ValidationError, "Please specify bucket name in 's3' subsection in configuration file (#{@config.config_file})." if config['s3']['bucket_name'].nil? or config['s3']['bucket_name'].length == 0
48
+ raise ValidationError, "Please specify bucket name in in aws section in configuration file (#{@config.config_file})." if config['bucket_name'].nil? or config['bucket_name'].length == 0
56
49
  end
57
50
  end
58
51
  end
@@ -0,0 +1,11 @@
1
+ [boxgrinder-i386]
2
+ name=boxgrinder-i386
3
+ enabled=1
4
+ gpgcheck=0
5
+ baseurl=http://repo.boxgrinder.org/boxgrinder/packages/fedora/12/RPMS/i386
6
+
7
+ [boxgrinder-noarch]
8
+ name=boxgrinder-noarch
9
+ enabled=1
10
+ gpgcheck=0
11
+ baseurl=http://repo.boxgrinder.org/boxgrinder/packages/fedora/12/RPMS/noarch
@@ -0,0 +1,11 @@
1
+ [boxgrinder-x86_64]
2
+ name=boxgrinder-x86_64
3
+ enabled=1
4
+ gpgcheck=0
5
+ baseurl=http://repo.boxgrinder.org/boxgrinder/packages/fedora/12/RPMS/x86_64
6
+
7
+ [boxgrinder-noarch]
8
+ name=boxgrinder-noarch
9
+ enabled=1
10
+ gpgcheck=0
11
+ baseurl=http://repo.boxgrinder.org/boxgrinder/packages/fedora/12/RPMS/noarch
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - BoxGrinder Project
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-22 00:00:00 +01:00
17
+ date: 2010-03-24 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -27,8 +27,8 @@ dependencies:
27
27
  segments:
28
28
  - 0
29
29
  - 0
30
- - 2
31
- version: 0.0.2
30
+ - 3
31
+ version: 0.0.3
32
32
  type: :runtime
33
33
  version_requirements: *id001
34
34
  - !ruby/object:Gem::Dependency
@@ -143,8 +143,10 @@ files:
143
143
  - src/base.vmdk
144
144
  - src/base.repo
145
145
  - src/ec2/fstab_64bit
146
+ - src/ec2/f12-i386-boxgrinder.repo
146
147
  - src/ec2/rc_local
147
148
  - src/ec2/ifcfg-eth0
149
+ - src/ec2/f12-x86_64-boxgrinder.repo
148
150
  - src/ec2/fstab_32bit
149
151
  - docs/node-info/pom.xml
150
152
  - docs/node-info/src/main/webapp/WEB-INF/web.xml