Time to start an aeolus-users mailing list?
by Justin Clift
Hi all,
Does anyone have objections to the creation of
a new "aeolus-users" mailing list? Purely for
non-dev questions, such as "how do I get my
RHEV-M or vSphere install working?"
Matty_dubs pointed out last night that we're
starting to get a decent number of potential
adopters trying things out, so having a mailing
list for them would be better than the existing
options. i.e fielding queries through the
website (happening regularly), IRC (TZ/luck
sensitive), or the dev mailing list.
Thoughts?
Regards and best wishes,
Justin Clift
--
Aeolus Community Manager
http://www.aeolusproject.org
12 years, 8 months
[PATCH aeolus-image] BZ#723885 Print error on non supported target on build
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
lib/aeolus_image/command/build_command.rb | 10 ++++++++++
lib/aeolus_image/command/list_command.rb | 17 +++++++++++++----
spec/build_command_spec.rb | 12 ++++++++++++
3 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/lib/aeolus_image/command/build_command.rb b/lib/aeolus_image/command/build_command.rb
index 0a6601c..2aca7d0 100644
--- a/lib/aeolus_image/command/build_command.rb
+++ b/lib/aeolus_image/command/build_command.rb
@@ -20,6 +20,7 @@ module Aeolus
def run
if combo_implemented?
+ check_targets
@options[:template_str] = read_file(@options[:template])
if @options[:template_str].nil?
puts "Cannot find specified file"
@@ -63,6 +64,15 @@ module Aeolus
super
end
+ def check_targets
+ lc = ListCommand.new
+ @options[:target].each do |target|
+ unless lc.target_references.include?(target)
+ puts "ERROR: The given target: '" + target + "' is not supported"
+ quit(1)
+ end
+ end
+ end
end
end
end
diff --git a/lib/aeolus_image/command/list_command.rb b/lib/aeolus_image/command/list_command.rb
index 7ca8332..96b69f1 100644
--- a/lib/aeolus_image/command/list_command.rb
+++ b/lib/aeolus_image/command/list_command.rb
@@ -57,15 +57,24 @@ module Aeolus
quit(0)
end
+ def target_references
+ supported_targets.map { |target| target[1] }
+ end
+
def targets
- targets = [["NAME", "TARGET CODE"]]
- targets << ["Mock", "mock"]
+ format_print([["NAME", "TARGET CODE"]] + supported_targets)
+ quit(0)
+ end
+
+ #TODO: Should really get these targets from conductor/imagefactory. At the moment Imagefactory does not
+ # offer a way to get these through its API and the ones in Conductor are at the moment not compatible
+ # with image factory, so these are hardcoded for time being
+ def supported_targets
+ targets = [["Mock", "mock"]]
targets << ["Amazon EC2", "ec2"]
targets << ["RHEV-M", "rhevm"]
targets << ["VMware vSphere", "vsphere"]
targets << ["Condor Cloud", "condor_cloud"]
- format_print(targets)
- quit(0)
end
def providers
diff --git a/spec/build_command_spec.rb b/spec/build_command_spec.rb
index adabb19..fcda5dc 100644
--- a/spec/build_command_spec.rb
+++ b/spec/build_command_spec.rb
@@ -43,6 +43,18 @@ module Aeolus
end
$stdout.string.should include("ERROR: The given Template does not conform to the TDL Schema")
end
+ it "should exit with appropriate message when an invalid target is provided" do
+ @options[:template] = "#{File.dirname(__FILE__)}" + "/../examples/custom_repo.tdl"
+ @options[:image] = '825c94d1-1353-48ca-87b9-36f02e069a8d'
+ @options[:target] = ["InvalidTarget"]
+ b = BuildCommand.new(@options, @output)
+ begin
+ b.check_targets
+ rescue SystemExit => e
+ e.status.should == 1
+ end
+ $stdout.string.should include("ERROR: The given target: 'InvalidTarget' is not supported")
+ end
end
describe "#combo_implemented?" do
--
1.7.6
12 years, 8 months
[PATCH conductor] Load table contents on pools#show dynamically
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
https://www.aeolusproject.org/redmine/issues/2248
---
src/app/controllers/pools_controller.rb | 2 +-
src/app/models/pool.rb | 8 +++++++-
src/public/javascripts/backbone/routers.js | 5 +++--
src/public/javascripts/backbone/views.js | 9 ++++++++-
4 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb
index 1183e3e..a8a71bb 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -81,7 +81,7 @@ class PoolsController < ApplicationController
respond_to do |format|
format.html { render :action => :show}
format.js { render :partial => @view }
- format.json { render :json => @pool }
+ format.json { render :json => @pool.as_json(:with_deployments => true) }
end
end
diff --git a/src/app/models/pool.rb b/src/app/models/pool.rb
index 1e980c2..b943b1b 100644
--- a/src/app/models/pool.rb
+++ b/src/app/models/pool.rb
@@ -107,7 +107,7 @@ class Pool < ActiveRecord::Base
end
def as_json(options={})
- super(options).merge({
+ result = super(options).merge({
:statistics => statistics,
:deployments_count => deployments.count,
:href => Rails.application.routes.url_helpers.pool_path(id),
@@ -117,6 +117,12 @@ class Pool < ActiveRecord::Base
},
})
+
+ if options[:with_deployments]
+ result[:deployments] = deployments.map {|d| d.as_json}
+ end
+
+ result
end
end
diff --git a/src/public/javascripts/backbone/routers.js b/src/public/javascripts/backbone/routers.js
index 62de835..07eb092 100644
--- a/src/public/javascripts/backbone/routers.js
+++ b/src/public/javascripts/backbone/routers.js
@@ -41,9 +41,10 @@ Conductor.Routers.Pools = Backbone.Router.extend({
var pool = new Conductor.Models.Pool({ id: id });
var view = new Conductor.Views.PoolsShow({ model: pool });
- pool.bind('change', function() { view.render() });
- setInterval(function() { pool.fetch() }, Conductor.AJAX_REFRESH_INTERVAL);
+ setInterval(function() {
+ pool.fetch({ success: function() { view.render(); } })
+ }, Conductor.AJAX_REFRESH_INTERVAL);
},
});
diff --git a/src/public/javascripts/backbone/views.js b/src/public/javascripts/backbone/views.js
index f456a85..cc0fb99 100644
--- a/src/public/javascripts/backbone/views.js
+++ b/src/public/javascripts/backbone/views.js
@@ -40,7 +40,14 @@ Conductor.Views.PoolsShow = Backbone.View.extend({
render: function() {
this.$('h1.pools').text(this.model.get('name') + ' Pool');
- return this;
+
+ var $template = $('#deploymentTemplate');
+ var $table = this.$('table.checkbox_table > tbody');
+ if($table.length === 0 || $template.length === 0) return;
+
+ var checkboxes = Conductor.saveCheckboxes('td :checkbox', $table);
+ $table.empty().append($template.tmpl(this.model.get('deployments')))
+ Conductor.restoreCheckboxes(checkboxes, 'td :checkbox', $table);
},
});
--
1.7.6
12 years, 8 months
[PATCH aeolus-image] BZ#723885 Print error on non supported target on build
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
lib/aeolus_image/command/build_command.rb | 10 ++++++++++
lib/aeolus_image/command/list_command.rb | 23 ++++++++++++++++++-----
spec/build_command_spec.rb | 12 ++++++++++++
3 files changed, 40 insertions(+), 5 deletions(-)
diff --git a/lib/aeolus_image/command/build_command.rb b/lib/aeolus_image/command/build_command.rb
index 0a6601c..2aca7d0 100644
--- a/lib/aeolus_image/command/build_command.rb
+++ b/lib/aeolus_image/command/build_command.rb
@@ -20,6 +20,7 @@ module Aeolus
def run
if combo_implemented?
+ check_targets
@options[:template_str] = read_file(@options[:template])
if @options[:template_str].nil?
puts "Cannot find specified file"
@@ -63,6 +64,15 @@ module Aeolus
super
end
+ def check_targets
+ lc = ListCommand.new
+ @options[:target].each do |target|
+ unless lc.target_references.include?(target)
+ puts "ERROR: The given target: '" + target + "' is not supported"
+ quit(1)
+ end
+ end
+ end
end
end
end
diff --git a/lib/aeolus_image/command/list_command.rb b/lib/aeolus_image/command/list_command.rb
index 7ca8332..0047694 100644
--- a/lib/aeolus_image/command/list_command.rb
+++ b/lib/aeolus_image/command/list_command.rb
@@ -57,15 +57,28 @@ module Aeolus
quit(0)
end
+ def target_references
+ supported_targets.map { |target| target[1] }
+ end
+
def targets
- targets = [["NAME", "TARGET CODE"]]
- targets << ["Mock", "mock"]
+ format_print([["NAME", "TARGET CODE"]] + supported_targets)
+ quit(0)
+ end
+
+ #TODO: Should really get these targets from conductor/imagefactory. At the moment Imagefactory does not
+ # offer a way to get these through its API and the ones in Conductor are at the moment not compatible
+ # with image factory, so these are hardcoded for time being
+ def supported_targets
+ targets = [["Mock", "mock"]]
targets << ["Amazon EC2", "ec2"]
targets << ["RHEV-M", "rhevm"]
targets << ["VMware vSphere", "vsphere"]
- targets << ["Condor Cloud", "condor_cloud"]
- format_print(targets)
- quit(0)
+ targets << ["Go Grid", "gogrid"]
+ targets << ["Rackspace", "rackspace"]
+ targets << ["Open Nebula", "opennebula"]
+ targets << ["Go Grid", "gogrid"]
+ targets << ["Condor Cloud", "condorcloud"]
end
def providers
diff --git a/spec/build_command_spec.rb b/spec/build_command_spec.rb
index adabb19..fcda5dc 100644
--- a/spec/build_command_spec.rb
+++ b/spec/build_command_spec.rb
@@ -43,6 +43,18 @@ module Aeolus
end
$stdout.string.should include("ERROR: The given Template does not conform to the TDL Schema")
end
+ it "should exit with appropriate message when an invalid target is provided" do
+ @options[:template] = "#{File.dirname(__FILE__)}" + "/../examples/custom_repo.tdl"
+ @options[:image] = '825c94d1-1353-48ca-87b9-36f02e069a8d'
+ @options[:target] = ["InvalidTarget"]
+ b = BuildCommand.new(@options, @output)
+ begin
+ b.check_targets
+ rescue SystemExit => e
+ e.status.should == 1
+ end
+ $stdout.string.should include("ERROR: The given target: 'InvalidTarget' is not supported")
+ end
end
describe "#combo_implemented?" do
--
1.7.6
12 years, 8 months
Software licenses for various Aeolus components?
by Robert Terhaar
Hi All,
As I just stated in my previous email, I'm a new Aeolus user.
What is the Aeolus project (and various components) licensed under? I see a ASLv2 notice on some components, but many of them lack a license file that I'm able to find.
Thanks! looking forward to digging deeper into Aeolus!
12 years, 8 months
warden - ldap auth
by Jan Provazník
Hi,
sending whole warden authentication patchset again.
Patches 1-5 are already ACKed, but not pushed yet (we need 2
rpms in our repo first), only change against ACKed version are
fixed tests and moved file from app/util to lib/. It should
be easier for reviewer to just apply these 5 patches than finding
them in mailing lists (also there shouldn't be problems with
applying them).
So only patch 6/6 needs to be reviewed, more info is in commit
log of this patch. Access to ldap server to test this patch required.
Jan
12 years, 8 months
Deltacloud API verbose mode
by Michal Fojtik
Hi,
Just FYI, Deltacloud API from version 1315573802git (current nightly build) supports 'verbose' mode,
which you can use to report errors or see what parameters are picked up by API on request and other
useful informations.
This could be extra useful for debugging and also reporting errors to us.
Other handy tool that comes along with this patch is that you can place custom debugging messages
everywhere in the code like:
def instances(credentials, opts=nil)
cloud = new_client(credentials)
info cloud
…
warn "Oops, something is wrong..."
end
In log you should then see the original file from where this message comes, line in this source file
and original caller method that throws this message.
I hope this will help us be more flexible in debugging Deltacloud API code.
In order to enable it you can do following:
1. export API_VERBOSE=1
2. ./bin/deltacloudd -V -i mock (-V == verbose mode)
-- Michal
------------------------------------------------------
Michal Fojtik, mfojtik(a)redhat.com
Deltacloud API: http://deltacloud.org
12 years, 8 months
[PATCH configure] replace deltacloud init script w/ systemd service specification
by Mo Morsi
From: Mo Morsi <mmorsi(a)redhat.com>
---
recipes/aeolus/files/deltacloud-core.service | 10 +++
recipes/aeolus/files/deltacloud-core.sysconf | 24 ++++++
recipes/aeolus/manifests/deltacloud.pp | 11 ++-
recipes/aeolus/templates/deltacloud-core | 103 --------------------------
4 files changed, 40 insertions(+), 108 deletions(-)
create mode 100644 recipes/aeolus/files/deltacloud-core.service
create mode 100644 recipes/aeolus/files/deltacloud-core.sysconf
delete mode 100644 recipes/aeolus/templates/deltacloud-core
diff --git a/recipes/aeolus/files/deltacloud-core.service b/recipes/aeolus/files/deltacloud-core.service
new file mode 100644
index 0000000..3b9a5d7
--- /dev/null
+++ b/recipes/aeolus/files/deltacloud-core.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=An abstract cloud computing api
+After=syslog.target network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/deltacloud-core.pid
+EnvironmentFile=/etc/sysconfig/deltacloud-core
+ExecStart=/usr/bin/deltacloudd -i $DRIVER -e $ENV -p $PORT -d --pid /var/run/deltacloud-core.pid
+ExecStop=/bin/kill -TERM $MAINPID
diff --git a/recipes/aeolus/files/deltacloud-core.sysconf b/recipes/aeolus/files/deltacloud-core.sysconf
new file mode 100644
index 0000000..9184c19
--- /dev/null
+++ b/recipes/aeolus/files/deltacloud-core.sysconf
@@ -0,0 +1,24 @@
+# Deltacloud API configuration
+# http://deltacloud.org
+
+# Default port where Deltacloud API will listen on (3002)
+# You should be able to access Deltacloud API on http://localhost:PORT/api
+
+PORT=3002
+
+# Bind to HOST address (default: localhost)
+# You can use both IP address or hostname
+
+HOST=localhost
+
+# Default driver to be used (EC2).
+# NOTE: Some drivers require some additional gems to be installed.
+# Please reffer to http://deltacloud.org to see what gems are needed for specific
+# drivers
+
+DRIVER="ec2"
+
+# Default log file for Deltacloud API
+# LOGFILE="/var/log/deltacloud-core/ec2.log"
+
+ENV='production'
diff --git a/recipes/aeolus/manifests/deltacloud.pp b/recipes/aeolus/manifests/deltacloud.pp
index ce9ad05..38e75c5 100644
--- a/recipes/aeolus/manifests/deltacloud.pp
+++ b/recipes/aeolus/manifests/deltacloud.pp
@@ -12,16 +12,17 @@ class aeolus::deltacloud::core {
include ntp::client
### Start the aeolus services
- file { "/var/log/deltacloud-core": ensure => 'directory' }
- file {"/etc/init.d/deltacloud-core":
- content => template("aeolus/deltacloud-core"),
- mode => 755 }
+ file { "/var/log/deltacloud-core.log":}
+ file {"/lib/systemd/system/deltacloud-core.service":
+ source => "puppet:///modules/aeolus/deltacloud-core.service"}
+ file {"/etc/sysconfig/deltacloud-core":
+ source => "puppet:///modules/aeolus/deltacloud-core.sysconf"}
service { 'deltacloud-core':
ensure => 'running',
enable => true,
hasstatus => true,
- require => [Package['deltacloud-core'], File["/etc/init.d/deltacloud-core", "/var/log/deltacloud-core"]]}
+ require => [Package['deltacloud-core'], File["/lib/systemd/system/deltacloud-core.service", "/var/log/deltacloud-core.log", "/etc/sysconfig/deltacloud-core"]]}
}
class aeolus::deltacloud::ec2 {
diff --git a/recipes/aeolus/templates/deltacloud-core b/recipes/aeolus/templates/deltacloud-core
deleted file mode 100644
index 5f1f888..0000000
--- a/recipes/aeolus/templates/deltacloud-core
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-#
-#
-# deltacloud-core startup script for deltacloud-core server
-#
-# chkconfig: - 97 03
-# description: deltacloud-core is primary server process for the \
-# Deltacloud Core component.
-#
-
-[ -r /etc/sysconfig/deltacloud-core ] && . /etc/sysconfig/deltacloud-core
-
-ENV="${ENV:-production}"
-DRIVER="${DRIVER:-ec2}"
-PORT="${PORT:-3002}"
-LOCKFILE="${LOCKFILE:-/var/lock/subsys/deltacloud-core}"
-LOGFILE="${LOGFILE:-/var/log/deltacloud-core/$DRIVER.log}"
-PIDFILE="${THIN_PID:-/var/run/deltacloud-core.pid}"
-export DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.3.0/lib/deltacloud/drivers/mock/data/
-
-PROG=/usr/bin/deltacloudd
-
-STARTTIMEOUT=20
-
-. /etc/init.d/functions
-
-start() {
- echo -n "Starting deltacloud-core: "
-
- if [ -f $LOCKFILE ] || [ -f $PIDFILE ] && checkpid `cat $PIDFILE` ; then
- echo_success
- echo
- echo "deltacloud-$DRIVER has already been started"
- exit 0
- fi
-
- $PROG -i $DRIVER -e $ENV -p $PORT >> $LOGFILE 2>&1 &
- RETVAL=$?
- echo $! > $PIDFILE
- if [ $RETVAL -eq 0 ] ; then
- TIMEOUT="$STARTTIMEOUT"
- while [ $TIMEOUT -gt 0 ]; do
- /usr/bin/curl --silent http://localhost:$PORT/api >& /dev/null
- RETVAL=$?
- if [ $RETVAL -eq 0 ] ; then
- touch $LOCKFILE
- echo_success
- echo
- exit 0
- fi
- sleep 1
- let TIMEOUT=${TIMEOUT}-1
- done
- fi
-
- echo_failure
- echo
- exit 1
-}
-
-stop() {
- echo -n "Shutting down deltacloud-core: "
-
- # FIXME! we need to do a killproc -p <pidfile> here to ensure other deltacloud
- # daemons are not killed as well
- killproc -p $PIDFILE deltacloudd
- RETVAL=$?
- if [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ; then
- echo_success
- echo
- else
- echo_failure
- echo
- fi
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- reload)
- ;;
- force-reload)
- restart
- ;;
- status)
- status -p $PIDFILE $PROG
- RETVAL=$?
- ;;
- *)
- echo "Usage: deltacloud-core {start|stop|restart|status}"
- exit 1
- ;;
-esac
-
-exit $RETVAL
--
1.7.6
12 years, 8 months