[PATCH] Remove admin_header partial from new and edit pool views
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/pools/_edit.haml | 2 --
src/app/views/pools/_new.haml | 1 -
2 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/src/app/views/pools/_edit.haml b/src/app/views/pools/_edit.haml
index 84fa9d8..a20a705 100644
--- a/src/app/views/pools/_edit.haml
+++ b/src/app/views/pools/_edit.haml
@@ -1,5 +1,3 @@
-= render :partial => 'layouts/admin_header'
-
%header.page-header
%h1{:class => controller.controller_name}= @pool.name
#obj_actions.button-container
diff --git a/src/app/views/pools/_new.haml b/src/app/views/pools/_new.haml
index d5c3a24..e54f91d 100644
--- a/src/app/views/pools/_new.haml
+++ b/src/app/views/pools/_new.haml
@@ -1,4 +1,3 @@
-= render :partial => 'layouts/admin_header'
= render :partial => 'section_header'
%section.content-section.pools
--
1.7.4.2
13 years
remove legacy* stuff
by Jan Provazník
This patch removes all legacy* related stuff. What needs to be done:
- remove warehouse sync script - should be removed together with
removing it from aeolus-configure
- remove starting of dc_prepare_repos in configure script
- probably delayed-job too
- lib/tasks/demo_data.rake - this looks obsolete, but I left it unchanged
But above can be separate patch. Both rspec and cucumber tests pass
except 'expected the following element's content to include
"mockdeployment"' which was already broken. E2e test passed for mock image.
Sending as an attachment because of long lines.
Jan
13 years
[PATCH] New UI elements for deployable Launch
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/deployments/_launch_new.haml | 52 +++++++++------
src/app/views/deployments/_new.haml | 97 +++++++++++++++-------------
src/features/deployment.feature | 4 +-
3 files changed, 85 insertions(+), 68 deletions(-)
diff --git a/src/app/views/deployments/_launch_new.haml b/src/app/views/deployments/_launch_new.haml
index a05408c..101de2b 100644
--- a/src/app/views/deployments/_launch_new.haml
+++ b/src/app/views/deployments/_launch_new.haml
@@ -1,29 +1,37 @@
= if request.xhr?
- = render :partial => '/layouts/notification'
+ = render :partial => '/layouts/new_notification'
%header.page-header
- %h1
+ %h1{:class => controller.controller_name}
New Deployment in
= @pool.name
-%h2
- Deployment Details
-- form_for :deployment, {:url => new_deployment_path, :method => :get} do
- = hidden_field :deployment, :pool_id
- %p
- What do you want to launch?
- %p
- Select the Deployable definition
- = select_tag :suggested_deployable_id, options_for_select([['custom -- type bellow', 'custom']] + @suggested_deployables.map {|d| [d.name, d.id]}, params[:suggested_deployable_id])
- %p
- Or provide the URL of the Deployable definition
- = text_field('deployable', 'url')
- %p
- Name your deployment
- = text_field(:deployment, :name)
- %span.name_available
- %p
- Choose a realm
- = select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]}, :include_blank => true
- = submit_tag('Next')
+ #obj_actions.button-container
+ = link_to 'Cancel', pool_path(@pool), :class => 'button danger', :id => 'cancel_deployment_button'
+ .corner
+
+%section.content-section.deployment
+ %header
+ %h2
+ Deployment Details
+
+ .content
+ - form_for :deployment, {:url => new_deployment_path, :method => :get} do
+ = hidden_field :deployment, :pool_id
+ %p
+ What do you want to launch?
+ %p
+ Select the Deployable definition
+ = select_tag :suggested_deployable_id, options_for_select([['custom -- type bellow', 'custom']] + @suggested_deployables.map {|d| [d.name, d.id]}, params[:suggested_deployable_id])
+ %p
+ Or provide the URL of the Deployable definition
+ = text_field('deployable', 'url')
+ %p
+ Name your deployment
+ = text_field(:deployment, :name)
+ %span.name_available
+ %p
+ Choose a realm
+ = select :deployment, :frontend_realm_id, @realms.map{|r| [r.name, r.id]}, :include_blank => true
+ = submit_tag 'Next', :class => 'button'
:javascript
// FIXME: This has a theoretical race condition: if responses come back out of order, the value
diff --git a/src/app/views/deployments/_new.haml b/src/app/views/deployments/_new.haml
index 329af19..05ed857 100644
--- a/src/app/views/deployments/_new.haml
+++ b/src/app/views/deployments/_new.haml
@@ -1,10 +1,11 @@
= error_messages_for 'deployment'
%header.page-header
- %h1
+ %h1{:class => controller.controller_name}
Deployment
= @deployment.name
-%h2
- Launch Summary
+ #obj_actions.button-container
+ = link_to 'Cancel', pool_path(@pool), :class => 'button danger', :id => 'cancel_deployment_button'
+ .corner
#scoreboard
%dl.statistics
@@ -16,44 +17,52 @@
%dt= t("deployments.deployment")
%dd= @deployment.name
%li
- = link_to('view deployable definition', '#')
-
-%h2
- Deployable details
-
-%ul
- %li
- Name:
- = @deployment.deployable_xml.name
- %li
- Description:
- = @deployment.deployable_xml.description
- %li
-
-%h2
- Assemblies
-
-= filter_table([{:name => 'Assembly Name'},
- {:name => 'Hardware Profile'},
- {:name => 'Image ID'},
- {:name => 'Build ID'}],
- @deployment.deployable_xml.assemblies) do |assembly|
- %tr
- %td
- = assembly.name
- %td
- = assembly.hwp
- %td
- = assembly.image_id
- %td
- = assembly.image_build
-
-- form_for @deployment do
- = hidden_field :deployment, :name
- = hidden_field :deployment, :pool_id
- = hidden_field :deployment, :frontend_realm_id
- -# FIXME: Passing chunks of XML around in hidden form fields doesn't feel right
- = hidden_field :deployment, :deployable_xml
- = submit_tag 'Launch'
-
--# Quota checking to go here as well, once I understand how it works with new code
+ %dt deployable definition
+ %dd= link_to('view', '#')
+
+%section.content-section.deployable_details
+ %header
+ %h2
+ Deployable details
+
+ .content
+
+ %ul
+ %li
+ Name:
+ = @deployment.deployable_xml.name
+ %li
+ Description:
+ = @deployment.deployable_xml.description
+
+%section.content-section.deployable_details
+ %header
+ %h2
+ Assemblies
+
+ .content
+
+ = filter_table([{:name => 'Assembly Name'},
+ {:name => 'Hardware Profile'},
+ {:name => 'Image ID'},
+ {:name => 'Build ID'}],
+ @deployment.deployable_xml.assemblies) do |assembly|
+ %tr
+ %td
+ = assembly.name
+ %td
+ = assembly.hwp
+ %td
+ = assembly.image_id
+ %td
+ = assembly.image_build
+
+ - form_for @deployment do
+ = hidden_field :deployment, :name
+ = hidden_field :deployment, :pool_id
+ = hidden_field :deployment, :frontend_realm_id
+ -# FIXME: Passing chunks of XML around in hidden form fields doesn't feel right
+ = hidden_field :deployment, :deployable_xml
+ = submit_tag 'Launch', :class => 'button'
+
+ -# Quota checking to go here as well, once I understand how it works with new code
diff --git a/src/features/deployment.feature b/src/features/deployment.feature
index b8a07dd..56b5e68 100644
--- a/src/features/deployment.feature
+++ b/src/features/deployment.feature
@@ -34,7 +34,7 @@ Feature: Manage Deployments
When I fill in "deployable_url" with "http://localhost/deployables/deployable1.xml"
When I fill in "deployment_name" with "mynewdeployment"
When I press "Next"
- Then I should see "Launch Summary"
+ Then I should see "Deployable details"
When I press "Launch"
Then I should see "Deployment launched"
Then I should see "mynewdeployment Deployment"
@@ -51,7 +51,7 @@ Feature: Manage Deployments
When I fill in "deployable_url" with "http://localhost/deployables/deployable1.xml"
When I fill in "deployment_name" with "mynewdeployment"
When I press "Next"
- Then I should see "Launch Summary"
+ Then I should see "Deployable details"
When I press "Launch"
Then I should see "Created"
Then I should see "mynewdeployment"
--
1.7.4.2
13 years
[PATCH conductor 2/2] Bump version for factory_console
by Martyn Taylor
Ack,
----- Original Message -----
From: "Jason Guiditta" <jguiditt(a)redhat.com>
To: mtaylor(a)redhat.com
Cc: "Jason Guiditta" <jguiditt(a)redhat.com>
Sent: Thursday, 16 June, 2011 5:44:34 PM
Subject: [PATCH conductor 2/2] Bump version for factory_console
---
services/image_factory/console/Rakefile | 2 +-
.../console/rubygem-image_factory_console.spec | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/services/image_factory/console/Rakefile b/services/image_factory/console/Rakefile
index dcd4cc2..7c9b95c 100644
--- a/services/image_factory/console/Rakefile
+++ b/services/image_factory/console/Rakefile
@@ -32,7 +32,7 @@ RPM_SPEC = "rubygem-image_factory_console.spec"
spec = Gem::Specification.new do |s|
s.name = 'image_factory_console'
- s.version = '0.3.0'
+ s.version = '0.4.0'
s.has_rdoc = true
#s.extra_rdoc_files = ['README', 'COPYING']
s.summary = 'QMF Console for Aeolus Image Factory'
diff --git a/services/image_factory/console/rubygem-image_factory_console.spec b/services/image_factory/console/rubygem-image_factory_console.spec
index f3046fa..57d93ab 100644
--- a/services/image_factory/console/rubygem-image_factory_console.spec
+++ b/services/image_factory/console/rubygem-image_factory_console.spec
@@ -6,7 +6,7 @@
Summary: QMF Console for Aeolus Image Factory
Name: rubygem-%{gemname}
-Version: 0.3.0
+Version: 0.4.0
Release: 1%{?dist}%{?extra_release}
Group: Development/Languages
License: GPLv2+ or Ruby
@@ -49,5 +49,7 @@ rm -rf %{buildroot}
%changelog
+* Thu Jun 16 2011 <jguiditt(a)redhat.com> - 0.4.0-1
+- Add support for push, build and import methods
* Thu Mar 10 2011 <morazi(a)redhat.com> - 0.2.0-1
- Initial package
--
1.7.4.4
13 years
[PATCH conductor] Updated deployment launch error handling
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
- condormatic_instance_create method moved out of the instance create
transaction
- if an instance's start task has status failed, it's interpreted as an
instances start failure in the UI. This could be simplified by throwing
exceptions in condormatic_instance_create but I don't want to do bigger
changes at this point.
---
src/app/controllers/instances_controller.rb | 2 +-
src/app/models/deployment.rb | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/instances_controller.rb b/src/app/controllers/instances_controller.rb
index 88fda19..6e62f1b 100644
--- a/src/app/controllers/instances_controller.rb
+++ b/src/app/controllers/instances_controller.rb
@@ -73,8 +73,8 @@ class InstancesController < ApplicationController
@task = InstanceTask.create!({:user => current_user,
:task_target => @instance,
:action => InstanceTask::ACTION_CREATE})
- condormatic_instance_create(@task)
end
+ condormatic_instance_create(@task)
rescue
init_new_instance_attrs
flash[:warning] = "Failed to launch instance: #{$!}"
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index 65423e9..569e054 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -126,6 +126,7 @@ class Deployment < ActiveRecord::Base
deployable_xml.assemblies.each do |assembly|
# TODO: for now we try to start all instances even if some of them fails
begin
+ task = nil
Instance.transaction do
hw_profile = HardwareProfile.frontend.find_by_name(assembly.hwp)
raise "Hardware Profile #{assembly.hwp} not found." unless hw_profile
@@ -144,9 +145,13 @@ class Deployment < ActiveRecord::Base
task = InstanceTask.create!({:user => user,
:task_target => instance,
:action => InstanceTask::ACTION_CREATE})
- condormatic_instance_create(task)
end
- status[:successes][assembly.name] = 'launched'
+ condormatic_instance_create(task)
+ if task.state == Task::STATE_FAILED
+ status[:errors][assembly.name] = 'failed'
+ else
+ status[:successes][assembly.name] = 'launched'
+ end
rescue
logger.error $!
logger.error $!.backtrace.join("\n ")
--
1.7.4
13 years
[PATCH conductor 1/4] Added proper icons for the remainder of headers in the administer tab.
by Kenneth Keiter
From: Kenneth Keiter <kkeiter(a)redhat.com>
---
src/app/stylesheets/layout.scss | 20 +++++++++++++++++++-
src/public/images/header_icon_deployables.png | Bin 0 -> 626 bytes
.../images/header_icon_hardware-profiles.png | Bin 0 -> 324 bytes
src/public/images/header_icon_pool-families.png | Bin 0 -> 851 bytes
src/public/images/header_icon_realms.png | Bin 0 -> 626 bytes
5 files changed, 19 insertions(+), 1 deletions(-)
create mode 100644 src/public/images/header_icon_deployables.png
create mode 100644 src/public/images/header_icon_hardware-profiles.png
create mode 100644 src/public/images/header_icon_pool-families.png
create mode 100644 src/public/images/header_icon_realms.png
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index 0f10cf3..285f714 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -1,6 +1,6 @@
/* ###########################################################################
Generated SCSS for Aeolus UI [aeolus_ui]
-Compiled on 2011-06-06 21:29:07 -0700
+Compiled on 2011-06-16 16:13:58 -0700
########################################################################### */
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1449,6 +1449,24 @@ div#content .page-header{
padding: 6px 7px 7px 60px;
}
+ h1.hardware_profiles{
+ background: transparent url('../../images/header_icon_hardware-profiles.png') no-repeat 8px center;
+ padding: 6px 7px 7px 46px;
+ }
+
+ h1.realms{
+ background: transparent url('../../images/header_icon_realms.png') no-repeat 8px center;
+ }
+
+ h1.pool_families{
+ background: transparent url('../../images/header_icon_pool-families.png') no-repeat 8px center;
+ padding: 6px 7px 7px 54px;
+ }
+
+ h1.suggested_deployables{
+ background: transparent url('../../images/header_icon_deployables.png') no-repeat 8px center;
+ }
+
h1.settings{
background: transparent url('../../images/header_icon_settings.png') no-repeat 8px center;
}
diff --git a/src/public/images/header_icon_deployables.png b/src/public/images/header_icon_deployables.png
new file mode 100644
index 0000000000000000000000000000000000000000..36fa110f0408ae42f12c33064b286799c15e17c1
GIT binary patch
literal 626
zcmV-&0*(ENP)<h;3K|Lk000e1NJLTq001HY000{Z1^@s688Tg`00004b3#c}2nYxW
zd<bNS00009a7bBm000XT000XT0n*)m`~Uy|6?8>dbVG7wVRUJ4ZXi@?ZDjy9FEKVR
zF)<9NV9Nji0338hSaefwW^{L9a%BKPWN%_+AVz6&Wp{6KYjYq&Q#En5<2C>Q0n155
zK~zYIy_V5YgFq05KOEn&1F-^A0?8Jj9VAvDRuHVfbP&=(EMRA12PuJ6pj2=^aAZ#8
z0>=#b-+;Z{kALqLphv2jsOnu`+*lc7Fvf5*AT|NAsX!VH0RhOSbR`5NW@1-{g22SC
zgn&%yN(cx{=*n$ieB(;)3$UOw=hjg~ethv!6k&`ZQq>elFBDIJrE^^YNjtgClL1d1
zIlh2gL=IgAj4?z`l64P|t9KE}9f%F^I$+&SL{?r9C*e?_vn#5a0UrY(yfFVJtB4##
zWDd-M!-Zt-3EBrh04!B?)xH^Z1fJF7kn743cnp9!iAd61^nPnv4i&A(t}E?leY#gw
z_hj|Y5mikr&<pU;Dw?TkLU?-so(F^2nNX-|sj4dxDO*4>^|360&p?pWz65Y#k67yt
zwpgQ+EnL``gnAFXQNQ6f5T*js#bR;n1hGz(EeKbCfSfhofglac%-5Ry0tCQ4ux(lf
zU?=Tv1V{|zK1WJhY^YAud!{73Jph&OqZb0v#ILDs9-}z)H=sA+*o8ij)7XR~Rrx@Q
zYf=DvAIOIB{SH+H<eeb)D5h6{X$D&9-K-*Vr2aeGO#oEcyfa&eUu`A4BOeIP0RR91
M07*qoM6N<$f<@T$^Z)<=
literal 0
HcmV?d00001
diff --git a/src/public/images/header_icon_hardware-profiles.png b/src/public/images/header_icon_hardware-profiles.png
new file mode 100644
index 0000000000000000000000000000000000000000..7cfd23be3ea7eaf7f895400d51027041c3ec8e70
GIT binary patch
literal 324
zcmeAS@N?(olHy`uVBq!ia0vp^(m*W1!3HF`9ol{aDVAa<&kznEsNqQI0P;BtJR*yM
zvO*xtc<FB4AE2OUiEBiOb5UwyNoIbYLP%zADubE6ArKkztVlQwR3HOV5S*V@Ql40p
z%HWuipOmWLmRXcqo?nz*tl%7MTDbMG8BpC^PZ!4!kItt-hFlE>0^Up47kt&-cT4{V
zU%2~miyO_0;#R)ZT*R39p|5QTqvr&chPWU9HqYAm;j^HL)12bH+fq!kw;Z+puwq94
zTDKY%%h}zn#Y`Jm?p=*rCHdjhK2|<9yO;@AF6^?g%ufrG6U@%mJ1M4Y$q?;xsCa_l
z$Ab>JU;UM@@%-8Hi!tq~XV=te?uTC|`8*6dax_U*uzve5?MFII>*Om18-NaF@O1Ta
JS?83{1OPSGb?yKF
literal 0
HcmV?d00001
diff --git a/src/public/images/header_icon_pool-families.png b/src/public/images/header_icon_pool-families.png
new file mode 100644
index 0000000000000000000000000000000000000000..222d0bf95df6bf74962d444ebb0f7e9c836fb6cf
GIT binary patch
literal 851
zcmV-Z1FZasP)<h;3K|Lk000e1NJLTq001Qb001Be1^@s6l~b{>00004b3#c}2nYxW
zd<bNS00009a7bBm000XT000XT0n*)m`~Uy|6?8>dbVG7wVRUJ4ZXi@?ZDjy9FEKVR
zF)<9NV9Nji0338hSaefwW^{L9a%BKPWN%_+AVz6&Wp{6KYjYq&Q#En5<2C>Q0<1|y
zK~z|U&6dAT+fWpTKmUpCItjRnhXy*K3MSM_JOFgOV_za3`v?th(2im1BXkQ3YO;fb
z#D-LfDXEwu0x5~>xI^Q}c5vd<HtKKky}sw1@7m{{b0y#RNu!gKlla1}<2XmDjF+g@
zYIT6a@SMDceG}+}#y44kp77HFnyH~2$2kVN3C^-8?5EpkG>+8_&W>8GR^*pDjw5C8
zH&+&@OW;!;5OJxer>EiF4ulXd(->-+#{T|(<jb6$oeh28uLNVuvfi)qb9HrPO(v5l
z6mSH50p0>X(f|RJ%jI{#$MD?d=4O1^_Y{7*3s6FcZoAzc%*Mal?RGQt{zeG#^(kkM
zkB_geude~9)oRpgwN>#`E1pv-(VAi97HJK|q3(qcEAs%rFpQr&J3D&?Fh!wcS+>s4
z&l5|0uh*mB?*~waN$YZj0$vOTgCHn|VI&%Qp2u)FjLcQ5)k2^q<#HJSSzcc3N23w9
zx3`hGgM))YpuAG4l*+JLt+KaQNJ=e0DX#0z2a+VAs#%KuzbO*Y_x*WJ0hCH5EbIBJ
zLIg^Zq<h=8QyC72LoO~Z0I1jNY;A271GSEHU1wus1At1UvSRgmibH7+4-bDIG>v6R
zuW1_fdOcT|K=E_0xUP%qx_F*fNWe6Tf2m(-6MHlo5j5mLySux&K&^8}e>Nqy830vP
z6O-69&0J61GAK{ewE19Ft0_tgz0WkwREFV(tm``A&EyR=Z!@wiqbN$EVYnd|T0FyT
z#xzZW8^coy=ajDNxdAOet<z={Mak{{6xaV>5~kCseRp@)Nm@J}k6#0C0Q&v@{A!$0
z;cN9E4Aq&v+#Zj|+ey}jVIa#g)9Ex1n79VOH<<lCAw(1S9FQhSRaI=;&h_}ubP0TD
dG#WPme*m8L#Nv_`Eu{be002ovPDHLkV1kDxd?o+@
literal 0
HcmV?d00001
diff --git a/src/public/images/header_icon_realms.png b/src/public/images/header_icon_realms.png
new file mode 100644
index 0000000000000000000000000000000000000000..331f8d773b69e3befa67b57ea524e6cbca650600
GIT binary patch
literal 626
zcmV-&0*(ENP)<h;3K|Lk000e1NJLTq001Na001Tk1^@s6tjIZ&00004b3#c}2nYxW
zd<bNS00009a7bBm000XT000XT0n*)m`~Uy|6?8>dbVG7wVRUJ4ZXi@?ZDjy9FEKVR
zF)<9NV9Nji0338hSaefwW^{L9a%BKPWN%_+AVz6&Wp{6KYjYq&Q#En5<2C>Q0n155
zK~z|U&6iDX!Y~kpzeMawPf%_^7T!129HiW&aD!ffgP68^BlQSy17HObkS?$VqWQt8
zY5g_~V^8!vGkN1AWm)2b*=$x9FcFb4fYy2pyn3z!kb1HC14KtC30Sfqh%Q6X5$bh_
znb_X}@Dhl}6j(rq9!in~0IhWayayumEFvEeVaa|&s0c;k@>$Vks5hU_e>9O&DgiLY
zly&~?cFS(J3r?tWh7N~ANFIeVDqnkJ%!iLZB<ghNsm<>z7cIz~k#Z8cN&Vhx1TNXo
z8HqEl8@LVY^*SUWL?nTZO?^BbgOUNzS`WYyGR74DO^DNMj87OHp@C1(e!maT#A;C|
zLia>WCClJUsPKsltU(Sr#FZi7OekyIb%npk(6C|S4+NfL4t=nr!)I)iWyxl<xd$PD
zhn_Je_lfW**Bbb;c8<+J3-T1t{<#rTU?3ueh!mW3ZhA{#&zH~*8Tu5F(WOH~R=~&(
z(7L-8*bFt5Y{~h)w1k@)`mN&{K-To-`l*yEF8+`06}IVwaPAx5HGnLoUZuxXzP6Hy
z$fC=dMc$;;Ri|k?;jfWWGwGF5t191}RN5g=fk&T+JE^ooKf2-i4Z6^yL>k#g{r~^~
M07*qoM6N<$f*u41J^%m!
literal 0
HcmV?d00001
--
1.7.4.1
13 years
[PATCH configure] RHEV-M support
by Richard Su
1. enable/disable RHEV-M support through config file
2. templatized /etc/rhevm.json and /etc/iwhd/conf.js
3. mount NFS shared directory between iwhd and RHEV-M
4. startup deltacloud-core with RHEV-M powershell as api provider
5. create a hardware profile for RHEV-M
6. add RHEV-M provider in Conductor
---
conf/default_cleanup | 6 +++-
conf/default_configure | 8 +++++
recipes/aeolus/manifests/rhevm.pp | 57 +++++++++++++++++++++++++++++++++
recipes/aeolus/templates/iwhd-conf.js | 7 ++++
recipes/aeolus/templates/rhevm.json | 12 +++++++
5 files changed, 89 insertions(+), 1 deletions(-)
create mode 100644 recipes/aeolus/manifests/rhevm.pp
create mode 100644 recipes/aeolus/templates/iwhd-conf.js
create mode 100644 recipes/aeolus/templates/rhevm.json
diff --git a/conf/default_cleanup b/conf/default_cleanup
index 36f3521..7719ac8 100644
--- a/conf/default_cleanup
+++ b/conf/default_cleanup
@@ -9,7 +9,11 @@
parameters:
enable_https: true
enable_security: false
-classes:
+ rhevm_enable: false
+ rhevm_nfs_server: nfs.server.com
+ rhevm_nfs_export: /export/export_domain
+ rhevm_nfs_mount_point: /mnt/rhevm-nfs
+lasses:
- aeolus::conductor::disabled
- aeolus::iwhd::disabled
- aeolus::image-factory::disabled
diff --git a/conf/default_configure b/conf/default_configure
index fb89277..e63aa98 100644
--- a/conf/default_configure
+++ b/conf/default_configure
@@ -16,6 +16,14 @@
parameters:
enable_https: true
enable_security: false
+ rhevm_enable: false
+ rhevm_nfs_server: nfs.server.com
+ rhevm_nfs_export: /export/export_domain
+ rhevm_nfs_mount_point: /mnt/rhevm-nfs
+ rhevm_deltacloud_port: 3005
+ rhevm_deltacloud_username: username@fqdn
+ rhevm_deltacloud_password: password
+ rhevm_deltacloud_powershell_url: https://rhevm.server.com:8543/rhevm-api-powershell
classes:
- aeolus::conductor
- aeolus::image-factory
diff --git a/recipes/aeolus/manifests/rhevm.pp b/recipes/aeolus/manifests/rhevm.pp
new file mode 100644
index 0000000..00dbb93
--- /dev/null
+++ b/recipes/aeolus/manifests/rhevm.pp
@@ -0,0 +1,57 @@
+class aeolus::rhevm inherits aeolus {
+ if $rhevm_enable {
+ file {"/etc/rhevm.json":
+ content => template("aeolus/rhevm.json"),
+ mode => 755,
+ require => Package['aeolus-conductor-daemons'] }
+
+ file {"/etc/iwhd/conf.js":
+ content => template("aeolus/iwhd-conf.js"),
+ mode => 755,
+ require => Package['aeolus-conductor-daemons'] }
+
+ file {"$rhevm_nfs_mount_point":
+ ensure => 'directory'}
+
+ mount {"$rhevm_nfs_mount_point":
+ ensure => mounted,
+ device => "$rhevm_nfs_server:$rhevm_nfs_export",
+ fstype => "nfs",
+ options => "rw",
+ require => File["$rhevm_nfs_mount_point"]}
+
+ aeolus::conductor::hwp{"rhevm-hwp":
+ memory => "512",
+ cpu => "1",
+ storage => "1",
+ architecture => "x86_64",
+ require => Aeolus::Site_admin["admin"] }
+
+ # break up aeolus::provider into its individual steps for two reasons:
+ # 1. deltacloudd expects "rhevm", imagefactory expects "rhev-m" passed through by conductor
+ # 2. rhevm-hwp must exist before creating provider
+ aeolus::deltacloud{"rhevm":
+ provider_type => 'rhevm',
+ endpoint => "$rhevm_deltacloud_powershell_url",
+ port => $rhevm_deltacloud_port}
+
+ aeolus::conductor::provider{"rhevm":
+ type => "rhev-m",
+ url => "http://localhost:${rhevm_deltacloud_port}/api",
+ require => [Aeolus::Deltacloud["rhevm"],Aeolus::Conductor::Hwp["rhevm-hwp"]]}
+
+ # TODO:
+ # 1. since we have credentials, create provider account
+ # 2. create a realm and mappings
+ }
+}
+
+class aeolus::rhevm::disabled {
+ if $rhevm_enable {
+ aeolus::deltacloud::disabled{"rhevm": }
+
+ mount {"$rhevm_nfs_mount_point":
+ ensure => unmounted,
+ device => "$rhevm_nfs_server:$rhevm_nfs_export"}
+ }
+}
diff --git a/recipes/aeolus/templates/iwhd-conf.js b/recipes/aeolus/templates/iwhd-conf.js
new file mode 100644
index 0000000..88eb6b5
--- /dev/null
+++ b/recipes/aeolus/templates/iwhd-conf.js
@@ -0,0 +1,7 @@
+[
+ {
+ "name": "rhev-m",
+ "type": "fs-rhev-m",
+ "path": "<%= rhevm_nfs_mount_point %>"
+ }
+]
diff --git a/recipes/aeolus/templates/rhevm.json b/recipes/aeolus/templates/rhevm.json
new file mode 100644
index 0000000..07ce9ce
--- /dev/null
+++ b/recipes/aeolus/templates/rhevm.json
@@ -0,0 +1,12 @@
+{
+ "rhev-m":
+ {
+ "api-key": "<%= rhevm_deltacloud_username %>",
+ "nfs-dir": "<%= rhevm_nfs_mount_point %>",
+ "nfs-path": "<%= rhevm_nfs_export %>",
+ "nfs-host": "<%= rhevm_nfs_server %>",
+ "api-url": "<%= rhevm_deltacloud_powershell_url %>",
+ "api-secret": "<%= rhevm_deltacloud_password %>",
+ "cluster": "_any_"
+ }
+}
\ No newline at end of file
--
1.7.4.4
13 years
[PATCH conductor] BZ #712316: ensure condor log file exists before begining to parse
by Mo Morsi
temp dbomatic fix to close out the bug while better dbomatic
implementation is in progress
---
src/dbomatic/dbomatic | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/dbomatic/dbomatic b/src/dbomatic/dbomatic
index c5b1617..889704b 100755
--- a/src/dbomatic/dbomatic
+++ b/src/dbomatic/dbomatic
@@ -345,6 +345,10 @@ begin
parse_log_file(parser) if File.exists? CONDOR_EVENT_LOG_FILE
logger.info "Parsed existing event log file - current postition: #{get_log_file_pos}"
+ # hacky fix for BZ #712316 (better dbomatic implementation in progress)
+ # wait until condor event log file exists
+ sleep 2 until File.exist?(CONDOR_EVENT_LOG_FILE)
+
# track the modification time of the file for changes
logfile_timestamp = File.mtime(CONDOR_EVENT_LOG_FILE)
--
1.7.5.2
13 years
[PATCH conductor] Add aeolus-cli to makefile and aeolus-all.
by Jason Guiditta
---
Makefile | 1 +
aeolus-all.spec.in | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index f3a40f4..2598780 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,7 @@ dist:
rpms: dist
cd services/image_factory/console; rake rpms $(RAKE_EXTRA_RELEASE)
cd services/image_factory/image_factory_connector; rake rpms $(RAKE_EXTRA_RELEASE)
+ cd services/image_factory/aeolus-image; rake rpms $(RAKE_EXTRA_RELEASE)
rpmbuild $(RPM_FLAGS) -ta aeolus-conductor-$(VERSION).tar.gz
rpmbuild $(RPM_FLAGS) -ba aeolus-all.spec
diff --git a/aeolus-all.spec.in b/aeolus-all.spec.in
index 318c61d..78555c1 100644
--- a/aeolus-all.spec.in
+++ b/aeolus-all.spec.in
@@ -16,6 +16,7 @@ Requires: aeolus-configure
Requires: imagefactory
Requires: qpid-cpp-server
Requires: rubygem(image_factory_connector)
+Requires: rubygem(aeolus-cli)
Requires: mongodb-server
Requires: mod_ssl
Requires: deltacloud-core
--
1.7.4.4
13 years
[PATCH conductor 1/2] Add packaging for cli tool.
by Jason Guiditta
---
services/image_factory/aeolus-image/Rakefile | 34 +++++--
.../bin/{aeolus-image.rb => aeolus-image} | 0
.../image_factory/aeolus-image/rake/rpmtask.rb | 95 ++++++++++++++++++++
.../aeolus-image/rubygem-aeolus-cli.spec | 60 ++++++++++++
4 files changed, 180 insertions(+), 9 deletions(-)
rename services/image_factory/aeolus-image/bin/{aeolus-image.rb => aeolus-image} (100%)
create mode 100644 services/image_factory/aeolus-image/rake/rpmtask.rb
create mode 100644 services/image_factory/aeolus-image/rubygem-aeolus-cli.spec
diff --git a/services/image_factory/aeolus-image/Rakefile b/services/image_factory/aeolus-image/Rakefile
index d518ccf..29941f1 100644
--- a/services/image_factory/aeolus-image/Rakefile
+++ b/services/image_factory/aeolus-image/Rakefile
@@ -5,20 +5,30 @@ require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/testtask'
require 'spec/rake/spectask'
+require 'rake/rpmtask'
+
+RPMBUILD_DIR = "#{File.expand_path('~')}/rpmbuild"
+RPM_SPEC = "rubygem-aeolus-cli.spec"
spec = Gem::Specification.new do |s|
- s.name = 'aeolus-image'
+ s.name = 'aeolus-cli'
s.version = '0.0.1'
s.has_rdoc = true
- s.extra_rdoc_files = ['README', 'LICENSE']
- s.summary = 'Your summary here'
- s.description = s.summary
- s.author = ''
- s.email = ''
- # s.executables = ['your_executable_here']
- s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
+ s.summary= 'cli for aeolus cloud suite'
+ s.description = 'Commandline interface for working with the aeolus cloud management suite'
+ s.author = 'Jason Guiditta, Martyn Taylor'
+ s.email = 'jguiditt(a)redhat.com, mtaylor(a)redhat.com'
+ s.license = 'GPL-2'
+ s.homepage = 'http://aeolusproject.org'
+ s.executables << 'aeolus-image'
+ s.files = %w(Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
s.require_path = "lib"
s.bindir = "bin"
+ s.add_dependency('nokogiri', '>=0.4.0')
+ s.add_dependency('rest-client')
+ s.add_dependency('image_factory_console', '>=0.4.0')
+
+ s.add_development_dependency('rspec', '~>1.3.0')
end
Rake::GemPackageTask.new(spec) do |p|
@@ -43,4 +53,10 @@ end
Spec::Rake::SpecTask.new do |t|
t.spec_files = FileList['spec/**/*.rb']
t.libs << Dir["lib"]
-end
\ No newline at end of file
+end
+
+Rake::RpmTask.new(RPM_SPEC) do |rpm|
+ rpm.need_tar = true
+ rpm.package_files.include("lib/*")
+ rpm.topdir = "#{RPMBUILD_DIR}"
+end
diff --git a/services/image_factory/aeolus-image/bin/aeolus-image.rb b/services/image_factory/aeolus-image/bin/aeolus-image
similarity index 100%
rename from services/image_factory/aeolus-image/bin/aeolus-image.rb
rename to services/image_factory/aeolus-image/bin/aeolus-image
diff --git a/services/image_factory/aeolus-image/rake/rpmtask.rb b/services/image_factory/aeolus-image/rake/rpmtask.rb
new file mode 100644
index 0000000..7534693
--- /dev/null
+++ b/services/image_factory/aeolus-image/rake/rpmtask.rb
@@ -0,0 +1,95 @@
+# Define a package task library to aid in the definition of RPM
+# packages.
+
+require 'rubygems'
+require 'rake'
+require 'rake/packagetask'
+
+require 'rbconfig' # used to get system arch
+
+module Rake
+
+ # Create a package based upon a RPM spec.
+ # RPM packages, can be produced by this task.
+ class RpmTask < PackageTask
+ # RPM spec containing the metadata for this package
+ attr_accessor :rpm_spec
+
+ # RPM build dir
+ attr_accessor :topdir
+
+ def initialize(rpm_spec)
+ init(rpm_spec)
+ yield self if block_given?
+ define if block_given?
+ end
+
+ def init(rpm_spec)
+ @rpm_spec = rpm_spec
+
+ # parse this out of the rpmbuild macros,
+ # not ideal but better than hardcoding this
+ File.open('/etc/rpm/macros.dist', "r") { |f|
+ f.read.scan(/%dist\s*\.(.*)\n/)
+ @distro = $1
+ }
+
+ # Parse rpm name / version out of spec
+ # FIXME hacky way to do this for now
+ # (would be nice to implement a full blown rpm spec parser for ruby)
+ File.open(rpm_spec, "r") { |f|
+ contents = f.read
+ # Parse out definitions and crudely expand them
+ contents.scan(/%define .*\n/).each do |definition|
+ words = definition.strip.split(' ')
+ key = words[1]
+ value = words[2..-1].to_s
+ # Modify the contents with expanded values, unless they contain
+ # a shell command (since we're not modifying them)
+ contents.gsub!("%{#{key}}", value) unless value.match('%\(')
+ end
+ @name = contents.scan(/\nName: .*\n/).first.split.last
+ @version = contents.scan(/\nVersion: .*\n/).first.split.last
+ @release = contents.scan(/\nRelease: .*\n/).first.split.last
+ @release.gsub!("%{?dist}", ".#{@distro}")
+ @arch = contents.scan(/\nBuildArch: .*\n/) # TODO grab local arch if not defined
+ if @arch.nil?
+ @arch = Config::CONFIG["target_cpu"] # hoping this will work for all cases,
+ # can just run the 'arch' cmd if we want
+ else
+ @arch = @arch.first.split.last
+ end
+ }
+ super(@name, @version)
+
+ @rpmbuild_cmd = 'rpmbuild'
+ end
+
+ def define
+ super
+
+ directory "#{@topdir}/SOURCES"
+ directory "#{@topdir}/SPECS"
+
+ desc "Build the rpms"
+ task :rpms => [rpm_file]
+
+ # FIXME properly determine :package build artifact(s) to copy to sources dir
+ file rpm_file => [:package, "#{@topdir}/SOURCES", "#{@topdir}/SPECS"] do |t,args|
+ cp "#{package_dir}/#{@name}-#{(a)version}.tgz", "#{@topdir}/SOURCES/"
+ # FIXME - This seems like a hack, but we don't know the gem's name
+ cp "#{package_dir}/#{(a)name.gsub('rubygem-', '')}-#{(a)version}.gem", "#{@topdir}/SOURCES/"
+ cp @rpm_spec, "#{@topdir}/SPECS"
+ sh "#{@rpmbuild_cmd} " +
+ "--define '_topdir #{@topdir}' " +
+ "--define 'extra_release #{args.extra_release}' " +
+ "-ba #{@rpm_spec}"
+ end
+ end
+
+ def rpm_file
+ # FIXME support all a spec's subpackages as well
+ "#{@topdir}/RPMS/#{@arch}/#{@name}-#{@version}-#{@release}.#{(a)arch}.rpm"
+ end
+ end
+end
diff --git a/services/image_factory/aeolus-image/rubygem-aeolus-cli.spec b/services/image_factory/aeolus-image/rubygem-aeolus-cli.spec
new file mode 100644
index 0000000..7e44d07
--- /dev/null
+++ b/services/image_factory/aeolus-image/rubygem-aeolus-cli.spec
@@ -0,0 +1,60 @@
+# Generated from image_factory_console-0.2.0.gem by gem2rpm -*- rpm-spec -*-
+%define ruby_sitelib %(ruby -rrbconfig -e "puts Config::CONFIG['sitelibdir']")
+%define gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%define gemname aeolus-cli
+%define geminstdir %{gemdir}/gems/%{gemname}-%{version}
+
+Summary: Commandline interface for working with the Aeolus cloud suite
+Name: rubygem-%{gemname}
+Version: 0.0.1
+Release: 1%{?dist}%{?extra_release}
+Group: Development/Languages
+License: GPLv2+ or Ruby
+URL: http://aeolusproject.org
+
+Source0: %{gemname}-%{version}.gem
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: rubygems
+Requires: rubygem(nokogiri) >= 1.4.0
+Requires: rubygem(rest-client)
+Requires: rubygem(image_factory_console) >= 0.4.0
+
+BuildRequires: rubygems
+BuildArch: noarch
+Provides: rubygem(%{gemname}) = %{version}
+
+%description
+QMF Console for Aeolus Image Factory
+
+
+%prep
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gemdir}
+gem install --local --install-dir %{buildroot}%{gemdir} \
+ --force --rdoc %{SOURCE0}
+
+mkdir -p %{buildroot}/%{_bindir}
+mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
+rmdir %{buildroot}%{gemdir}/bin
+find %{buildroot}%{geminstdir}/bin -type f | xargs chmod a+x
+
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%{_bindir}/aeolus-image
+%{gemdir}/gems/%{gemname}-%{version}/
+%doc %{gemdir}/doc/%{gemname}-%{version}
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+
+
+%changelog
+* Wed Jun 15 2011 <jguiditt(a)redhat.com> - 0.0.1-1
+- Initial package
--
1.7.4.4
13 years