Remote pairing
by Simon Harris
Anyone interested? Can do VNC, iChat, GoTo Meeting, or whatever weird and whacky screen sharing solutions people might have.
Simon
12 years, 9 months
[PATCH configure] Task 1962 - Allow aeolus-configure to install missing packages
by Richard Su
Added package_provider parameter to default_configure to control whether missing packages should be installed automatically. Set value to yum to auto install (the default moving forward) or to rpm to disable auto install.
Fixed a few dependency issues that cropped up since we can't rely on certain conditions being statisfied if aeolus-all is not installed before running aeolus-configure for the first time.
---
conf/default_configure | 1 +
recipes/aeolus/manifests/conductor.pp | 33 ++++++++++++++++------------
recipes/aeolus/manifests/defaults.pp | 8 -------
recipes/aeolus/manifests/deltacloud.pp | 6 +++-
recipes/aeolus/manifests/image-factory.pp | 9 +++++--
recipes/aeolus/manifests/init.pp | 5 +++-
recipes/aeolus/manifests/iwhd.pp | 6 +++-
recipes/apache/manifests/init.pp | 13 ++++++++---
recipes/ntp/manifests/init.pp | 1 +
recipes/openssl/manifests/init.pp | 3 +-
recipes/postgres/manifests/init.pp | 6 +++-
11 files changed, 54 insertions(+), 37 deletions(-)
diff --git a/conf/default_configure b/conf/default_configure
index 33ac7e1..798a83d 100644
--- a/conf/default_configure
+++ b/conf/default_configure
@@ -16,6 +16,7 @@
parameters:
enable_https: true
enable_security: false
+ package_provider: yum
# Uncomment this section and provide reasonable values to
# enable RHEV values to be populated.
# rhevm_nfs_server: nfs.server.com
diff --git a/recipes/aeolus/manifests/conductor.pp b/recipes/aeolus/manifests/conductor.pp
index 42ea2fc..aec0e1b 100644
--- a/recipes/aeolus/manifests/conductor.pp
+++ b/recipes/aeolus/manifests/conductor.pp
@@ -4,13 +4,17 @@ class aeolus::conductor inherits aeolus {
### Install the aeolus components
# specific versions of these two packages are needed and we need to pull the third in
package {['aeolus-conductor',
- 'aeolus-conductor-daemons']:
- ensure => 'installed'}
+ 'aeolus-conductor-daemons',
+ 'condor',
+ 'aeolus-all']:
+ ensure => 'installed',
+ provider => $package_provider }
file {"/var/lib/aeolus-conductor":
ensure => directory,
owner => 'aeolus',
- group => 'aeolus'}
+ group => 'aeolus',
+ require => Package['aeolus-conductor']}
### Setup selinux for deltacloud
selinux::mode{"permissive":}
@@ -18,7 +22,7 @@ class aeolus::conductor inherits aeolus {
### Start the aeolus services
file {"/etc/condor/config.d/10deltacloud.config":
source => "puppet:///modules/aeolus/condor_config.local",
- require => Package['aeolus-conductor-daemons'] }
+ require => Package['aeolus-conductor-daemons', 'condor'] }
# condor requires an explicit non-localhost hostname
# TODO we can also kill the configure sequence here instead
exec{"/bin/echo 'hostname/domain should be explicitly set and should not be localhost.localdomain'":
@@ -30,6 +34,15 @@ class aeolus::conductor inherits aeolus {
enable => true,
hasstatus => true,
require => File['/etc/condor/config.d/10deltacloud.config'] }
+
+ ### Setup apache for deltacloud
+ include apache
+ if $enable_https {
+ apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd-ssl.conf'}
+ } else{
+ apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd.conf'}
+ }
+
service { ['aeolus-conductor',
'conductor-dbomatic' ]:
ensure => 'running',
@@ -37,7 +50,8 @@ class aeolus::conductor inherits aeolus {
hasstatus => true,
require => [Package['aeolus-conductor-daemons'],
Rails::Migrate::Db[migrate_aeolus_database],
- Service['condor', 'httpd']] }
+ Service['condor', 'httpd'],
+ Apache::Site[aeolus-conductor], Exec[reload-apache]] }
### Initialize and start the aeolus database
# Right now we configure and start postgres, at some point I want
@@ -94,15 +108,6 @@ class aeolus::conductor inherits aeolus {
rails_env => "production",
require => Rails::Migrate::Db[migrate_aeolus_database]}
-
- ### Setup apache for deltacloud
- include apache
- if $enable_https {
- apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd-ssl.conf'}
- } else{
- apache::site{"aeolus-conductor": source => 'puppet:///modules/aeolus/aggregator-httpd.conf'}
- }
-
### Setup sshd for deltacloud
package { "openssh-server": ensure => installed }
service{"sshd":
diff --git a/recipes/aeolus/manifests/defaults.pp b/recipes/aeolus/manifests/defaults.pp
index f2fc891..8212945 100644
--- a/recipes/aeolus/manifests/defaults.pp
+++ b/recipes/aeolus/manifests/defaults.pp
@@ -1,13 +1,5 @@
#Set up some defaults
-#Use rpm because it will fail because we don't provide source.
-#This is an easy mechanism to have puppet fail when packages
-#aren't installed, but also an easy way to tune it back to
-#the behavior of installing packages that are missing by
-#switching back to yum
-
-Package {provider => 'rpm'}
-
$admin_user='admin'
$admin_password='password'
diff --git a/recipes/aeolus/manifests/deltacloud.pp b/recipes/aeolus/manifests/deltacloud.pp
index dc367da..769de73 100644
--- a/recipes/aeolus/manifests/deltacloud.pp
+++ b/recipes/aeolus/manifests/deltacloud.pp
@@ -5,14 +5,16 @@ class aeolus::deltacloud::core {
include aeolus
package { 'deltacloud-core':
- ensure => 'installed'}
+ ensure => 'installed',
+ provider => $package_provider }
}
class aeolus::deltacloud::ec2 {
### Install the driver-specific components
# install ec2 support,
package { "rubygem-aws":
- ensure => 'installed' }
+ ensure => 'installed',
+ provider => $package_provider }
}
diff --git a/recipes/aeolus/manifests/image-factory.pp b/recipes/aeolus/manifests/image-factory.pp
index 0bb9e72..ea85fda 100644
--- a/recipes/aeolus/manifests/image-factory.pp
+++ b/recipes/aeolus/manifests/image-factory.pp
@@ -3,13 +3,16 @@
class aeolus::image-factory inherits aeolus {
package { 'libvirt':
- ensure=> 'installed'
+ ensure=> 'installed',
+ provider => $package_provider
}
package { 'imagefactory':
- ensure => 'installed'
+ ensure => 'installed',
+ provider => $package_provider
}
package { 'qpid-cpp-server':
- ensure => 'installed' }
+ ensure => 'installed',
+ provider => $package_provider }
### Configure pulp to fetch from Fedora
# TODO uncomment when factory/warehouse uses pulp
diff --git a/recipes/aeolus/manifests/init.pp b/recipes/aeolus/manifests/init.pp
index 7768733..b829ffa 100644
--- a/recipes/aeolus/manifests/init.pp
+++ b/recipes/aeolus/manifests/init.pp
@@ -30,7 +30,10 @@ if $aeolus_enable_security == "true" or $aeolus_enable_security == "1" {
# Base aeolus class
class aeolus {
- package{'curl': ensure => 'installed'}
+ package{'curl':
+ ensure => 'installed',
+ source => $package_provider
+ }
}
# Create a new provider in aeolus
diff --git a/recipes/aeolus/manifests/iwhd.pp b/recipes/aeolus/manifests/iwhd.pp
index 9ecf657..c0cb55e 100644
--- a/recipes/aeolus/manifests/iwhd.pp
+++ b/recipes/aeolus/manifests/iwhd.pp
@@ -3,10 +3,12 @@
class aeolus::iwhd inherits aeolus {
### Install the deltacloud components
package { 'iwhd':
- ensure => 'installed' }
+ ensure => 'installed',
+ provider => $package_provider }
package { 'mongodb-server':
- ensure => 'installed' }
+ ensure => 'installed',
+ provider => $package_provider }
### Start the aeolus services
file { "/data": ensure => 'directory' }
diff --git a/recipes/apache/manifests/init.pp b/recipes/apache/manifests/init.pp
index 32a0723..8c3cafc 100644
--- a/recipes/apache/manifests/init.pp
+++ b/recipes/apache/manifests/init.pp
@@ -1,9 +1,13 @@
class apache {
# require apache and mod_ssl
- package { "httpd": ensure => installed }
+ package { "httpd":
+ ensure => installed,
+ source => $package_provider }
if $enable_https {
- package { "mod_ssl": ensure => installed }
+ package { "mod_ssl":
+ ensure => installed,
+ source => $package_provider }
}
# if selinux is enabled and we want to use mod_proxy, we need todo this
@@ -21,9 +25,10 @@ class apache {
enable => true
}
+ # add a sleep here because httpd may have not finished starting up
exec { "reload-apache":
- command => "/sbin/service httpd reload",
- refreshonly => true
+ command => "/bin/sleep 1; /sbin/service httpd reload",
+ refreshonly => true,
}
}
diff --git a/recipes/ntp/manifests/init.pp b/recipes/ntp/manifests/init.pp
index 00897cd..560f64e 100644
--- a/recipes/ntp/manifests/init.pp
+++ b/recipes/ntp/manifests/init.pp
@@ -1,6 +1,7 @@
class ntp {
package { "ntp":
ensure => installed,
+ source => $package_provider
}
File {
owner => root,
diff --git a/recipes/openssl/manifests/init.pp b/recipes/openssl/manifests/init.pp
index 71c5870..8d98282 100644
--- a/recipes/openssl/manifests/init.pp
+++ b/recipes/openssl/manifests/init.pp
@@ -1,6 +1,7 @@
class openssl {
package { "openssl":
- ensure => installed
+ ensure => installed,
+ source => $package_provider
}
}
diff --git a/recipes/postgres/manifests/init.pp b/recipes/postgres/manifests/init.pp
index 50b7d0c..b03dd20 100644
--- a/recipes/postgres/manifests/init.pp
+++ b/recipes/postgres/manifests/init.pp
@@ -1,6 +1,7 @@
class postgres {
package { "postgresql":
- ensure => installed,
+ ensure => installed,
+ source => $package_provider
}
}
@@ -9,7 +10,8 @@ class postgres::client inherits postgres {
class postgres::server inherits postgres {
package { [ "postgresql-server" ]:
- ensure => installed,
+ ensure => installed,
+ source => $package_provider
}
group { "postgres":
--
1.7.4.4
12 years, 9 months
Iteration 4 Features
by Mo Morsi
Some of these have been discussed, while some of these have been sitting
on my backlog for ages.
-------------------
Encryption:
Currently configure allows us to generate ssl certificates for
conductor, we need to expand this to generate ssl certs for
imagefactory, iwhd, condor and deltacloud,
Furthermore, AFAIK a cert creation resource type and provider is lacking
in the upstream puppet project. We can split these bits into its own
puppet resource type and provider and send that upstream for inclusion
into there.
-------------------
Identity:
Currently we use a users table in the db to store user identity. We need
to be able to integrate a user store from LDAP, whether it be a server
we setup ourselves via configure or an external one we integrate in
(both need to be supported)
-------------------
Configuration profiles / interactive installer:
The start of this was sent to list, but essentially a mechanism to
install different aeolus components on different machines, configuring
them to be interoperable with each other and existing infrastructure
resources (qmf, ldap, or postgres servers for example).
Furthermore a user friendly interactive installer should be provided so
that an admin can setup / configure only the specific components and
seed data that they are looking for
-------------------
IPv6 support:
No work has been done to make Aeolus IPv6 compliant and this should be
done at some point.
-------------------
Single click deployments:
The simpler the Aeolus experience the better, there should be a small
widget on the first conductor page after logging in allowing the user to
select a template and select a provider to deploy to before clicking to
actually launch it. The rest of the nitty-gritty details should be taken
care of by the app itself.
This would be a patentable feature for a 'one-click cloud deployment'
-------------------
Improved rubygem/rpm and ruby/fedora integration:
The gem2rpm and ruby-rpm bindings can be improved significantly to
assist in our bundling of project dependencies and the ruby -> Fedora
release process. Specifically we should be able to do alot more in terms
of dependency analysis and making sure any given gem stack will work as
intended on our infrastructure.
Furthermore our existing tooling, such as the rpm/yum rake tasks, can be
improved and made available to the greater ruby community.
-------------------
Code audit and improvements
There are alot of things that can be cleaned up, optimized and improved
in general in the aeolus codebase. Particularly conductor can be
optimized and should be improved to make use of ActiveResource,
ActiveModel, and other Rails 3 features
-------------------
Condor REST frontend
If we can accomplish this, we can remove alot of the needless
replication from our conductor db, replacing the ActiveRecord models w/
ActiveResource derived ones. Furthermore, we can get rid of condormatic
all together
Thoughts?
-Mo
12 years, 9 months
Iteration 4 Feature: Identity
by Jan Provazník
Hi,
sending identity user stories we put together with Martyn.
As a user I should be able to share identity in Conductor and katello
* Check up on Katello see whether it uses Warden or OmniAuth and
what the situation is re: migrating to OmniAuth if not already
there
* Use same authentication framework in Conductor and Katello (either
OmniAuth or Warden) depending on above result, this framework
should support Active Directory and SSO
* add rpms dependencies to Conductor
* implment SSO for Conductor and Katello
As an admin I should have running identity server after installing
Conductor
* In aeolus-configure point conductor to existing AD server or set
up own identity server (LDAP?) if no AD is available
As an admin I should be able to create local users for Conductor
(Conductor local users doesn't need to have access to Katello)
* check up on Katello and do it same way - it probably already
supports this, if it doesn't then steps are:
* when authenticating a user, first authenticate against local db
* if the user is not found in local db, authenticate against LDAP
* if auth is successful, create this user in local conductor DB
too, but without password so user has to be authenticated always
against LDAP
* add some flag to distinguish between local/no-local users in user
listing
* allow editing only some settings (quota) for no-local users
Jan
12 years, 9 months
[PATCH aeolus-image 1/8] Added list provider images
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
This is structured differently to allow other commands to access the list of provider images. In particular in delete targetimage, so that all the provider images of this tartgetimage are also deleted.
---
lib/config_parser.rb | 2 +-
lib/list_command.rb | 31 +++++++++++++++++++++++++++++--
2 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/lib/config_parser.rb b/lib/config_parser.rb
index 8e98971..a1d440c 100644
--- a/lib/config_parser.rb
+++ b/lib/config_parser.rb
@@ -85,7 +85,7 @@ module Aeolus
@options[:id] = id
end
opts.on('-P', '--providerimages ID', 'Retrieve the provider images from a target image') do |id|
- @options[:subcommand] = :targetimages
+ @options[:subcommand] = :providerimages
@options[:id] = id
end
opts.on('-g', '--targets', 'Retrieve the values available for the --target parameter') do
diff --git a/lib/list_command.rb b/lib/list_command.rb
index 062adbb..ca7308a 100644
--- a/lib/list_command.rb
+++ b/lib/list_command.rb
@@ -46,7 +46,7 @@ module Aeolus
end
def targetimages
- check_bucket_exists("target_images")
+ check_bucket_exists("target-images")
doc = Nokogiri::XML iwhd['/target_images'].get
doc.xpath("/objects/object/key").each do |target_image|
begin
@@ -59,6 +59,33 @@ module Aeolus
quit(0)
end
+ def providerimages
+ providerimages = [["Provider Image ID"]]
+ list_providerimages(@options[:id]).each do |pi|
+ providerimages << [pi]
+ end
+ format_print(providerimages)
+ quit(0)
+ end
+
+ def list_providerimages(targetimage)
+ providerimages = []
+ if check_bucket_exists("provider_images").nil?
+ return providerimages
+ end
+
+ doc = Nokogiri::XML iwhd['/provider_images'].get
+ doc.xpath("/objects/object/key").each do |provider_image|
+ begin
+ if iwhd['/provider_images/' + provider_image.text + "/target_image"].get == targetimage
+ providerimages << provider_image.text
+ end
+ rescue RestClient::ResourceNotFound
+ end
+ end
+ providerimages
+ end
+
def targets
targets = [["NAME", "TARGET CODE"]]
targets << ["Mock", "mock"]
@@ -144,7 +171,7 @@ module Aeolus
begin
iwhd["/" + bucket].get
rescue
- quit(0)
+ nil
end
end
end
--
1.7.4
12 years, 9 months
Image hardware architecture
by Jan Provazník
Hi,
I think the only place where we keep architecture (i386, x86_64)
information in warehouse is in a template XML. This is not ideal because
then we are not able to effectively check if user chose hardware profile
with same architecture when launching an instance - it's described in
this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=723680
If I want to check hwp architecture matching for a deployable, I need to
fetch first Deployable -> first assembly -> first image -> first build
-> template and parse architecture from xml. And this works only if it's
not imported image (imported images has not template association at all).
So question is - could we keep architecture as an attribute of image
object in warehouse (alternatively attribute of image build, but
architecture is set in template so all builds has same architecture)?
And second question, could we set image architecture when importing an
image?
Jan
12 years, 9 months
[PATCH conductor] Fix the login page error reporting
by Tomas Sedovic
From: Tomas Sedovic <tsedovic(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=726779
This handles two issues with our login-over-javascript situation.
The first was a broken UI when the error message was unexpectedly a HTML page
instead of a single text response that we set on entering bad credentials.
This could happen if the Rails app or Apache returned a 5xx error when the
user tried to log in.
The second was not being able to get through the login page if the user has
already signed in in another tab.
---
src/app/controllers/user_sessions_controller.rb | 2 +-
src/app/views/user_sessions/new.haml | 10 ++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/user_sessions_controller.rb b/src/app/controllers/user_sessions_controller.rb
index d8baf72..8ade923 100644
--- a/src/app/controllers/user_sessions_controller.rb
+++ b/src/app/controllers/user_sessions_controller.rb
@@ -37,7 +37,7 @@ class UserSessionsController < ApplicationController
flash[:notice] = "Login successful!"
redirect_back_or_default root_url
end
- format.js { render :text => "window.location='#{root_url}'" }
+ format.js { render :status => 201, :text => root_url }
end
else
respond_to do |format|
diff --git a/src/app/views/user_sessions/new.haml b/src/app/views/user_sessions/new.haml
index 3ef9eb3..ee8b409 100644
--- a/src/app/views/user_sessions/new.haml
+++ b/src/app/views/user_sessions/new.haml
@@ -23,8 +23,13 @@
$.ajax({
url: this.action,
type: 'POST',
- dataType: 'script',
+ accepts: { html: "application/javascript" },
+ dataType: 'html',
data: form_data,
+ success: function(data, textStatus, jqXHR) {
+ if(jqXHR.status === 201) window.location = data;
+ else window.location.reload();
+ },
error: function(response) {
//TODO: for some reason error connection errors are not handled by 'error' callback,
//what's worse jquery sets 'textStatus' to success, if we want to catch connection errors
@@ -32,7 +37,8 @@
$('#error-content').remove();
$('#primary-container').prepend('<div id="error-content" class="error" style="opacity: 0; position: relative;"></div>');
var text = $.isEmptyObject(response.responseText) ? response.statusText : response.responseText;
- $('#error-content').html('<p class="text">' + text + '</div>');
+ if(response.status !== 401) text = "Internal Server Error";
+ $('#error-content').html('<p class="text">' + text + '</p>');
$('#error-content').animate({ 'opacity': 1, 'top': -10 },{queue:false,duration:150});
$('#progress-indicator').hide();
$('#login input').each(function(){ $(this).removeAttr('disabled'); });
--
1.7.6
12 years, 9 months
Image_Factory is now ImageFactory
by Steve Loranz
In the spirit of the adage that 'the only constant is change', we have made a subtle change to the naming of the ImageFactory project and have removed the underscore from the name. This started as a desire to have the imgfac.py executable be renamed to 'imagefactory' as well as consolidating all of the various 'image factory', 'image-factory', 'image_factory', etc references to just 'imagefactory'.
As a result, the source repository has been renamed and can now be referenced via:
https://github.com/aeolusproject/imagefactory
A deprecated repository has been created at the old location with a README pointing to the new location.
Also, the rpm repository on fedorapeople.org has been renamed and can be found at:
http://repos.fedorapeople.org/repos/aeolus/imagefactory/
We apologize for any inconvenience this may cause.
Thank you.
- The Aeolus ImageFactory Team
12 years, 9 months