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