[PATCH aeolus-configure] BZ #761447: aeolus-configure-image returns (LoadError).

Jason Guiditta jguiditt at redhat.com
Mon Dec 12 17:46:22 UTC 2011


https://bugzilla.redhat.com/show_bug.cgi?id=761447

Looking into this bug revealed so many issues, that it makes
the most sense to just nuke this script for now.  We can re-add
something with similar functionality (once some interaction
issues with factory are resolved) in the cli project, where it
belongs, at some point.
---
 bin/aeolus-configure-image    |   69 -----------------------------------------
 contrib/aeolus-configure.spec |    2 -
 2 files changed, 0 insertions(+), 71 deletions(-)
 delete mode 100755 bin/aeolus-configure-image

diff --git a/bin/aeolus-configure-image b/bin/aeolus-configure-image
deleted file mode 100755
index 66a8b54..0000000
--- a/bin/aeolus-configure-image
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/ruby
-# helper script to generate aeolus images
-
-#   Copyright 2011 Red Hat, Inc.
-#
-#   Licensed under the Apache License, Version 2.0 (the "License");
-#   you may not use this file except in compliance with the License.
-#   You may obtain a copy of the License at
-#
-#       http://www.apache.org/licenses/LICENSE-2.0
-#
-#   Unless required by applicable law or agreed to in writing, software
-#   distributed under the License is distributed on an "AS IS" BASIS,
-#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#   See the License for the specific language governing permissions and
-#   limitations under the License.
-
-require 'fileutils'
-
-AEOLUS_IMAGE_VERSION='0.1.0'
-
-image_name = ARGV[0]
-target   = ARGV[1]
-template = ARGV[2]
-provider = ARGV[3]
-hwp      = ARGV[4]
-
-Dir.chdir "/etc/aeolus-configure"
-
-cmd = "/usr/bin/ruby -rrubygems \
-       /usr/lib/ruby/gems/1.8/gems/aeolus-image-#{AEOLUS_IMAGE_VERSION}/bin/aeolus-image build \
-       --target #{target} --template #{template}"
-puts "Building image for #{target} using #{template}"
-#puts "  Running build command #{cmd}"
-out = `#{cmd}`
-puts "Image build returned w/ exit code #{$?}"
-puts "Image build output: #{out}"
-
-if out =~ /^\s*Image:\s*([0-9a-zA-Z\-]*).*/
-  image = $1
-  cmd = "/usr/bin/ruby -rrubygems \
-         /usr/lib/ruby/gems/1.8/gems/aeolus-image-#{AEOLUS_IMAGE_VERSION}/bin/aeolus-image push \
-           --provider #{provider} --id #{image}"
-
-  puts "Image #{image} built, pushing to #{provider}"
-  #puts "Running push command #{cmd}"
-  out = `#{cmd}`
-
-  puts "Image push returned w/ exit code #{$?}"
-  puts "Image push output: #{out}"
-
-  # delay to allow the ec2 image to be uploaded
-  sleep 900 if target == "ec2" || target == "rackspace"
-
-  deployables_dir = '/var/www/html/deployables'
-  FileUtils.mkdir deployables_dir unless File.exist? deployables_dir
-  File.open("/var/www/html/deployables/#{image_name}.xml", "w") { |f|
-    f.write "<deployable name='#{image_name}'>\n" +
-            "  <assemblies name = '#{image_name}'>\n" +
-            "    <assembly name='#{image_name}' hwp='#{hwp}' >\n" +
-            "      <image id='#{image}'></image>\n" +
-            "    </assembly>\n" +
-            "  </assemblies>\n" +
-            "</deployable>\n"
-  }
-
-  puts "Deployment definition written"
-  puts "Image building complete"
-end
diff --git a/contrib/aeolus-configure.spec b/contrib/aeolus-configure.spec
index 93fd0e1..b063410 100644
--- a/contrib/aeolus-configure.spec
+++ b/contrib/aeolus-configure.spec
@@ -49,7 +49,6 @@ Aeolus Configure Puppet Recipe
 %{__cp} -R %{pbuild}/bin/aeolus-node %{buildroot}/%{aeolushome}/modules/aeolus/
 %{__cp} -R %{pbuild}/bin/aeolus-check-services %{buildroot}/%{_bindir}/
 %{__cp} -R %{pbuild}/bin/aeolus-restart-services %{buildroot}/%{_sbindir}/
-%{__cp} -R %{pbuild}/bin/aeolus-configure-image %{buildroot}/%{_sbindir}/
 %{__cp} -R %{pbuild}/bin/aeolus-configure %{buildroot}/%{_sbindir}/
 %{__cp} -R %{pbuild}/bin/aeolus-cleanup %{buildroot}/%{_sbindir}/
 
@@ -61,7 +60,6 @@ Aeolus Configure Puppet Recipe
 %attr(0755, root, root) %{_bindir}/aeolus-check-services
 %attr(0755, root, root) %{_sbindir}/aeolus-restart-services
 %{aeolushome}
-%{_sbindir}/aeolus-configure-image
 
 %changelog
 * Thu Dec  1 2011 Steve Linabery <slinaber at redhat.com> - 2.4.0-1
-- 
1.7.7.3




More information about the aeolus-devel mailing list