Instance key (rev. 3)
by Jan Provazník
Hi, sending again with stubbed generate key method in tests.
first patch makes event model more general (it's possible to associate events
with any model, not only instance). Second patch adds support for generating
unique ssh key for instance when it's started and uploads new key to server.
Gems delayed_job and net_scp are required. After installing delayed_job, start
worker with: rake jobs:work
13 years, 2 months
Instance key (rev. 4)
by Jan Provazník
(Rebased to current next branch.)
Hi,
first patch makes event model more general (it's possible to associate events
with any model, not only instance). Second patch adds support for generating
unique ssh key for instance when it's started and uploads new key to server.
Gems delayed_job and net_scp are required. After installing delayed_job, start
worker with: rake jobs:work
13 years, 2 months
ANNOUNCE: Oz version 0.1.0 released
by Chris Lalancette
All,
I'm pleased to announce the first release of Oz, version 0.1.0. Oz is
a tool for doing automated installation of operating systems using the native
installation tools. While Oz is part of the Aeolus umbrella, and thus intended
to be used in a cloud management environment, it is also useful as a standalone
tool to do guest installation.
This first release focusses on providing the basic infrastructure to do guest
installs. There are 3 possible phases to a guest install (and all 3 are
optional):
1) Installation of a JEOS. Oz creates an automated installation file (a
kickstart, winnt.sif, preseed, etc), and then launches a KVM virtual machine
to do the installation. By default, a minimal JEOS is always installed to
reduce the likelihood of installation failure (though this behavior can be
overriden)
2) Customization. Once a guest is installed from step 1) (or otherwise
provided), the virtual machine is launched and a native tool is used to do
installation of additional packages and files. For instance, in the case of
modern linux, ssh is used to upload files and run commands to install
additional packages.
3) Manifest generation. After the guest installation and customization are
done (if any), a package manifest (and some other metadata) can be extracted
from the image.
As mentioned, all 3 steps above are optional; you can start at step 1 and run
all the way to step 3 using oz, or you can install a guest using another
method and skip directly to steps 2 or 3. Documentation of how to do these
sorts of things are on the Oz webpage at http://aeolusproject.org/oz.html.
At present, Oz can install the following types of guests:
Fedora: 7, 8, 9, 10, 11, 12, 13, 14
Fedora Core: 1, 2, 3, 4, 5, 6
RHEL 2.1: GOLD, U2, U3, U4, U5, U6
RHEL 3: GOLD, U1, U2, U3, U4, U5, U6, U7, U8, U9
RHEL 4: GOLD, U1, U2, U3, U4, U5, U6, U7, U8
RHEL 5: GOLD, U1, U2, U3, U4, U5, U6
RHEL 6: 0
Ubuntu: 6.10, 7.04, 7.10, 8.04.[1,2,3,4], 8.10, 9.04, 9.10
Windows: 2000, XP, 2003
RHL: 7.0, 7.1, 7.2, 7.3, 8, 9
OpenSUSE: 11.1, 11.2, 11.3
Note that not all guest types can do all 3 of the steps above. The Oz webpage
lists which backends can do which phases.
Instructions on how to download Oz are at
http://aeolusproject.org/oz-download.html
As usual, comments, questions, bug reports, and patches are welcome for Oz.
--
Chris Lalancette
13 years, 2 months
[PATCH aeolus 1/2] Added fix to matching HardwareProfile methods
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
src/app/models/hardware_profile.rb | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/app/models/hardware_profile.rb b/src/app/models/hardware_profile.rb
index 03ca8f7..7d43a36 100644
--- a/src/app/models/hardware_profile.rb
+++ b/src/app/models/hardware_profile.rb
@@ -186,7 +186,7 @@ class HardwareProfile < ActiveRecord::Base
matched_values = (create_array_from_property(p1) & create_array_from_property(p2))
if !matched_values.empty?
if p1.kind == 'fixed' || p2.kind == 'fixed'
- HardwareProfileProperty.new(:kind => 'fixed', :value => matched_values[0])
+ HardwareProfileProperty.new(:kind => 'fixed', :value => matched_values[0], :name => p1.name, :unit => p1.unit)
else
hwpp = HardwareProfileProperty.new(:kind => 'enum')
matched_values.each do |enum_value|
@@ -204,7 +204,7 @@ class HardwareProfile < ActiveRecord::Base
case p2.kind
when 'range'
if !(BigDecimal.new(p1.range_first) > BigDecimal.new(p2.range_last) || BigDecimal.new(p1.range_last) < BigDecimal.new(p2.range_first))
- hwpp = HardwareProfileProperty.new(:kind => 'range')
+ hwpp = HardwareProfileProperty.new(:kind => 'range', :unit => p1.unit, :name => p1.name)
hwpp.range_first = BigDecimal.new(p1.range_first) >= BigDecimal.new(p2.range_first) ? p1.range_first : p2.range_first
hwpp.range_last = BigDecimal.new(p1.range_last) <= BigDecimal.new(p2.range_last) ? p1.range_last : p2.range_last
@@ -215,7 +215,7 @@ class HardwareProfile < ActiveRecord::Base
end
when 'enum'
- hwpp = HardwareProfileProperty.new(:kind => 'enum')
+ hwpp = HardwareProfileProperty.new(:kind => 'enum', :unit => p1.unit, :name => p1.name)
p2.property_enum_entries.each do |enum|
if (BigDecimal.new(p1.range_first)..BigDecimal.new(p1.range_last)) === BigDecimal.new(enum.value)
hwpp.property_enum_entries << PropertyEnumEntry.new(:hardware_profile_property => hwpp, :value => enum.value)
@@ -224,7 +224,7 @@ class HardwareProfile < ActiveRecord::Base
return hwpp.property_enum_entries.empty? ? nil : hwpp
when 'fixed'
- return (BigDecimal.new(p1.range_first)..BigDecimal.new(p1.range_last)) === BigDecimal.new(p2.value) ? HardwareProfileProperty.new(:kind => 'fixed', :value => p2.value) : nil
+ return (BigDecimal.new(p1.range_first)..BigDecimal.new(p1.range_last)) === BigDecimal.new(p2.value) ? HardwareProfileProperty.new(:kind => 'fixed', :value => p2.value, :name => p2.name, :unit => p2.unit) : nil
else
return nil
--
1.7.3.4
13 years, 2 months
[PATCH conductor 1/3] cuke test for adding pkgs when editing template
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/features/step_definitions/template_steps.rb | 8 ++++++++
src/features/template.feature | 17 +++++++++++++++++
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/src/features/step_definitions/template_steps.rb b/src/features/step_definitions/template_steps.rb
index 990b67b..5bae0a2 100644
--- a/src/features/step_definitions/template_steps.rb
+++ b/src/features/step_definitions/template_steps.rb
@@ -105,3 +105,11 @@ Given /^there is an imported template$/ do
@template = Factory.build :template, :name => name, :imported => true
@template.save!
end
+
+Given /^has package "([^"]*)"$/ do |arg1|
+ @template.add_packages [:arg1]
+end
+
+When /^I edit the template$/ do
+ visit edit_image_factory_template_url(@template)
+end
diff --git a/src/features/template.feature b/src/features/template.feature
index b982dfe..47a8d1b 100644
--- a/src/features/template.feature
+++ b/src/features/template.feature
@@ -54,6 +54,23 @@ Feature: Manage Templates
And I should see "Template saved"
And I should see "mocktemplate"
+ Scenario: Add group of packages to existing template
+ Given there is a "mock1" template
+ And has package "deltacloud-aggregator"
+ When I edit the template
+ And I press "Add Software"
+ Then I should see "Managed Content Selection"
+ When I press "Collections"
+ And I check "group_deltacloud"
+ And I press "Add Selected"
+ Then I should see "Managed Content to Bundle"
+ And the page should contain "#package_libdeltacloud" selector
+ When I press "Save"
+ Then I should be on the image factory templates page
+ And I should see "Template updated"
+ When I edit the template
+ Then the page should contain "#package_libdeltacloud" selector
+
Scenario: Sorting templates
Given there is a "mock1" template
And there is a "mock2" template
--
1.7.3.5
13 years, 2 months
[PATCH] Change @font-face path to use relative URL
by Matt Wagner
(This is a resend. The paths are ugly, but it's consistent with how
images and the like are handled in CSS.)
Otherwise, if Conductor is running out of a subdirectory (e.g.,
/deltacloud), fonts will not be loaded correctly. The relative
path is consistent with other assets used in CSS.
---
src/app/stylesheets/text.scss | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/stylesheets/text.scss b/src/app/stylesheets/text.scss
index 10f6304..b6819c3 100644
--- a/src/app/stylesheets/text.scss
+++ b/src/app/stylesheets/text.scss
@@ -11,14 +11,14 @@
@font-face {
font-family: 'Roadgeek E';
src: local('Roadgeek E'), local('RoadgeekE'),
- url(/fonts/RoadgeekE.otf);
+ url(../../fonts/RoadgeekE.otf);
}
/* Headline Font based on Highway Gothic/FHWA to preserve RH identity on the web unachievable with Interstate */
@font-face {
font-family: 'FreeWay Bold';
src: local('FreeWay Bold'), local('FreeWayBold'),
- url(/fonts/FreeWay-Bold.ttf);
+ url(../../fonts/FreeWay-Bold.ttf);
}
body {
--
1.7.4
13 years, 2 months
Frontend realms (rev. 2)
by Jan Provazník
Hi,
this patchset updates realms model (description is in the first patch) and adds
really simple UI for adding realm mapping.
13 years, 2 months
Re: [PATCH configure 4/4] Enforce ordering between solr and DB setup
by Mo Morsi
ACK. It might be a good idea to have a comment about the ordering of
the services and commands, but it works as is.
-Mo
On 02/03/2011 01:25 PM, Mike Orazi wrote:
> ---
> recipes/deltacloud_recipe/manifests/aggregator.pp | 10 +++-------
> 1 files changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/recipes/deltacloud_recipe/manifests/aggregator.pp b/recipes/deltacloud_recipe/manifests/aggregator.pp
> index 59ca9df..538b7f1 100644
> --- a/recipes/deltacloud_recipe/manifests/aggregator.pp
> +++ b/recipes/deltacloud_recipe/manifests/aggregator.pp
> @@ -62,7 +62,7 @@ class deltacloud::aggregator inherits deltacloud {
> rails::migrate::db{"migrate_deltacloud_database":
> cwd => "/usr/share/deltacloud-aggregator",
> rails_env => "production",
> - require => Rails::Create::Db[create_deltacloud_database]}
> + require => [Rails::Create::Db[create_deltacloud_database], Service['solr']]}
> rails::seed::db{"seed_deltacloud_database":
> cwd => "/usr/share/deltacloud-aggregator",
> rails_env => "production",
> @@ -76,17 +76,13 @@ class deltacloud::aggregator inherits deltacloud {
> hasstatus => "false",
> pattern => "solr",
> ensure => 'running',
> - require => Package['deltacloud-aggregator']}
> + require => [Package['deltacloud-aggregator'], Rails::Create::Db['create_deltacloud_database']]}
>
> - # XXX ugly hack but solr might take some time to come up
> - exec{"solr_startup_pause":
> - command => "/bin/sleep 4",
> - require => Service['solr']}
> exec{"build_solr_index":
> cwd => "/usr/share/deltacloud-aggregator",
> command => "/usr/bin/rake sunspot:reindex",
> environment => "RAILS_ENV=production",
> - require => Exec['solr_startup_pause']}
> + require => Rails::Migrate::Db['migrate_deltacloud_database']}
> }
>
> class deltacloud::aggregator::disabled {
13 years, 2 months
Re: [PATCH configure 3/4] Make solr invocation a service
by Mo Morsi
ACK, one comment below.
On 02/03/2011 01:25 PM, Mike Orazi wrote:
> This prevents puppet from trying to start solr multiple times
> and failing on any subsequent invocation.
> ---
> recipes/deltacloud_recipe/manifests/aggregator.pp | 31 +++++++++++++-------
> 1 files changed, 20 insertions(+), 11 deletions(-)
>
> diff --git a/recipes/deltacloud_recipe/manifests/aggregator.pp b/recipes/deltacloud_recipe/manifests/aggregator.pp
> index 506f1b8..59ca9df 100644
> --- a/recipes/deltacloud_recipe/manifests/aggregator.pp
> +++ b/recipes/deltacloud_recipe/manifests/aggregator.pp
> @@ -70,16 +70,23 @@ class deltacloud::aggregator inherits deltacloud {
>
>
> ### Setup/start solr search service
> - exec{"start_solr":
> - cwd => "/usr/share/deltacloud-aggregator",
> - command => "/usr/bin/rake sunspot:solr:start",
> - environment => "RAILS_ENV=production",
> - require => Package['deltacloud-aggregator']}
> + service{"solr":
> + start => "cd /usr/share/deltacloud-aggregator; RAILS_ENV=production /usr/bin/rake sunspot:solr:start",
> + stop => "cd /usr/share/deltacloud-aggregator; RAILS_ENV=production /usr/bin/rake sunspot:solr:stop",
> + hasstatus => "false",
> + pattern => "solr",
> + ensure => 'running',
> + require => Package['deltacloud-aggregator']}
> +
This should probably be in an init script at some point, but as
discussed there are a few challenges doing that, and this is fine for
now as this works. We can submit an init script to the solr / sunspot
rpms when it exists.
> + # XXX ugly hack but solr might take some time to come up
> + exec{"solr_startup_pause":
> + command => "/bin/sleep 4",
> + require => Service['solr']}
> exec{"build_solr_index":
> cwd => "/usr/share/deltacloud-aggregator",
> command => "/usr/bin/rake sunspot:reindex",
> environment => "RAILS_ENV=production",
> - require => Exec['start_solr']}
> + require => Exec['solr_startup_pause']}
> }
>
> class deltacloud::aggregator::disabled {
> @@ -97,6 +104,7 @@ class deltacloud::aggregator::disabled {
> provider => 'yum', ensure => 'absent',
> require => [Package['deltacloud-aggregator-daemons',
> 'deltacloud-aggregator-doc'],
> + Service['solr'],
> Rails::Drop::Db["drop_deltacloud_database"]] }
>
> file {"/var/lib/deltacloud-aggregator":
> @@ -135,11 +143,12 @@ class deltacloud::aggregator::disabled {
> require => Rails::Drop::Db["drop_deltacloud_database"]}
>
> ### stop solr search service
> - exec{"stop_solr":
> - cwd => "/usr/share/deltacloud-aggregator",
> - command => "/usr/bin/rake sunspot:solr:stop",
> - environment => "RAILS_ENV=production",
> - require => Service['deltacloud-aggregator']}
> + service{"solr":
> + hasstatus => false,
> + stop => "cd /usr/share/deltacloud-aggregator;RAILS_ENV=production /usr/bin/rake sunspot:solr:stop",
> + pattern => "solr",
> + ensure => 'stopped',
> + require => Service['deltacloud-aggregator']}
> }
>
> # Create a new site admin aggregator web user
13 years, 2 months