Heads up: Aeolus package repo's being re-organised
by Justin Clift
Hi all,
We're re-organising the Aeolus package repositories, for this upcoming
major release of Aeolus.
So, things could be in a weird stage for the next few hours (or even a
day) as things get moved around.
Please don't get too stressed if yum throws any weird messages at you,
it'll just mean we're knocking things into shape on our end.
Regards and best wishes,
Justin Clift
--
Aeolus Community Manager
http://www.aeolusproject.org
13 years
Feature #1078(rev.1)
by jzigmund@redhat.com
As an SA I want to enable the pool so that it can be used for a deployment.
This feature includes 2 subtasks:
- #1109 - Add switch on pool model for enable/disable pool
- #1110 - Update UI to reflect enabled/disabled pools
13 years
[PATCH aeolus] Add Deployments tab under Deployables details pane
by jzigmund@redhat.com
From: Jozef Zigmund <jzigmund(a)redhat.com>
---
.../image_factory/deployables_controller.rb | 13 +++++++++-
.../resources/deployments_controller.rb | 2 +-
.../image_factory/deployables/_deployments.haml | 25 ++++++++++++++++++++
src/features/deployable.feature | 6 ++++
src/features/step_definitions/deployable_steps.rb | 6 ++++-
src/features/support/paths.rb | 3 ++
6 files changed, 52 insertions(+), 3 deletions(-)
create mode 100644 src/app/views/image_factory/deployables/_deployments.haml
diff --git a/src/app/controllers/image_factory/deployables_controller.rb b/src/app/controllers/image_factory/deployables_controller.rb
index 05e9596..62fc032 100644
--- a/src/app/controllers/image_factory/deployables_controller.rb
+++ b/src/app/controllers/image_factory/deployables_controller.rb
@@ -9,8 +9,11 @@ class ImageFactory::DeployablesController < ApplicationController
def show
@deployable = Deployable.find(params[:id])
@url_params = params.clone
- @tab_captions = ['Properties', 'Assemblies']
+ @tab_captions = ['Properties', 'Assemblies', 'Deployments']
@details_tab = params[:details_tab].blank? ? 'properties' : params[:details_tab]
+ if @details_tab == 'deployments'
+ @deployments = @deployable.deployments ? @deployable.deployments : nil
+ end
respond_to do |format|
format.js do
if @url_params.delete :details_pane
@@ -109,6 +112,14 @@ class ImageFactory::DeployablesController < ApplicationController
@header = [
{ :name => "Deployable name", :sort_attr => :name }
]
+ @header_deployments = [
+ { :name => "Deployment name", :sort_attr => :name },
+ { :name => "Deployable", :sortable => false },
+ { :name => "Deployment Owner", :sort_attr => "owner.last_name"},
+ { :name => "Running Since", :sort_attr => :running_since },
+ { :name => "Heath Metric", :sort_attr => :health },
+ { :name => "Pool", :sort_attr => "pool.name" }
+ ]
@deployables = Deployable.paginate(:all,
:page => params[:page] || 1,
:order => (params[:order_field] || 'name') +' '+ (params[:order_dir] || 'asc')
diff --git a/src/app/controllers/resources/deployments_controller.rb b/src/app/controllers/resources/deployments_controller.rb
index dbac19c..1c04cdc 100644
--- a/src/app/controllers/resources/deployments_controller.rb
+++ b/src/app/controllers/resources/deployments_controller.rb
@@ -34,4 +34,4 @@ class Resources::DeploymentsController < ApplicationController
{ :name => "Pool", :sort_attr => "pool.name" }
]
end
-end
\ No newline at end of file
+end
diff --git a/src/app/views/image_factory/deployables/_deployments.haml b/src/app/views/image_factory/deployables/_deployments.haml
new file mode 100644
index 0000000..ef5b1d4
--- /dev/null
+++ b/src/app/views/image_factory/deployables/_deployments.haml
@@ -0,0 +1,25 @@
+.grid_13
+ %h2 Deployments of #{(a)deployable.name}
+
+ - unless @deployments.empty?
+ - form_tag do
+ %table#deployments_table
+ = sortable_table_header @header_deployments
+ - @deployments.each do |deployment|
+ %tr
+ %td
+ - selected = @url_params[:select] == 'all'
+ %input{:name => "deployments_selected[]", :type => "checkbox", :value => deployment.id, :id => "deployment_checkbox_#{deployment.id}", :checked => selected }
+ = link_to deployment.name, resources_deployment_path(deployment)
+ %td
+ = deployment.deployable.name
+ %td
+ = deployment.owner.login
+ %td
+ = deployment.created_at.strftime("%d-%b-%Y %H:%M:%S")
+ %td
+ TODO
+ %td
+ = deployment.pool.name
+ - else
+ No Deployments for #{(a)deployable.name}
diff --git a/src/features/deployable.feature b/src/features/deployable.feature
index 7e1da9a..5970d21 100644
--- a/src/features/deployable.feature
+++ b/src/features/deployable.feature
@@ -72,3 +72,9 @@ Feature: Manage Deployables
And I press "Remove Selected"
Then I should see "Assemblies removed."
And I should not see "Apache"
+
+ Scenario: Show list of deployments belongs to deployable
+ Given there is a deployable named "My"
+ And there are deployment named "My deployment" belongs to "My"
+ When I am on the deployable deployments page
+ Then I should see "My deployment"
diff --git a/src/features/step_definitions/deployable_steps.rb b/src/features/step_definitions/deployable_steps.rb
index d4b6af6..c81ebf2 100644
--- a/src/features/step_definitions/deployable_steps.rb
+++ b/src/features/step_definitions/deployable_steps.rb
@@ -11,10 +11,14 @@ Then /^I should have a deployable named "([^"]*)"$/ do |name|
end
Given /^there is a deployable named "([^"]*)"$/ do |name|
- Deployable.create!(:name => name)
+ @deployable = Deployable.create!(:name => name)
end
When /^I check the "([^"]*)" deployable$/ do |name|
deployable = Deployable.find_by_name(name)
check("deployable_checkbox_#{deployable.id}")
end
+
+Given /^there are deployment named "([^"]*)" belongs to "([^"]*)"$/ do |deployment_name, deployable_name|
+ Factory(:deployment, :deployable => Deployable.find_by_name(deployable_name), :name => deployment_name)
+end
diff --git a/src/features/support/paths.rb b/src/features/support/paths.rb
index a313aa0..b8e6e74 100644
--- a/src/features/support/paths.rb
+++ b/src/features/support/paths.rb
@@ -110,6 +110,9 @@ module NavigationHelpers
when /^(.*)'s provider account page$/
admin_provider_account_path(ProviderAccount.find_by_label($1))
+ when /the deployable deployments page/
+ image_factory_deployable_path(@deployable, :details_tab => 'deployments')
+
when /^(.*)'s image factory deployable page$/
image_factory_deployable_path(Deployable.find_by_name($1))
--
1.7.4.4
13 years
[PATCH] Condormatic - pool family's accounts support (#1214)
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
Only class ads for provider accounts mapped to a pool family are now generated.
Also added pool family info into class ads.
TODO: update condor plugin to check pool family quota
---
src/app/util/condormatic.rb | 35 +++++++++++++++++++----------------
1 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/src/app/util/condormatic.rb b/src/app/util/condormatic.rb
index c095ff5..54184b7 100644
--- a/src/app/util/condormatic.rb
+++ b/src/app/util/condormatic.rb
@@ -57,6 +57,8 @@ def condormatic_instance_create(task)
Rails.logger.error "DeltacloudHardwareProfileStorage = $$(hardware_profile_storage)\n"
pipe.puts "DeltacloudKeyname = $$(keypair)\n"
Rails.logger.error "DeltacloudKeyname = $$(keypair)\n"
+ pipe.puts "DeltacloudKeyname = $$(pool_family)\n"
+ Rails.logger.error "DeltacloudKeyname = $$(pool_family)\n"
if realm != nil
pipe.puts "DeltacloudRealmId = $$(realm_key)\n"
@@ -64,6 +66,7 @@ def condormatic_instance_create(task)
end
requirements = "requirements = front_end_hardware_profile_id == \"#{instance.hardware_profile.id}\" && image == \"#{instance.template.id}\""
+ requirements += " && pool_family == \"#{instance.pool.pool_family.id}\""
requirements += " && realm == \"#{realm.id}\"" if realm != nil
# Call into the deltacloud quota plugin. This uses a REST API to call back into the
# conductor to check quotas as the last thing in the logical AND to match a provider
@@ -217,37 +220,36 @@ def condormatic_classads_sync
front_end_hardware_profiles = HardwareProfile.find(:all, :conditions => ["provider_id IS NULL"])
- providers.each do |provider|
- # The provider image entry gets put in the database as soon as we ask
- # to have the image built, so we only want to generate classads for it if
- # it is ready to be used. When ready it will have an image key assigned
- # to it.
- provider_images = provider.provider_images.find(:all,
- :conditions => ['provider_image_key IS NOT NULL'])
- accounts = provider.provider_accounts
- realms = provider.realms
-
- accounts.each do |account|
+ PoolFamily.all.each do |pool_family|
+ pool_family.provider_accounts.each do |account|
+ # The provider image entry gets put in the database as soon as we ask
+ # to have the image built, so we only want to generate classads for it if
+ # it is ready to be used. When ready it will have an image key assigned
+ # to it.
+ provider_images = account.provider.provider_images.find(:all,
+ :conditions => ['provider_image_key IS NOT NULL'])
+ realms = account.provider.realms
+
provider_images.each do |provider_img|
front_end_hardware_profiles.each do |hwp|
# when user doesn't select any realm
- ads << [account, provider_img, hwp, nil, nil]
+ ads << [account, provider_img, hwp, nil, nil, pool_family]
# add all backend->frontend mappings
realms.each do |realm|
ads += realm.frontend_realms.collect { |frealm|
- [account, provider_img, hwp, realm, frealm] }
+ [account, provider_img, hwp, realm, frealm, pool_family] }
end
# frontend can be mapped to provider (then backend realm is set to
# nil)
- ads += provider.frontend_realms.collect { |frealm|
- [account, provider_img, hwp, nil, frealm] }
+ ads += account.provider.frontend_realms.collect { |frealm|
+ [account, provider_img, hwp, nil, frealm, pool_family] }
end
end
end
end
ads.each { |ad|
- account, provider_image, hwp, realm, frontend_realm = *ad
+ account, provider_image, hwp, realm, frontend_realm, pool_family = *ad
matching_hardware_profile = HardwareProfile.match_provider_hardware_profile(account.provider, hwp)
if(matching_hardware_profile != nil) && (provider_image.image.template.architecture == hwp.architecture.value)
@@ -274,6 +276,7 @@ def condormatic_classads_sync
pipe.puts "password=\"#{account.credentials_hash['password']}\""
pipe.puts "provider_account_id=\"#{account.id}\""
pipe.puts "keypair=\"#{account.instance_key ? account.instance_key.name : ''}\""
+ pipe.puts "pool_family=\"#{pool_family.id}\""
rescue Exception => ex
Rails.logger.error "Error writing provider classad to condor."
Rails.logger.error ex.message
--
1.7.4.2
13 years
[PATCH conductor] Add search support for Deployables
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
---
.../image_factory/deployables_controller.rb | 7 +++++++
src/features/deployable.feature | 19 +++++++++++++++++++
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/image_factory/deployables_controller.rb b/src/app/controllers/image_factory/deployables_controller.rb
index 05e9596..e809926 100644
--- a/src/app/controllers/image_factory/deployables_controller.rb
+++ b/src/app/controllers/image_factory/deployables_controller.rb
@@ -4,6 +4,13 @@ class ImageFactory::DeployablesController < ApplicationController
before_filter :load_deployable_with_assemblies, :only => [:remove_assemblies, :add_assemblies, :pick_assemblies]
def index
+ @search_term = params[:q]
+ return if @search_term.blank?
+
+ search = Deployable.search() do
+ keywords(params[:q])
+ end
+ @deployables = search.results
end
def show
diff --git a/src/features/deployable.feature b/src/features/deployable.feature
index 7e1da9a..fa6cf56 100644
--- a/src/features/deployable.feature
+++ b/src/features/deployable.feature
@@ -72,3 +72,22 @@ Feature: Manage Deployables
And I press "Remove Selected"
Then I should see "Assemblies removed."
And I should not see "Apache"
+
+ Scenario: Search for deployables
+ Given there is a deployable named "first"
+ And there is a deployable named "second"
+ And I am on the image factory deployables page
+ Then I should see "first"
+ And I should see "second"
+ When I fill in "q" with "first"
+ And I press "Search"
+ Then I should see "first"
+ And I should not see "second"
+ When I fill in "q" with "second"
+ And I press "Search"
+ Then I should see "second"
+ And I should not see "first"
+ When I fill in "q" with ""
+ And I press "Search"
+ Then I should see "first"
+ And I should see "second"
--
1.7.4.4
13 years
Conductor rpms from source
by Justin Clift
Hi guys,
Updating the steps for building Conductor rpms from source.
Does this look ok for F14?
******************************************************************************
First, follow the steps in http://www.aeolusproject.org/conductor-install.html
1. Install the required development packages:
$ sudo yum install classads-devel rest-devel
2. Clone the Conductor git repository:
$ git clone git://git.fedorahosted.org/git/aeolus/conductor.git -b next
3. Create the Conductor rpms:
$ cd conductor
$ ./autogen.sh
$ make rpms
The RPMs are then built and placed in ~/rpmbuild/RPMS. Two rpms will be in the
"noarch" subdirectory, with the rest being in either "i386" or "x86_64"
depending upon your architecture:
$ ls -la ~/rpmbuild/RPMS/x86_64/
total 1320
drwxr-xr-x. 2 jc jc 4096 Apr 21 19:33 .
drwxr-xr-x. 4 jc jc 4096 Apr 21 19:33 ..
-rw-r--r--. 1 jc jc 2236 Apr 21 19:33 aeolus-all-0.0.3-0.fc14.20110421093247git318d726.x86_64.rpm
-rw-r--r--. 1 jc jc 1195376 Apr 21 19:33 aeolus-conductor-0.0.3-0.fc14.20110421093247git318d726.x86_64.rpm
-rw-r--r--. 1 jc jc 16872 Apr 21 19:33 aeolus-conductor-daemons-0.0.3-0.fc14.20110421093247git318d726.x86_64.rpm
-rw-r--r--. 1 jc jc 37952 Apr 21 19:33 aeolus-conductor-debuginfo-0.0.3-0.fc14.20110421093247git318d726.x86_64.rpm
-rw-r--r--. 1 jc jc 66324 Apr 21 19:33 aeolus-conductor-devel-0.0.3-0.fc14.20110421093247git318d726.x86_64.rpm
-rw-r--r--. 1 jc jc 10792 Apr 21 19:33 aeolus-conductor-doc-0.0.3-0.fc14.20110421093247git318d726.x86_64.rpm
$ ls -la ~/rpmbuild/RPMS/noarch/
total 68
drwxr-xr-x. 2 jc jc 4096 Apr 21 19:32 .
drwxr-xr-x. 4 jc jc 4096 Apr 21 19:33 ..
-rw-r--r--. 1 jc jc 30756 Apr 21 19:32 rubygem-image_factory_connector-0.0.2-1.fc14.20110421093247git318d726.noarch.rpm
-rw-r--r--. 1 jc jc 28096 Apr 21 19:32 rubygem-image_factory_console-0.2.0-1.fc14.20110421093247git318d726.noarch.rpm
Seems pretty simple and they look to have built ok.
Regards and best wishes,
Justin Clift
--
Aeolus Community Manager
http://www.aeolusproject.org
13 years
#459/#1072 - Show all Instances in a Pool
by Matt Wagner
Hi all,
This patch implements #1072 (a child of #459), showing all Instances in
a Pool.
A few notes:
- The mockups show Assembly and Deployment in the table as being links.
I added conditional support for making them links when an instance has
an assembly or deployable, though currently none do. The links go to the
ostensibly-correct place, but neither seems to be implemented yet. (For
example, Assemblies#show doesn't even exist yet.) These should come into
existence in the coming days, though.
- I did not use a sortable_table_header, even though they'd have been
nice. Pools already use sortable_table_header, so we ended up with two
on the page. Sorting did not work properly and sometimes threw
exceptions, depending on what you sorted. Additionally, the wrong tab is
loaded after a sort because the sort goes back to 'show'. I started to
try to make it work, but it turned into a great time sink for what I
think is a comparatively unimportant feature. This problem also exists
in other places, such as "Matching Provider Hardware Profiles," so I
think we should try to find a better solution as part of revamping the
UI.
-- Matt
13 years
[PATCH conductor] Option to create deployable for the new template
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
This fixes redmine #412
The new template page now has an option to automatically create a new
deployable containing the template.
---
.../image_factory/templates_controller.rb | 3 +++
src/app/views/image_factory/templates/new.haml | 2 ++
src/features/template.feature | 13 +++++++++++++
3 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/image_factory/templates_controller.rb b/src/app/controllers/image_factory/templates_controller.rb
index 06469e9..00dbf55 100644
--- a/src/app/controllers/image_factory/templates_controller.rb
+++ b/src/app/controllers/image_factory/templates_controller.rb
@@ -77,6 +77,9 @@ class ImageFactory::TemplatesController < ApplicationController
@tpl.assign_owner_roles(current_user)
flash[:notice] = "Template saved."
@tpl.set_complete
+ if params[:create_deployable]
+ @tpl.assemblies.first.deployables.create!({ :name => @tpl.name })
+ end
redirect_to image_factory_templates_path
else
@repository_manager = RepositoryManager.new(:repositories => params[:repository] || @tpl.platform)
diff --git a/src/app/views/image_factory/templates/new.haml b/src/app/views/image_factory/templates/new.haml
index 9ba76fa..2dbac5b 100644
--- a/src/app/views/image_factory/templates/new.haml
+++ b/src/app/views/image_factory/templates/new.haml
@@ -4,5 +4,7 @@
/- form_for @tpl, :url => image_factory_templates_path do |f|
- form_tag do
= render :partial => 'form'
+ = check_box_tag :create_deployable
+ = label_tag :create_deployable, "Create Deployable for this template"
= restful_submit_tag "Save", 'create', image_factory_templates_path, 'POST', :class => "formbutton"
= link_to 'Cancel', image_factory_templates_path, :class => 'button formbutton'
diff --git a/src/features/template.feature b/src/features/template.feature
index 3ffea33..fa6b56d 100644
--- a/src/features/template.feature
+++ b/src/features/template.feature
@@ -213,3 +213,16 @@ Feature: Manage Templates
And I press "Delete"
Then I should be on the image factory templates page
And I should see "Other"
+
+ Scenario: Create Assembly and Deployable
+ Given I am on the new image factory template page
+ When I fill in the following:
+ | tpl_name | mocktemplate |
+ | tpl_platform | fedora13 |
+ | tpl_summary | mockdesc |
+ And I check "create_deployable"
+ And I press "Save"
+ Then I should be on the image factory templates page
+ And I should see "mocktemplate"
+ When I go to the image factory deployables page
+ And I should see "mocktemplate"
--
1.7.4.4
13 years