[PATCH configure] Fix /var/lib/aeolus-conductor permissions
by Richard Su
The directory should be owned by aeolus.aeolus. Incorrect permissions
prevents instances from being launched.
---
recipes/aeolus/manifests/conductor.pp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/recipes/aeolus/manifests/conductor.pp b/recipes/aeolus/manifests/conductor.pp
index f14ea45..d04f640 100644
--- a/recipes/aeolus/manifests/conductor.pp
+++ b/recipes/aeolus/manifests/conductor.pp
@@ -12,7 +12,9 @@ class aeolus::conductor inherits aeolus {
ensure => 'installed'}
file {"/var/lib/aeolus-conductor":
- ensure => directory }
+ ensure => directory,
+ owner => 'aeolus',
+ group => 'aeolus'}
### Setup selinux for deltacloud
selinux::mode{"permissive":}
--
1.7.4.4
12 years, 10 months
Conductor UX Presentation
by Kenneth Keiter
Hello All,
I just gave a presentation about the Conductor user experience (UX) to the group of SAs in Westford, and Angus asked that I share it with the list. Perhaps it will be of use to someone in the future when they're trying to explain the subtleties of our UI.
You can download the presentation (PDF, 1.5MB) here: http://goo.gl/E3Jt1
Cheers,
Ken Keiter (a.k.a. tigger)
kenkeiter(a)redhat.com
12 years, 10 months
Debugging script
by Matt Wagner
Hi all,
I've sent this a couple times in the past but it's been lost in the noise. Could someone give this a quick review? It needs to be run with root to give accurate results. I'd really love to get this in ASAP, as it will be helpful for users in debugging.
-- Matt
12 years, 10 months
[PATCH conductor] properties tab of faceted navigation
by Tomas Hrcka
---
src/app/controllers/deployments_controller.rb | 17 ++++++++++++-----
src/app/controllers/pools_controller.rb | 4 ++--
src/app/models/deployment.rb | 3 +++
src/app/views/deployments/_properties.haml | 19 ++++++++++---------
src/app/views/deployments/show.haml | 5 ++---
src/app/views/pools/show.haml | 2 +-
src/public/javascripts/application.js | 22 ++++++++++++++++++++++
src/spec/models/deployment_spec.rb | 4 ++++
8 files changed, 56 insertions(+), 20 deletions(-)
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index 697ce3e..e611067 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -69,7 +69,10 @@ class DeploymentsController < ApplicationController
:successes => status[:successes]
}
end
- format.js { render :partial => 'properties' }
+ format.js do
+ @deployment_properties = @deployment.properties
+ render :partial => 'properties'
+ end
format.html { redirect_to deployment_path(@deployment) }
format.json { render :json => @deployment, :status => :created }
else
@@ -91,17 +94,18 @@ class DeploymentsController < ApplicationController
save_breadcrumb(deployment_path(@deployment, :viewstate => viewstate_id), @deployment.name)
@failed_instances = @deployment.instances.select {|instance| instance.state == Instance::STATE_CREATE_FAILED || instance.state == Instance::STATE_ERROR}
@view = filter_view? ? 'filter_view_show' : 'pretty_view_show'
- #TODO add links to real data for history,properties,permissions
+ #TODO add links to real data for history, permissions, services
@tabs = [{:name => 'Instances', :view => @view, :id => 'instances', :count => @deployment.instances.count},
{:name => 'Services', :view => @view, :id => 'services'},
{:name => 'History', :view => @view, :id => 'history'},
- {:name => 'Properties', :view => @view, :id => 'properties'},
+ {:name => 'Properties', :view => 'properties', :id => 'properties'},
{:name => 'Permissions', :view => @view, :id => 'permissions'}
]
details_tab_name = params[:details_tab].blank? ? 'instances' : params[:details_tab]
@details_tab = @tabs.find {|t| t[:id] == details_tab_name} || @tabs.first[:name].downcase
+ @deployment_properties = @deployment.properties
respond_to do |format|
- format.js { render :partial => @view }
+ format.js { render :partial => params[:only_tab] == "true" ? @details_tab[:view] : @view }
format.html { render :action => 'show'}
format.json { render :json => @deployment }
end
@@ -123,7 +127,10 @@ class DeploymentsController < ApplicationController
respond_to do |format|
if check_privilege(Privilege::MODIFY, @deployment) and @deployment.update_attributes(attrs)
flash[:success] = t('deployments.updated', :count => 1, :list => @deployment.name)
- format.js { render :partial => 'properties' }
+ format.js do
+ @deployment_properties = @deployment.properties
+ render :partial => 'properties'
+ end
format.html { redirect_to @deployment }
format.json { render :json => @deployment }
else
diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb
index 68c1b62..200199f 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -61,13 +61,13 @@ class PoolsController < ApplicationController
#TODO add links to real data for history,properties,permissions
@tabs = [{:name => 'Deployments', :view => @view, :id => 'deployments', :count => @pool.deployments.count},
{:name => 'History', :view => @view, :id => 'history'},
- {:name => 'Properties', :view => @view, :id => 'properties'},
+ {:name => 'Properties', :view => 'properties', :id => 'properties'},
{:name => 'Permissions', :view => @view, :id => 'permissions'}
]
details_tab_name = params[:details_tab].blank? ? 'deployments' : params[:details_tab]
@details_tab = @tabs.find {|t| t[:id] == details_tab_name} || @tabs.first[:name].downcase
respond_to do |format|
- format.js { render :partial => @view, :locals => {:deployments => @pool.deployments}}
+ format.js { render :partial => params[:only_tab] == "true" ? @details_tab[:view] : @view , :locals => {:deployments => @pool.deployments}}
format.html { render :action => :show}
format.json { render :json => @pool }
end
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index bcfd241..ea78cd8 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -195,4 +195,7 @@ class Deployment < ActiveRecord::Base
end
end
+ def properties
+ {:name => name, :owner => "#{owner.first_name} #{owner.last_name}", :created => created_at, :pool => pool.name}
+ end
end
diff --git a/src/app/views/deployments/_properties.haml b/src/app/views/deployments/_properties.haml
index b5e27af..476b20a 100644
--- a/src/app/views/deployments/_properties.haml
+++ b/src/app/views/deployments/_properties.haml
@@ -1,9 +1,10 @@
-%h3
- = @deployment.name
-%ul
- %li
- Pool:
- = @deployment.pool.name
- %li
- Created:
- = @deployment.created_at
\ No newline at end of file
+%table.properties_table
+ %thead
+ %tr
+ %th Property Name
+ %th Value
+ %tbody
+ -(a)deployment_properties.each do |key, value|
+ %tr
+ %td=key.to_s.capitalize
+ %td=value
\ No newline at end of file
diff --git a/src/app/views/deployments/show.haml b/src/app/views/deployments/show.haml
index 6f92fdf..fdc6b99 100644
--- a/src/app/views/deployments/show.haml
+++ b/src/app/views/deployments/show.haml
@@ -12,6 +12,5 @@
%span.label.badge.count.dark=tab[:count]
.section-controls
%a.collapse{'href'=>'#'} Collapse
- .content.collapsible.toggle-view.pools
- %section.content-section.toggle-view#content
- = render :partial => @view
\ No newline at end of file
+ .content.collapsible.toggle-view.deployments#tab
+ = render :partial => @view
\ No newline at end of file
diff --git a/src/app/views/pools/show.haml b/src/app/views/pools/show.haml
index 223aca9..68c51a3 100644
--- a/src/app/views/pools/show.haml
+++ b/src/app/views/pools/show.haml
@@ -17,6 +17,6 @@
%span.label.badge.count.dark=tab[:count]
.section-controls
%a.collapse{'href'=>'#'} Collapse
- .content.collapsible.toggle-view.pools
+ .content.collapsible.toggle-view.pools#tab
%ul.deployable-cards
= render :partial => @view, :locals => {:deployments => @pool.deployments}
\ No newline at end of file
diff --git a/src/public/javascripts/application.js b/src/public/javascripts/application.js
index 5c9458f..975cf92 100644
--- a/src/public/javascripts/application.js
+++ b/src/public/javascripts/application.js
@@ -59,6 +59,27 @@ var Conductor = {
}
},
+ tabAjaxRequest: function () {
+ $('#tab-container-1-nav a').live("click",function(e) {
+ if (e.which==2||e.metaKey||e.ctrlKey||e.shiftKey) return true;
+
+ e.preventDefault();
+ var url = $(this).attr('href');
+ $.get(url, function(data) {
+ $('#tab').html(data)
+ .show();
+ });
+ Conductor.tabRemoveActiveClass();
+ $(this).addClass('active');
+ });
+ },
+
+ tabRemoveActiveClass: function () {
+ $('#tab-container-1-nav a').each(function(index) {
+ $(this).removeClass('active');
+ });
+ },
+
enhanceListView: function () {
$('#list-view table tbody a').live("click",function(e) {
if (e.which==2||e.metaKey||e.ctrlKey||e.shiftKey) return true;
@@ -251,4 +272,5 @@ $(document).ready(function () {
Conductor.multiDestroyValidation();
Conductor.closeNotification();
Conductor.enhanceUserMenu();
+ Conductor.tabAjaxRequest();
});
diff --git a/src/spec/models/deployment_spec.rb b/src/spec/models/deployment_spec.rb
index 990d0d1..bde2358 100644
--- a/src/spec/models/deployment_spec.rb
+++ b/src/spec/models/deployment_spec.rb
@@ -66,4 +66,8 @@ describe Deployment do
@deployment.instances.count.should == 2
end
+ it "should return properties hash" do
+ @deployment.properties.should be_a_kind_of(Hash)
+ @deployment.properties.should == {:created=>nil, :pool=>@deployment.pool.name, :owner=>"John Smith", :name=>@deployment.name}
+ end
end
--
1.7.4.4
12 years, 10 months
Series of minor clean-ups for aeolus-image
by Jason Guiditta
The following patchset contains 3 reposts that are the same as their original
versions, just grouped together for easier review and rebased against next.
They should apply on top of commit 2a88782ec874ec0daf2e6d9f3821e3c54fc8a0e7.
The last is a doc update requested to clarify which flag combinations
currently work.
[PATCH aeolus-image 1/4] BZ #714276: aeolus-image list --builds
[PATCH aeolus-image 2/4] BZ #715103 aeolus-image push w/ build id
[PATCH aeolus-image 3/4] Issue #1866: create default config file
[PATCH aeolus-image 4/4] Documentation for -h.
12 years, 10 months
[PATCH conductor] Add toggle to show/hide stopped instances
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=698270
---
src/app/controllers/pools_controller.rb | 4 ++++
src/app/views/instances/_list.haml | 7 +++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb
index 68c1b62..2ba382d 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -32,6 +32,10 @@ class PoolsController < ApplicationController
@pools = Pool.list_or_search(params[:q], params[:order_field],params[:order_dir])
when 'instances'
@instances = Instance.list_or_search(params[:q], params[:order_field],params[:order_dir])
+ @hide_stopped = @viewstate && @viewstate.state['hide_stopped'] == 'true'
+ if @hide_stopped
+ @instances.delete_if {|i| i.state == 'stopped'}
+ end
when 'deployments'
@deployments = Deployment.list_or_search(params[:q], params[:order_field],params[:order_dir])
end
diff --git a/src/app/views/instances/_list.haml b/src/app/views/instances/_list.haml
index 77c2a31..5b59f30 100644
--- a/src/app/views/instances/_list.haml
+++ b/src/app/views/instances/_list.haml
@@ -1,6 +1,13 @@
- form_tag do
= restful_submit_tag 'Stop', 'stop', multi_stop_instances_path, 'GET'
= restful_submit_tag 'Remove failed', 'remove_failed', remove_failed_instances_path, 'GET'
+ - if @hide_stopped
+ %b Stopped
+ instances are hidden:
+ = link_to "show all", params.merge('hide_stopped' => 'false')
+ - else
+ Showing all instances:
+ = link_to "hide stopped", params.merge('hide_stopped' => 'true')
%p
Select:
--
1.7.4.4
12 years, 10 months
[PATCH configure] remove dbomatic
by Mo Morsi
---
recipes/aeolus/files/condor_config.local | 5 -----
recipes/aeolus/manifests/conductor.pp | 4 ----
spec/spec_helper.rb | 2 +-
3 files changed, 1 insertions(+), 10 deletions(-)
diff --git a/recipes/aeolus/files/condor_config.local b/recipes/aeolus/files/condor_config.local
index 76a97b5..fea6da5 100644
--- a/recipes/aeolus/files/condor_config.local
+++ b/recipes/aeolus/files/condor_config.local
@@ -16,8 +16,3 @@ COLLECTOR_DEBUG = D_FULLDEBUG
DELTACLOUD_GAHP = $(SBIN)/deltacloud_gahp
CLASSAD_LIFETIME = 0
-
-# for the event log parsing (i.e. dbomatic)
-EVENT_LOG=$(LOG)/EventLog
-EVENT_LOG_USE_XML=True
-EVENT_LOG_JOB_AD_INFORMATION_ATTRS=Owner,GlobalJobId,Cmd,JobStartDate,JobCurrentStartDate,JobFinishedHookDone,DeltacloudProviderId,DeltacloudPublicNetworkAddresses,DeltacloudPrivateNetworkAddresses,DeltacloudAvailableActions,JobStatus,DeltacloudUsername
diff --git a/recipes/aeolus/manifests/conductor.pp b/recipes/aeolus/manifests/conductor.pp
index 144f698..d59da65 100644
--- a/recipes/aeolus/manifests/conductor.pp
+++ b/recipes/aeolus/manifests/conductor.pp
@@ -34,7 +34,6 @@ class aeolus::conductor inherits aeolus {
require => File['/var/lib/condor/condor_config.local'] }
service { ['aeolus-conductor',
'conductor-warehouse_sync',
- 'conductor-dbomatic',
'conductor-delayed_job']:
ensure => 'running',
enable => true,
@@ -220,12 +219,10 @@ class aeolus::conductor::disabled {
enable => false,
require => [Service['aeolus-conductor',
'conductor-warehouse_sync',
- 'conductor-dbomatic',
'conductor-delayed_job'],
Exec['remove_condor_jobs']] }
service { ['aeolus-conductor',
'conductor-warehouse_sync',
- 'conductor-dbomatic',
'conductor-delayed_job',
'aeolus-connector']:
ensure => 'stopped',
@@ -238,7 +235,6 @@ class aeolus::conductor::disabled {
rails_env => "production",
require => Service["aeolus-conductor",
'conductor-warehouse_sync',
- "conductor-dbomatic",
"conductor-delayed_job"]}
postgres::user{"aeolus":
ensure => 'dropped',
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index ecf5ae5..64acc38 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -11,7 +11,7 @@ AEOLUS_PACKAGES = ['iwhd', 'imagefactory',
'aeolus-configure']
AEOLUS_SERVICES = ['iwhd', 'deltacloud-mock', 'deltacloud-ec2-us-east-1', 'deltacloud-ec2-us-west-1', 'imagefactory',
- 'aeolus-conductor', 'conductor-dbomatic']
+ 'aeolus-conductor']
# 'conductor-delayed_job'] TODO where is the init script for this?
AEOLUS_DEPENDENCY_PACKAGES = ['rubygem-aws', 'curl', 'java-1.6.0-openjdk', 'openssh-server',
--
1.7.5.4
12 years, 10 months
[PATCH configure 2/2] run deltacloud-core as the 'nobody' user
by Mo Morsi
---
recipes/aeolus/templates/deltacloud-core | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/recipes/aeolus/templates/deltacloud-core b/recipes/aeolus/templates/deltacloud-core
index 0f52b65..5c59818 100644
--- a/recipes/aeolus/templates/deltacloud-core
+++ b/recipes/aeolus/templates/deltacloud-core
@@ -16,6 +16,7 @@ PORT="${PORT:-<%= port %>}"
LOCKFILE="${LOCKFILE:-/var/lock/subsys/deltacloud-<%= name %> }"
LOGFILE="${LOGFILE:-/var/log/deltacloud-<%= name %>/$DRIVER.log}"
PIDFILE="${THIN_PID:-/var/run/deltacloud-<%= name %>.pid}"
+DELTACLOUD_USER="${DELTACLOUD_USER:-nobody}"
export DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-<%= name %>-0.3.0/lib/deltacloud/drivers/mock/data/
PROG=/usr/bin/deltacloudd
@@ -34,7 +35,7 @@ start() {
exit 0
fi
- $PROG -i $DRIVER -e $ENV -p $PORT <%= "--provider #{endpoint}" unless endpoint == "" %> >> $LOGFILE 2>&1 &
+ sudo -u $DELTACLOUD_USER -- $PROG -i $DRIVER -e $ENV -p $PORT <%= "--provider #{endpoint}" unless endpoint == "" %> >> $LOGFILE 2>&1 &
RETVAL=$?
echo $! > $PIDFILE
if [ $RETVAL -eq 0 ] ; then
--
1.7.5.4
12 years, 10 months